|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread|
|Messages 1 to 4 of 4 total|
|Extra Grid Data|
|Mon, Sep 28 2015 8:03 AM||Permanent Link|
This is silly, but I can't work it out ...
I have a page with some grids on, each bound to a dataset. The datasets are manually updated through server calls (the datasets are not bound to the data sources).
Each grid will display some data, but the dataset will also contain a unique ID that will not be displayed. I do, however, need to somehow tie in the grid row with the dataset row so when it is clicked I can retrieve this unique ID and send it back to the server. It's this link I can't work out.
I'm sure I just can't see the wood for the trees, but if anyone could point me in the right direction I'd be grateful.
|Mon, Sep 28 2015 9:05 AM||Permanent Link|
Tactical Business Corporation
Not sure what (the dataset are not bound to the data sources) means.
Do you mean the Grids are not bound to the dataset?
If the Grid was bound to the dataset, then you would just do dataset.columns['uniqueid'].AsInteger
If the Grid is not bound the you are going to have to create a column in the grid and put the unique id in the grid so that you can retrieve it. That column can be hidden.
|Mon, Sep 28 2015 10:57 AM||Permanent Link|
Tim Young [Elevate Software]
Elevate Software, Inc.
<< Each grid will display some data, but the dataset will also contain a unique ID that will not be displayed. I do, however, need to somehow tie in the grid row with the dataset row so when it is clicked I can retrieve this unique ID and send it back to the server. It's this link I can't work out. >>
What type is the ID ? It's an integer, then I can add a Tag property to the unbound grid row class.
|Mon, Sep 28 2015 11:14 AM||Permanent Link|
Thanks for your replies.
I've worked out what I need to do - set the dataset RowNo to the grid RowIndex+1 then fetch the data at column[n] from the dataset. I can do this because the grid is always loaded from the dataset and never modified outside of it, so the relationship exists.
Tim - it was that VB style Tag that I was thinking of. But actually it's not really necessary, in my instance anyway now that I've got that relationship.