I have a project in VB6 and I need help in how to get the number of selected rows in a Datagrid.. I have already tried using datagrid1.selBookmarks.count but it doesnt seem to work.. i have set the marquee style property of the datagrid into highlight rows.
Can someone give me an insight about this..

If you want to know how many rows are selected then DataGrid1.SelBookmarks.Count works great to me.

its working if im not using "datagrid marquee style= highlight rows".. but i really nid to highlight all the column in a row when someone click on it. should i just use for loop to get the number of rows highlighted? or you have a better idea for this?

Edited 5 Years Ago by romz: n/a

its working if im not using "datagrid marquee style= highlight rows".. but i really nid to highlight all the column in a row when someone click on it. should i just use for loop to get the number of rows highlighted? or you have a better idea for this?

It's still works to me.
I already set marquestyle = dbghighlightrow and i still can use DataGrid1.SelBookmarks.Count to get number of selected rows.

Edited 5 Years Ago by Jx_Man: n/a

it is working but u still need to click the button on the leftside of the datagrid before it could get the number of selected row. In my case i want the user to click any column to higlight the row. can i still get the number of selected row without clicking that button?

appreciate the reply.. thx Jx_Man..

Edited 5 Years Ago by romz: n/a

can i still get the number of selected row without clicking that button?

So in any event you want to put it?

This article has been dead for over six months. Start a new discussion instead.