how mislay quarrel gridview controlling non-visible data?
i'm writting rudimentary antecedent front finish controlling gridview populated around function, rather being related directly sqlserver information source.
so i mislay row/record grid/underlying database i am currently
- setting autogeneratedeletebutton = true
- displaying unparalleled record ids initial column
- handling rowdeleting event
- obtaining id removing grid.rows[e.rowindex].cells[idindex].text
- passing array by duty does deleting
this seems operative only fine, nonetheless i rather arrangement ids users during don't meant anything them.
i attempted sourroundings id column's manifest ability false, nonetheless caused step 4 above relapse an lifeless twine - record deleted.
so i store hidded id array any row?
or am i going totally wrong way?
follow adult answers:
thanks both answers, finished adult going eric's datakeynames way. new asp.net i am, stairs i used where
between lines where i set grids datasource called databind(), i added
grid.datakeynames = new string[] {"id"};then duty doing rowdeleting i got reason id controlling
grid.datakeys[e.rowindex].value
Comments
Post a Comment