I have in my application a datagrid, which is linked to a data environment. What I need to be able to do is when the OnClick () event is called on the data grid I need to select the entire row. Is there anyway I can do this?
There is no OnClick event with the MS DataGrid.
Maybe you mean MS Access?
If you mean the MSDataGrid in VB6, then you have two options:
1. When the user clicks on a row: Set the DataGrid's MarqueeStyle to 3 (MSDataGridLib.dbgHighlightRow)
2. When the user clicks on the far left side of a row in the grey area (can also hold down the Shift to select several rows).
This will add the selection to the Bookmarks collection. This can also be done in code. See the DataGrid1.SelBookmarks methods to select and add a row to the bookmark collection, and to read which rows are selected use the DataGrid1.Bookmark collection
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.