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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to disable the MultiSelection of rows in a GridDataControl?

Thread ID:

Created:

Updated:

Platform:

Replies:

100273 Jul 21,2011 10:46 AM UTC Aug 1,2011 11:41 AM UTC WPF 5
loading
Tags: GridControl
Lukas Reusch
Asked On July 21, 2011 10:46 AM UTC

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!


Rajasekar [Syncfusion]
Replied On 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



Lukas Reusch
Replied On 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!


Rajasekar [Syncfusion]
Replied On 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




Lukas Reusch
Replied On 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!


Rajasekar [Syncfusion]
Replied On August 1, 2011 11:41 AM UTC

Hi Peter,

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

Thanks,
Rajasekar



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;