I need to get the primary key value or any other key that I set from the selected row in a datagridview without creating a hidden column.I want the aspview gridview function to have the DataKeyNames property
It really depends on how you fill the grid, but you can use the Tagfor property DataGridViewRowto hold the row key.
Tag
DataGridViewRow
Tag the property can contain any object so that you can set it at any time convenient for you.
Source: https://habr.com/ru/post/1783610/More articles:tinyMCE textarea в крошечном MCEPopup - javascriptVery different I / O performance in C ++ on Windows - c ++How to go to markers in different tabs in vim? - vimКак получить доступ к интернету на симуляторе iPhone? - iphonepreg_replace only OUTSIDE tags? (... we are not talking about the full "html analysis", just a little markdown) - htmlStrange database problem in django - djangoWays to run gacutil on a remote machine - scriptingПерестановки подмножеств и последующий анализ времени выполнения - javaActual documentation for STL - c ++ 11INotifyPropertyChanged, ObservableCollection, Threads and MVVM - multithreadingAll Articles