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.

Retrieve selected value from combobox before it is added to datagrid

Thread ID:

Created:

Updated:

Platform:

Replies:

40887 Feb 15,2006 03:40 PM Feb 16,2006 09:37 AM Windows Forms 3
loading
Tags: GridControl
Kingsley
Asked On February 15, 2006 03:40 PM

How do I retrieve selected value from combobox before it is added to GridDataBoundGrid control. My problem is as follows: I''m using combobox for one of the columns in a GridDataBoundGrid control. I have 2 tables in a dataset with tabel relation specified by PryKey1 in Table1 and ForeignKey2 in Table2. The combox is bound to Table1 with its MappingName set to PryKey1 of Table1. The StyleInfo.Dataset is bound to Table2 with its DisplayMember set to TblDescrp and ValueMember set to ForegnKey2. Everything works fine, except when I try to catch whatever is selected from the dropdown box in order to check if it already exist in Table1, I never seem to be able to do this.

Kingsley
Replied On February 15, 2006 04:19 PM

I have found a solution from the forum that allow me to access the selected value from the combobox. My question now is what event can I use to prevent the selected value from updating?

Administrator [Syncfusion]
Replied On February 16, 2006 05:52 AM

Hi Kingsley, You can use the CurrentCellCloseDropDown event, to check for the selected value before updating. In the event, you can use the GridComboxBoxCellRenderer to get the selected value. Also refer to this KB article How can I get the new value and the old value when an item is selected in a combobox cell? for more details. Regards, Madhan.

Kingsley
Replied On February 16, 2006 09:37 AM

Thanks Madhan, that was helpfull

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.

;