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. Image for the cookie policy date
close icon

ggc combobox cell

I am using syncfusion ggc. There are 2 columns "ColA","ColB".
ColA has combox cell with 2 fields "Enable" and "Disable"
ColB is editable cell with AutoComplete option.
When i open combobox of "ColA" and don't close it and click on "ColB" then my combobox
values gets replaced with "ColB" selected values.

I have attached a screenshot for refrence.

Now the Col[Enabled] combobox should have "Enabled" and "Disabled" option but if i don't close my combobox and click to the next cell the combobox values changes to next cell values ie Col[type] values which is "None"

I want that combobox values should not change.

I will be v thankfull if anyone could help me in this.



ErrorInSyncfusionGGC.zip

3 Replies

HA haneefm Syncfusion Team December 4, 2007 06:50 PM UTC

Hi Prabhjeet,

Please try calling the EndEdit method in TableControlCurrentCellCloseDropDown event and let me know if this helps.

void gridGroupingControl1_TableControlCurrentCellCloseDropDown(object sender, GridTableControlPopupClosedEventArgs e)
{
e.TableControl.CurrentCell.EndEdit();
e.TableControl.Table.TableDirty = true;
e.TableControl.Table.EndEdit();
}

Best regards,
Haneef



AB abc December 5, 2007 05:59 AM UTC

hi haneef,

thanks for a quick reply, but this is not working.
See this cannot work because the problem is that i have not closed the dropdown and i have clicked to another cell and the dropdown value gets changed to the another cell clicked value.

i will be v thankfull if u could give me a solution for this.

>Hi Prabhjeet,

Please try calling the EndEdit method in TableControlCurrentCellCloseDropDown event and let me know if this helps.

void gridGroupingControl1_TableControlCurrentCellCloseDropDown(object sender, GridTableControlPopupClosedEventArgs e)
{
e.TableControl.CurrentCell.EndEdit();
e.TableControl.Table.TableDirty = true;
e.TableControl.Table.EndEdit();
}

Best regards,
Haneef





AD Administrator Syncfusion Team December 5, 2007 11:55 AM UTC

Here is a sample that has a combobox in the first column. If the value in the first column is "Disabled", then rest of the row is disabled and cannot be clicked or changed. If the value is the first column is enabled, then the rest of that row can be edited.

The sample uses QueryCellStyleInfo to dynamically set style.Enabled as required for all values in the row. It uses TableControlCellMouseDown to force the dropdown to close if you click a disabled cell while the combobox is dropped. In TableControlCurrentCellCloseDropDown, it forces the values to be save immediately so you do not need to move off the row to see the change.



WindowsApplication14_2.zip

Loader.
Live Chat Icon For mobile
Up arrow icon