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

ShowAddNewRow and Enums

Thread ID:





92895 Feb 10,2010 09:48 PM UTC Feb 11,2010 12:11 PM UTC WPF 1
Tags: GridControl
Francois Madore
Asked On February 10, 2010 09:48 PM UTC


In the show AddNewRow, I have a cell which type is an enum "MyEnum" and I'd like the user to be able to choose an enum value in the cell. So is it possible by doing this?

lstNotes.VisibleColumns[2].ColumnStyle.ItemsSource = Enum.GetValues(typeof(NoteDestinationTypeEnum));

Is it supported by GridDataControl? Actuallyu when I fill the three cells, there is no item created.


ItemsSource="{Binding Source={StaticResource allNotes}, Path=Notes}">

Mohamed Suhaib Fahad A. [Syncfusion]
Replied On February 11, 2010 12:11 PM UTC

Hi Francois,

Use the Model.QueryCellInfo event handler to change the CellType for the AddNewRow,

void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
var gridStyle = e.Style as GridDataStyleInfo;
if (gridStyle.CellIdentity.TableCellType == GridDataTableCellType.AddNewRecordCell)
if (gridStyle.CellIdentity.Column != null && gridStyle.CellIdentity.Column.MappingName == "CustomerID")
gridStyle.CellType = "ComboBox";
e.Handled = true;

The VisibleColumn.ColumnStyle only applies to the Record cells. AddNewRow may require a separate property like AddNewRowStyle, Please let us know if you need any more details.



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