Wednesday, March 28, 2012

AJAX Update Panel and DataGrid

I write code to populate a datagrid with a Datatable stores in a session variable, I put some data in text boxes and click ADD button it stores that data in table and assign that table to a session variable. FINE.

When I click a datagrid item to Edit. Occasionally it says "Index is out of bound...". It is not always and not always with every row of datagrid. I click on another row to edit it works fine.

I do not know what is actually going inside AJAX. because of using AJAX my ADD and EDIT functionality do not refreshes the page but update the content as required.

Any body know that what should I do?

Regards,

Ather Ali Shaikh

I had a similar problem. I found that on every command I had to recreate the dataview (what I was using) where I used the info from the dataview then things were fine but if I didn't I would get out of bound errors as well as other weird messages. I wasn't trying to use the edit feature of the GridView but just displaying info when a link in a the GridView was clicked so you may also run into things I've not yet found. Anyway, hope this helps some.

Hi,

I do not use the Edit template of the datagrid, what I am doing is using template columns contains Edit link button and on capture is command click event on datagrid on Command event handler.

No comments:

Post a Comment