how can i update the datagrid

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tirumalesh
    New Member
    • Oct 2006
    • 2

    how can i update the datagrid

    hi everybody,

    i have a problem with the update command,in what way should i write the code for the update command.Please have a look at this:


    in updatecommand:

    Dim empname As String = CType(e.Item.Fi ndControl("t1") , TextBox).Text
    Dim empno As Integer = DataGrid1.DataK eys(e.Item.Item Index)
    cb.GetUpdateCom mand()
    da.Update(ds.Ta bles("empname") )

    is this correct.I am getting an error like:

    An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.



    thnks in advance
  • vee10
    New Member
    • Oct 2006
    • 141

    #2
    i think in da.Update(ds.Ta bles("empname") ) u can write da.Update(ds.Ta bles[0].Row[0]."name of column u want to update")


    Originally posted by tirumalesh
    hi everybody,

    i have a problem with the update command,in what way should i write the code for the update command.Please have a look at this:


    in updatecommand:

    Dim empname As String = CType(e.Item.Fi ndControl("t1") , TextBox).Text
    Dim empno As Integer = DataGrid1.DataK eys(e.Item.Item Index)
    cb.GetUpdateCom mand()
    da.Update(ds.Ta bles("empname") )

    is this correct.I am getting an error like:

    An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.



    thnks in advance

    Comment

    Working...