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.

when I use columntype combobox ,how can I cancel the select value imediately after I select the value which already appear in other rows?

Thread ID:

Created:

Updated:

Platform:

Replies:

70142 Nov 29,2007 02:40 AM Nov 29,2007 09:06 PM Windows Forms 5
loading
Tags: GridControl
Sean
Asked On November 29, 2007 02:40 AM

when I use columntype combobox ,how can I cancel the select value imediately after I select the value which already appear in other rows?


Sean
Replied On November 29, 2007 04:53 AM

Hi,about this question I want to know how can I get the currentcellvalue before gridDataBoundGrid1.CurrentCell.ConfirmChanges() happen and after I select a new value,so I can compare the value I choose with the old data.
thanks.

>when I use columntype combobox ,how can I cancel the select value imediately after I select the value which already appear in other rows?




Administrator [Syncfusion]
Replied On November 29, 2007 05:49 AM

Here is a minimal sample that uses tableControlCurrentCellValidating to make sure your user never chooses a duplicate value in a combobox column.





WindowsApplication4.zip

Sean
Replied On November 29, 2007 05:55 AM

Thanks for your codes.My question is resolved.


Administrator [Syncfusion]
Replied On November 29, 2007 12:04 PM

Just for the record for anyone who might be trying to use this sample, I think the code that Inserts a new value should be changed to:

uniquesList.Insert(-(loc + 1), k);



Sean
Replied On November 29, 2007 09:06 PM

I attach a file that can resolve my problem and also control the rows number for no more than the items count in the dropdownlist.

willing it will help other people.



Test1.zip

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.

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.

;