This is a migrated thread and some comments may be shown as answers.

Grid control row value

1 Answer 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bharani Mani
Top achievements
Rank 1
Bharani Mani asked on 26 Oct 2010, 03:27 PM
Hello,
          I want to store a value which is common to the entire row? How do i do it?  Or do I need to keep a hidden column to do it? Please let me know. I didnt see much information on this in the documentation.

Thanks,
Bharani

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Oct 2010, 06:45 AM
Hello,


If you are referring to the primary key, then use the DataKeyNames property to specify the field (or fields) that represent the primary key of the data source.

The data key names/values are stored in the ViewState so they are available at any moment after grid have been data-bound, after postbacks, etc.

And retrieve the DataKeyValues using (GetDataKeyValue method) from the owner GridTableView with the corresponding item ItemIndex and keyName.


-Shinu.
Tags
Grid
Asked by
Bharani Mani
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or