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

Retrieve selected value from combobox before it is added to datagrid

Thread ID:





40887 Feb 15,2006 08:40 PM UTC Feb 16,2006 02:37 PM UTC WinForms 3
Tags: GridControl
Asked On February 15, 2006 08:40 PM UTC

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.

Replied On February 15, 2006 09:19 PM UTC

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

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.

Replied On February 16, 2006 02:37 PM UTC

Thanks Madhan, that was helpfull


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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