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.

ReadOnly grid doesn''t allow selection in the ComboCell

Thread ID:

Created:

Updated:

Platform:

Replies:

16786 Jul 23,2004 09:15 AM Jul 23,2004 10:53 AM Windows Forms 2
loading
Tags: GridControl
Tony John
Asked On July 23, 2004 09:15 AM

I have a read only GridControl. I am implementing the filter feature, so that user cna select items from a combo box and data will be filtered based on the selection in the combo. gridControl1.ColStyles[1].CellValueType = typeof(string); gridControl1[1, 1].CellType = "ComboBox"; gridControl1[1, 1].ChoiceList = GetNames(); gridControl1[1, 1].CellValue = "test"; //gridControl1[1, 1].ReadOnly = true; If I make the grid readonly, when the user select any item in the combo box and navigate away from the combo, the selection is not retained in the cell. Do I need to capture any event and set the Text of the combo cell explicitely ? (This issue occurs only if the grid is readonly.)

Administrator [Syncfusion]
Replied On July 23, 2004 09:46 AM

If you want to change the value of the combobox cell (and it sounds like you do), then you will have to turn off the ReadOnly for this cell. Is it that you want to force your users to select something from the combobox, and not let them arbitrary type values into the cell? If so, try setting style.DropDownStyle to exclusive to see if that will do what you want.

Tony John
Replied On July 23, 2004 10:53 AM

Thanks for the info. But it didn''t work for me if the grid itself is ReadOnly. So I had to do the following work around: Set grid.ReadOnly = false and make all other cells ReadOnly = true to avoid editing the cells by user. Thanks. >If you want to change the value of the combobox cell (and it sounds like you do), then you will have to turn off the ReadOnly for this cell. > >Is it that you want to force your users to select something from the combobox, and not let them arbitrary type values into the cell? If so, try setting style.DropDownStyle to exclusive to see if that will do what you want. >

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.

;