tags:

views:

182

answers:

2

Hi guys, i am converting some asp.net controls to silverlight. Is there something similiar to asp.net EditItemTemplate in DataGrid or listBox?

A: 

With the DataGrid you will have control over the Item and the EditingItem. Check this series of DataGrid related posts on my blog:

smoura
Thanks for your reply, i will review your links shortly
Igor Pistolyaka
Many of the principles are the same but these WPF examples use techniques not available in Silverlight
AnthonyWJones
True... It is not boiler plate code that one can copy / paste. Adapting it to Silverlight should not be a problem though.
smoura
A: 

Edit templating in the Silverlight DataGrid is performed at the cell level. If the DataGrid default choices are not what you need then you need to use the DataGridTemplateColumn and define both a CellTemplate and a CellEditingTemplate.

The ListBox does not support the context of an "edit mode" however you can supply an ItemTemplate which contains control such as TextBox which will allow editing of the underlying data.

AnthonyWJones
Thanks, i will look at CellEditingTemplate
Igor Pistolyaka