Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set value to cell in grid in extjs

Tags:

extjs

I need to set value to particular cell from outside of grid.

My value is in session and i want to set this value to a cell in 2nd column and 0th row. How i can do this in extjs?

like image 251
sandeep.gosavi Avatar asked Jun 04 '13 13:06

sandeep.gosavi


People also ask

How to make the grid cells appear yellow in ExtJS?

The setting cls is common to all ExtJS components. It adds a CSS class to the main element for the component. In this case it will put the class custom-grid on the outermost <div> element. Making the grid cells appear yellow needs some CSS like this: This page is using the 'scoped' ExtJS CSS file.

How do I put a border around a grid in ExtJS?

The most important of these is x-panel-with-col-lines, which has an accompanying rule in the default stylesheet to put a grey border down the right-hand side of each grid cell. ... The setting cls is common to all ExtJS components. It adds a CSS class to the main element for the component.

How to add a custom-grid to an ExtJS component?

The setting cls is common to all ExtJS components. It adds a CSS class to the main element for the component. In this case it will put the class custom-grid on the outermost <div> element.

Can I use sass to style grid cells in ExtJS 4?

This is an introduction to CSS styling in ExtJS 4, it does not cover theming using Sass and Compass. Styling grid cells is a common topic for help requests on the Sencha forums. There are a number of techniques available depending on exactly what styling should be applied where.


1 Answers

you must use the store associated with your grid

var grid = ...
var models = grid.getStore().getRange();
models[0].set(fieldName, "new value");
like image 134
user2452092 Avatar answered Sep 21 '22 05:09

user2452092