Problem with Datagrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi..friends
I am .NET developer and using ASP.NET
I have one problem with datagrid.

I put one datagrid on the webform. When the user clicks on the Edit link
then it shows some textbox in the the colunm. But when i get click the Update
button then the page is submited (posted back) to server. But the modified
text of the datagrid is not avaiable while post back.

Only the old values are available.

What shoul i do? is there any setting or property i have to change?

Please suggest me as soon as possible
 
you need to have a separate sub that loads values into the DataGrid in the first place. once you modified and saved values into your databse you need to call the sub loading values and rebuild the DataGrid.

private Sub GetData()

Read and bind your data here

End Sub

Private Sub dgData_UpdateCommand(.....)

update code

GetData() ' this will rebind your DataGrid with your freshly modified data

End Sub

Hopwe this helps

Phil





Hi..friends
I am .NET developer and using ASP.NET
I have one problem with datagrid.

I put one datagrid on the webform. When the user clicks on the Edit link
then it shows some textbox in the the colunm. But when i get click the Update
button then the page is submited (posted back) to server. But the modified
text of the datagrid is not avaiable while post back.

Only the old values are available.

What shoul i do? is there any setting or property i have to change?

Please suggest me as soon as possible
 
Back
Top