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

[Solved] Get Value from: GridTextBoxColumnEditor

2 Answers 133 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Clarence Klopfstein
Top achievements
Rank 1
Clarence Klopfstein asked on 08 Apr 2009, 12:26 PM
How in the world do I get the value from a GridTextBoxColumnEditor control?  I've tried every way I can find and it always comes back empty on the update command of my grid.

2 Answers, 1 is accepted

Sort by
0
Clarence Klopfstein
Top achievements
Rank 1
answered on 09 Apr 2009, 01:03 AM
Nothing?  Really... I've searched all I can search...
0
Clarence Klopfstein
Top achievements
Rank 1
answered on 09 Apr 2009, 02:17 AM
Well I looked some more and found something that wasn't really telling me it would fix it, but it did.  For search sake, here is how you get the values:
 if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
        { 
            GridEditableItem item = e.Item as GridEditableItem; 
            int walkerId = Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["Id"]); 
            Hashtable newValues = new Hashtable(); 
            //The GridTableView will fill the values from all editable columns in the hash 
            e.Item.OwnerTableView.ExtractValuesFromItem(newValues, item); 


After this the Hashtable will have the values in it.
Tags
Grid
Asked by
Clarence Klopfstein
Top achievements
Rank 1
Answers by
Clarence Klopfstein
Top achievements
Rank 1
Share this question
or