By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,769 Members | 1,589 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,769 IT Pros & Developers. It's quick & easy.

Updating data in a web DataGrid

P: n/a
Inside the UpdateCommand method of the web DataGrid control I have been given
the following code to take the updated text in each cell and write the
changes back to an XML file:

for(int i = 1; i < 4; i++)
{
MyDataGrid.Tables[0].Rows.Find(Int32.Parse(((TextBox)e.Item.Cells
[0].Controls[0]).Text))[i] = ((TextBox)e.Item.Cells[i].Controls[0]).Text;

}

I then go on to write back to the file and DataBind.

However, the code is breaking on this line, the message being that the input
string is in the incorrect format. The first column in the DataGrid contains
a number and the next 3 are strings.

A breakdown of what this code does would be appreciated, as would an
explanation as to why it is failing.
Mar 27 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.