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?

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.

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

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

So in any event you want to put it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.