.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Styling WPF toolkit datagrid - HELP.

Posted By:      Posted Date: September 18, 2010    Points: 0   Category :WPF
I hope to find an answer on customizing Datagrid from WPF toolkit 2010. I'd like to add a TITLE area to be above DataGridColumnHeaderPresenter of the datagrid. The problem is that I want it to be as a user control or data template where I can populate the title from XML. I want to have unique titles for multiple datagrids on one page getting data from one XML.  I populate few datagrids in the same window. What will be the best solution to add customizable Tile area for a content populated from XML and bounded to each  datagrid to avoid dublication? Thank you in advance. I generate datagrid with columns this way: <Custom:DataGrid Grid.Column="0" Grid.Row="1" x:Name="ServerList" ItemsSource="{Binding Source={StaticResource PagesData}, XPath=ListTiles/Tile1}"> <Custom:DataGrid.Columns> <Custom:DataGridTextColumn Header="Name" Binding="{Binding XPath=@Name}" /> <Custom:DataGridTextColumn Header="Status" Binding="{Binding XPath=@Status}" /> <Custom:DataGridTextColumn Header="Events" Binding="{Binding XPath=@Events}" /> <Custom:DataGridTextColumn Header="Services" Binding="{Binding XPath=@Services}" /> </Custom:DataGrid.Columns> </Custom:DataGrid> <Custom:DataGrid x:Name="Events" Gri

View Complete Post

More Related Resource Links

Using the WPF Toolkit DataGrid

WPF comes with a large number of built in controls, but from the beginning it has lacked something that many application developers find extremely important - a DataGrid. You can use the ListView to create something approximating a DataGrid

WPF DataGrid (toolkit version) grouping and applying filter

I have a DataGrid that uses grouping.  There are 2 group levels.  The problem I am facing is when a filter is added to the DataGrid, the expanded groups are no longer expanded.  Everything collapses.  This is not desirable.  Does anyone know of a solution?  Thanks.

Key-Navigation with Wpf Toolkit DataGrid


Hello everybody

I d'like to navigate in the wpf datagrid with keys. That means, if i press B, it should navigate to the first entry, which contains a B in the first column (or better in the column, that is first sorted by). And if I type an I afterwards, it should navigate to the first entry containing BI and so on..
I don't think that the DataGrid gives an implemented solution...?
Does anyone has an idea?

Thanks for your help!

How to disable WPF Toolkit DataGrid cell RenderTransform on Select



I have customized wpf toolkit datagrid in my project. When selected datagrid cell are RenderTransform.ScaleX and ScaleY transformed. I want to disable this .

Any hint. I couldn't find anything googling.

Thank you in advance.


Best regards, Ana Danilovic

WPF toolkit DataGrid does not show new row with empty collection



I have exactly the same issue present on the post: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/cdc0fb6f-2335-42e2-98d7-4bd73ffffc8c

However, the answer is still unclear to me, confusing. So I would like to clarify what do I have to get the new blank row on the datagrid.

My custom collection is called PieceUIObjects (derived from ObservableCollection) containing PieceUIObject objects.

What do I have to change in my collection in order to properly "inform" the datagrid how my object is so that the new row is added on it when the collection is initialized with no elements?

Kindly Regards,


Software Developer and AI Enthusiast. www.twitter.com/ikondrasovas

Building a grouping Grid with GridView and ASP.NET AJAX toolkit CollapsiblePanel

I've posted an update to this post to apply on demand loading of Details data using ASP.NET AJAX PageMethods. I'm demonstrating the usage if CollapsiblePanelExtender client events on the new post. Check it out.

I admit, Matt Berseth is really inspiring me! Few days ago I pass through 2 of his great posts:

.Surrounding your Data Table and Dialog Controls with ComponentArt Styled Panels
.Building a Grouping Grid with the ASP.NET 3.5 LinqDataSource and ListView Controls
The first one is pure design tips one which I used for making good presentation of my demo here. The 2nd post is actually the idea.

jQuery: Styling DropDownList Alternating Items (Rows)

In the following example, I will show how you can style any asp:dropdownlist very easily.

The example demonstrates how you can change alternating row items background color, using the fadeTo() to add a nice touch in the dropdownlist. You can change alt rows with a couple lines.

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Use Jquery with repeater, gridview, datagrid

Before we talk about jquery inside any itemtemplate (repeater, gridview, datagrid), we need to understand the basic use of jquery functions

ListBox tricky to set in a DataGrid/GridView

Listboxes are very tricky to set selected items in grid - there is no real nice way to do it. It would have been great if Microsoft included a property that accepts an array or comma separated values - or anything! But they only allow each item in the list to be selected individually. The way to do this in a grid is a bit messy, but it is fairly simple to implement. When a row is created (as per the event), select the items of the listbox as per the datagrid source data:

How to highlight datagrid or GridView row on mouse over?

This article will show how you can Ajax with GridView to display popup messages when mouse moves over certain column. In the demo project I have added first column as an image column with a help icon in it. This kind of implements a feature that if you want more information about the row you can move mouse over this icon, a asynchronous request is sent to server for data about that row and when call returns the returned message is show as a popup message.

Multiple Column Dropdownlist for the ASP.NET DataGrid

Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.

A datagrid control that can be personalized... anyone??


Hello all,

I need a datagrid control that has following features, besides other regular stuff like paging, sorting, filtering, etc:

The user should be able to -

1. Select columns to view

2. Select column Sequence

3. Select default sort column

4. Store the setting (as a view) and use it on next visit.

5. llow multiple such views to be stored for a user for future use.

All these settings should be saved and when the user comes back he gets the same settings.

Really appreciate your time and would love to get any ideas.


- Zen

styling dropdownlist problem


Dear All,

im facing a problem while styling my ddl, what i did is:

<div><asp ropDownList ID="DropDownList1" runat="server" style="background-color:Transparent;" Width="100%">
    </asp: dropDownList></div>

<div class="stlGradient">
<asp ropDownList ID="DropDownList1" runat="server" style="background-color:Transparent;border:none;" Width="100%"></asp: dropDownList>

the DIV style is having a bg image repeated X.

now this worked on Firefox
on google Chrome: the border gone but the background still white
on IE 7: nothing happend

thanks for helping.

Where is SilverLight Toolkit in VS2010?


I read somewhere that MS has integrate SilverLight Toolkit into VS2010. Where is it? I can't find it under Toolbox.

VWDE 2010 Won't Install Ajax Control Toolkit on XP Pro


To my displeasure I cannot find VWD2005 which at one time would generate a complete web.config for Ajax so I downloaded and installed VWDE 2010 to a clean install of XP Pro.

I've created a new tab on the toolbar for the controls but after I select the Ajax dll to add the controls to the toolbar it grinds away and then goes poof and closes down the task leaving VWD look as if I had never even created the tab in the toolbar. 


Any advice here?



Dropdownlist Show the all PatientName and save the PatientID in the database and in datagrid showing the PatientID my requirement is that the PatientName show in DataGrid.

how to do ? 

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend