How to change the value of a specific cell in datagrid

Not Answered This post has 0 verified answers and 3 replies

Not Ranked
Posts: 1
iamrakesh Posted: Wed Aug 31, 2011 @ 4:54 AM
I m using a datagrid of component art, i want to update the specific cell value through a text box.

In this case, what we want is we have a grid having 7 or 8 columns , and for those 7 Col's there are 7 controls on the web-page which associated with every column means e.g. if i change the value in any control then that value of the control should reflect immediately in the grid also.

Is it possible, If yes, then please tell me how. I am searching your forumns for almost last 2 days.

How to do it please let me know.

Secondly what i want to do is to On save , I want to iterate the grid and save the data from the grid itself. But when i click on save, items collection of grid does not have any data inspite of EnableViewState property set to true.

Please suggest what to do.

Regards
Rakesh Kumar

All Replies

Top 10 Contributor
Posts: 6,694
stephen Posted: Thu Sep 1, 2011 @ 7:18 AM

You use the setValue method of to set the value of an item - see this documentation entry.  As for your latter question, I'd almost definitely need to see your code - I can't really what's going on based on this information. Do you have code to reproduce, perhaps? 

Stephen Hatcher, Developer Support Manager
Top 500 Contributor
Posts: 21
MKManjula Posted: Fri Dec 2, 2011 @ 1:13 AM
Hi,

if i use  below method to update the values of cells,  after inserting the record, the cell text will not be visible.
 function updateItem(row,column,newValue) {
    Grid1.get_table().getRow(row).setValue(column,newValue);
  }
let me know the method to update the cell Text as well.

Thanks and Regards 
Manjula 
Top 10 Contributor
Posts: 6,694
stephen Posted: Tue Dec 6, 2011 @ 10:57 AM

Sorry, I'm not sure what it is you're describing here- can you clarify? You update the text using setValue, then...? 

Stephen Hatcher, Developer Support Manager
Page 1 of 1 (4 items)