Hi,
I have a gridview with most of the data being read only as it depends on a key column. I'd like to have a GridViewCommandColumn that the user can click on, go to another winform and get back a number of values. These values should then be inserted into the new/edited row.
For example, the button might pop up a product search where I search for a product and when found, return the product name (read only) and product code (editable) to the gridview.
Have you any guidance on this? I tried searching the forums but the search falls over on 'GridViewCommandColumn'.
Edit: I've got the CommandCellClick event working and this works well within the grid if I used the code below, however, it does not work for new rows being added using the 'click here to add a new row' mechanism. The CommandCellClick event still fires and the value assignment does not cause an error, but it does not take effect either.
cell.RowInfo.Cells("MyProductDescription").Value = "abcdef"
cell.Value = Now.ToString() ' This also works, except when the row is a 'new' row added by the UI.
Thanks in advance
Ryan
I have a gridview with most of the data being read only as it depends on a key column. I'd like to have a GridViewCommandColumn that the user can click on, go to another winform and get back a number of values. These values should then be inserted into the new/edited row.
For example, the button might pop up a product search where I search for a product and when found, return the product name (read only) and product code (editable) to the gridview.
Have you any guidance on this? I tried searching the forums but the search falls over on 'GridViewCommandColumn'.
Edit: I've got the CommandCellClick event working and this works well within the grid if I used the code below, however, it does not work for new rows being added using the 'click here to add a new row' mechanism. The CommandCellClick event still fires and the value assignment does not cause an error, but it does not take effect either.
cell.RowInfo.Cells("MyProductDescription").Value = "abcdef"
cell.Value = Now.ToString() ' This also works, except when the row is a 'new' row added by the UI.
Thanks in advance
Ryan