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.
Syncfusion Feedback

Grid Combo Dispvalue & Dispmember different scenario

Thread ID:

Created:

Updated:

Platform:

Replies:

3121 Mar 4,2003 06:47 AM UTC Mar 5,2003 01:21 AM UTC WinForms 5
loading
Tags: GridControl
Rajaraman
Asked On March 4, 2003 06:47 AM UTC

Hi I am a having some different requirment in using GridCOmboBox with Items comes Fixed. For example, I am having a Dataset1, Datagrid1 I am having a Column1 which contains a Flag "F" or "K" or "M" which is there in dataset. Depending on the value in the dataset i want to show some value in the grid column. (which is available in the combo) Is it possible? That column has a Combo associated in the Column. While Selecting i can show (dispvalue)F for Flat(dispname) (dispvalue)K for Kernal(dispname) (dispvalue)M for Medium(dispname) If my requirment is not clear please let me know regs Rajaraman

Administrator [Syncfusion]
Replied On March 4, 2003 08:31 AM UTC

The column with the combobox is another column in the same row. Correct? If you handle the PrepareViewStyleInfo event you can specify at runtime the DataSource for the other column that is depending on first column's value. Stefan

Administrator [Syncfusion]
Replied On March 4, 2003 08:36 AM UTC

Actually, it is better to handle the QueryCellInfo event. Not PrepareViewStyleInfo. This is safer in that specific case. Let me know if you have problems. Stefan

Rajaraman
Replied On March 4, 2003 10:26 AM UTC

hi i have attached the screen shot, costtype column having a Combo, but is stored in the database as "F", "U", so if i set the dataset to grid, it shows only "F", i want to show "Flat" for "F" am i clear ? regards rajaraman

Administrator [Syncfusion]
Replied On March 4, 2003 12:31 PM UTC

Try this. Create a class named MyValue with two public properties DispValue and DispName. Then create an ArrayList holding three of these MyValue objects, with the values you want them to have. Then for the column, have code similar to this: GridBoundColumn.StyleInfo.DataSource = arrayList; GridBoundColumn.StyleInfo.CellType = "ComboBox" GridBoundColumn.StyleInfo.DisplayMember = "DispName"; GridBoundColumn.StyleInfo.ValueMember = "DispValue";

Rajaraman
Replied On March 5, 2003 01:21 AM UTC

Thanks got it working Regards Rajaraman

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

;