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




  1. setting autogeneratedeletebutton = true

  2. displaying unparalleled record ids initial column

  3. handling rowdeleting event

  4. obtaining id removing grid.rows[e.rowindex].cells[idindex].text

  5. 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

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

using mvc, should hoop communication between views? between models?