EditItemTemplate in silverlight gridview - silverlight

I am converting some ASP.Net controls to Silverlight. Is there something similar to ASP.Net's EditItemTemplate in Silverlight's DataGrid or ListBox?

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.

With the DataGrid you will have control over the Item and the EditingItem. Check this series of DataGrid related posts on my blog:
WPF Toolkit DataGrid, Part I – Introduction
WPF Toolkit DataGrid, Part II – Custom Styling
WPF Toolkit DataGrid, Part III – Playing with Columns and Cells
WPF Toolkit DataGrid, Part IV: TemplateColumns and Row Grouping

Related

WPF Datagrid cell tooltip

I have a WPF 4.0 DataGrid displaying data from a LINQ to Entities query. The query returns an anonymous list so the DataGrid has its AutoGenerateColumns property set to true.
How can I display ToolTips for the column cells?
You should probably do this in the column's style. If you want to choose the style at runtime, you can subscribe to the AutoGeneratingColumn event, and customize the column as you like...
Here is a link from on MSDN with a very good tutorial on Customizing AutoGenerated Columns

wpf datagrid.How to Merge or group cells..?

I am trying to Merge cells in WPF toolkit datagrid .I am trying to do something as shown in the image below.We can do this in Winforms datagrid.But how to do this using WPF toolkit datagrid ?.Or is there any alternative controls..?
Can we do this using listview or listbox..?
Or is there any free controls available which have this functionality ?

WPF - Adding a Rowheader to a ListView Grid View

I need to add a rowheader to a Listview GridView. it needs to act like a datagrid rowheader, sop it should be freezable.
is thsi possible? can anyone show me some source code to do this?
Thanks
The GridView do not have rowheaders but you can style the first column differently than the rest. Implementing freezing will require some innovative use of a scrollviewer. Can't you just use the DataGrid which has RowHeaders?
DataGrid Class

How to reorder WPF Toolkit datagrid colums programmatically?

My application uses the WPF DataGrid control with custom columns. Although the property Columns is an ObservableCollection<>, the invocation of the method Move does not effect the order of the columns in any way.
Can I somehow reorder the columns of a WPF Toolkit DataGrid programmatically?
Best Regards
Oliver Hanappi
You can use the DisplayIndex property of a DataGridColumn (use datagrid.Columns to retrieve the columns collection).

WPF Listview

How to create a GridView like view to the WPF ListView if i dont know the Column names at the design time because the collection will be created at runtime and the collection will be of type DataTable and it may contain a no.of columns.I can do it with WPF DataGrid but i want to achieve this with WPF ListView and I want to Achieve this without code behind.
You can add columns dynamically to a ListView by using Attached Properties. Check out this article on the CodeProject it explains exactly that...
WPF DynamicListView - Binding to a DataMatrix

Resources