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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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 07:40 AM UTC Nov 30,2007 02:06 AM UTC WinForms 5
loading
Tags: GridControl
Sean
Asked On November 29, 2007 07:40 AM UTC

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 09:53 AM UTC

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 10:49 AM UTC

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 10:55 AM UTC

Thanks for your codes.My question is resolved.


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

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 30, 2007 02:06 AM UTC

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.

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

;