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

GridGroupingControl CellType

Thread ID:




33787 Aug 26,2005 05:55 AM UTC General Discussion 0
Tags: General Discussion
Asked On August 26, 2005 05:55 AM UTC

Hi. I have a text column in my DataTable and I need display this column values different ways depend upon a correspond values in another column. So I try this: private void gridGroupingControl1_QueryCellStyleInfo( object sender, GridTableCellStyleInfoEventArgs e ) { if ( e.TableCellIdentity.Column != null && e.TableCellIdentity.DisplayElement.Kind == DisplayElementKind.Record && e.TableCellIdentity.Column.Name == "Value" ) { DataRowView row = (DataRowView)e.TableCellIdentity.DisplayElement.GetData(); switch ( (Byte)row["ValueType"] ) { case 2 : e.Style.CellValueType = typeof(DateTime); e.Style.CellType = "MonthCalendar"; break; case 3 : e.Style.CellValueType = typeof(int); e.Style.CellType = "ComboBox"; e.Style.ExclusiveChoiceList = true; e.Style.DisplayMember = "Text"; e.Style.ValueMember = "Id"; e.Style.DataSource = MyListItem.GetDataSource(); break; default: e.Style.CellType = "TextBox"; break; } e.Handled = true; } } It''s work normal when I click in combo-cell (case 3). But when I leave my combo-cell it displays empty value.


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