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

ShowAddNewRow with ComboBox column

Hi,

I have a GridDataControl in which I display the add new row and I have a column which is a ComboBox fed with an ObjectDataProvider. The grid works well but I'd like to allow the user to add new rows with the ShowAddNewRow.

How to display the column as a ComboBox in the AddNewRow to allow the user to choose one of the listed elements in the ComboBox?




SelectedValue="{Binding Path=CellBoundValue.Id,Mode=TwoWay}"
ItemsSource="{Binding Source={StaticResource allPeriodes}, Path=Periodes}" SelectedValuePath="Periode.Id">











3 Replies

MS Mohamed Suhaib Fahad A. Syncfusion Team February 9, 2010 11:58 AM UTC

Hi Francois,

We need to do some source changes to enable this, Can you please create a Direct Trac incident with the Forum title as its "Title".

Thanks,
Fahad


FM Francois Madore February 9, 2010 02:43 PM UTC

Ok, I'll add it in Direct Track, is it long to have an update.

Meanwhile, I've added a ToString function on my object and the AddRow displays my object "correctly" but when I choose an item, it seems to be invalid. Does the grid view sees it as a String cause ToString has been called? I thought the ToString is just used for graphic representatiuon but the selected item is an instance of my custom object... right?


MS Mohamed Suhaib Fahad A. Syncfusion Team February 11, 2010 12:13 PM UTC

Hi Francois,

Yes, internally Grid would convert the CellValue object with ToString() call, this would be specific to different CellTypes, Say if you have a Static / TextBox CellType, the ToString() will convert that to a string and render it.

Thanks,
Fahad

Loader.
Live Chat Icon For mobile
Up arrow icon