Hi,
(dataset beginner)
I want to be able to extract the values on the current inserted grid row, and insert them to a dataset using a custom function i wrote.
I started to define this insertCommand method:
| protected void RadGrid1_InsertCommand(object source, Telerik.Web.UI.GridCommandEventArgs e) |
| { |
| GridEditFormInsertItem insertedItem = (GridEditFormInsertItem)e.Item; |
which i found on your site, but the first line fails in type conversion from DataCommandItem.
I want to be able to get something like that:
| string LastName = (insertedItem["LastName"].Controls[0] as TextBox).Text; |
| string FirstName = (insertedItem["FirstName"].Controls[0] as TextBox).Text; |
| string Title = (insertedItem["Title"].Controls[0] as TextBox).Text; |
| string Address = (insertedItem["Address"].Controls[0] as TextBox).Text; |
| string City = (insertedItem["City"].Controls[0] as TextBox).Text; |
but I'm not sure how to extract the current record that is inserted. can you please write here a simple code or just refer me to a relevant documentation?
Thanks in advance,
Hadar