Hi all,
I've some problem (I weakness in english language but I'll try to explain.)
Firstly, I've created dynamically column from telerik gridview but I couldn't save new data to datatable
About telerik gridview that I try to this code
this code is perform to gather new value (when you key in new value in editable textbox),In runtime mode will through to grid_UpdateCommand method. that's ok (I can show new value )
But my purpose want to loop all new value (when you key in new value) into my Data-table
as following
But I couldn't get new value when I loop from grid (I couldn't use ExtractValuesFromItem method it displayed error message as "Unable to cast object of type 'MyItemTemplate' to type 'System.Web.UI.IBindableTemplate'."
How should I do this problem ?
Thanking in advance
Bhadhai
I've some problem (I weakness in english language but I'll try to explain.)
Firstly, I've created dynamically column from telerik gridview but I couldn't save new data to datatable
About telerik gridview that I try to this code
void grid_UpdateCommand(object source, GridCommandEventArgs e) { Hashtable newValues = new Hashtable(); GridEditableItem item = e.Item as GridEditableItem; item.OwnerTableView.ExtractValuesFromItem(newValues, item); Response.Write("Updated Name: " + newValues["ContactName"].ToString()); }this code is perform to gather new value (when you key in new value in editable textbox),In runtime mode will through to grid_UpdateCommand method. that's ok (I can show new value )
But my purpose want to loop all new value (when you key in new value) into my Data-table
as following
Hashtable newValues = new Hashtable(); foreach (GridEditableItem Item in grid.MasterTableView.Items) { Item.OwnerTableView.ExtractValuesFromItem(newValues, (GridEditableItem)Item); string str = newValues[0].ToString(); }But I couldn't get new value when I loop from grid (I couldn't use ExtractValuesFromItem method it displayed error message as "Unable to cast object of type 'MyItemTemplate' to type 'System.Web.UI.IBindableTemplate'."
How should I do this problem ?
Thanking in advance
Bhadhai