• Advertisement
Sign in to follow this  

[.net] Disable multi-select in Datagrid (VB)

This topic is 4307 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I am trying to disable the ability for the user to multi-select items in a datagrid in my VB .NET application. I want to make sure that the user can only select one item. Problem is when they shift click on the datagrid right now it allows them to select multiple items. Is there a way to only let them select just one item at a time? thank you.

Share this post


Link to post
Share on other sites
Advertisement
I have found this program which does exactly what I want, but there is a problem. Anytime I resize the form or add any controls it quits working! .NET is changing a line of code and messing up my program anytime I mess with the form interface. Its changing the line of code from

Me.dataGrid1 = New MyDataGrid

to

Me.dataGrid1 = New datagridselectsinglerow.DataGridSelectSingleRow.MyDataGrid

Anyone know how to stop .NET from doing this??! I have to go back and change the code back constantly!

Single Click

VB.NET Download of Single Click Project

Ok I found out why its not working

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement