We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to disable the MultiSelection of rows in a GridDataControl?

Hello,

can you tell me, how to disable the MultiSelection-function in the GridDataControl?

I already tried all possible values for the ListBoxSelectionMode-property but it didn't help.

Thank you!


5 Replies

RA Rajasekar Syncfusion Team July 21, 2011 11:45 AM UTC

Hi Peter,

Thanks for your update.

Suppose if your need is to select single row means, you can achieve your requirement by using below code snippet,

Code Snippet[C#]

dataGrid.ListBoxSelectionMode = GridSelectionMode.One;
dataGrid.AllowSelection = GridSelectionFlags.Row;

Suppose if your need is to select single cell means, you can achieve your requirement by using below code snippet,

Code Snippet[C#]

dataGrid.ListBoxSelectionMode = GridSelectionMode.None;
dataGrid.AllowSelection = GridSelectionFlags.None;

Please let us know if you face any difficulties.

Thanks,
Rajasekar




LR Lukas Reusch July 21, 2011 11:56 AM UTC

Hello,

this are my current properties:


PersistGroupsExpandState="True"
AllowDelete="False"
AllowDragColumns="False"
AllowDrop="False"
AllowEdit="False"
ItemsSource="{Binding ResultsToShow}"
SelectedItem="{Binding SelectedResult}"
ShowAddNewRow="False"
AutoPopulateColumns="False"
AllowResizeRows="False"
AllowSelection="Row"
ListBoxSelectionMode="One"
IsSynchronizedWithCurrentItem="True"
AutoPopulateRelations="False"
AlternatingRowCount="1"
AllowResizeColumns="False"
AllowGroup="True"
ShowGroupDropArea="False"
ShowGroupSummaries="True"
IsGroupsExpanded="True"
ShowGroupCaptionPlusMinus="True"



But is still can select multiple rows.


Thank you very much!



RA Rajasekar Syncfusion Team July 22, 2011 09:05 AM UTC

Hi Peter,

Sorry for the inconvenience caused.

we are unable to reproduce the issue from our side, so could you please check the below sample,

Sample:

< http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GDCSelection-431514867.zip >

If you still face any difficulties, please modify the above sample based on your need and revert us with replication procedure.

Please let us know if you have any queries.

Thanks,
Rajasekar





LR Lukas Reusch August 1, 2011 11:22 AM UTC

Hello,

sorry, it was my mistake.

It works very well.

Mistakenly I overwrote the properties in my code-behind.

Thank you!



RA Rajasekar Syncfusion Team August 1, 2011 11:41 AM UTC

Hi Peter,

Thanks for your update, please let us know if need any other clarifications.

Thanks,
Rajasekar



Loader.
Live Chat Icon For mobile
Up arrow icon