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

Some question about GridData Control

Thread ID:





93532 Mar 18,2010 12:57 PM UTC Mar 31,2010 07:05 PM UTC WPF 4
Tags: GridControl
Asked On March 18, 2010 12:57 PM UTC

I have some question about the GridData control, please see the attachment. Thanks
Best regards.

Some questin about GridData Control_3c6e601a.rar

Karthik Vishnu R [Syncfusion]
Replied On March 25, 2010 10:14 AM UTC

Hi J.T,

Regarding 1): By default Triangle icon is only rendered. In case if you want numbers to display, please create a DirectTrac instance. We will update you with a patch to suit your requirements.

Regarding 2): You can listen to CellClick event like below and move the current cell to FirstColumn.

dataGrid.CellClick += new GridCellClickEventHandler(dataGrid_CellClick);

void dataGrid_CellClick(object sender, GridCellClickEventArgs e)

Regarding 3): You can add selected cells using the following code.

this.dataGrid.Model.SelectedRanges.Add(GridRangeInfo.Cells(top, left, bottom, right));

Regarding 4): You can add URL's to cell content by defining a custom cell renderer or by creating a DataBoundTemplate.

Regarding 5):You can add sorting descriptions in code like below:

this.dataGrid.Model.View.SortDescriptions.Add(new System.ComponentModel.SortDescription() { Direction = System.ComponentModel.ListSortDirection.Ascending, PropertyName = "OrderID" });

For Multiple sort descriptions add multiple sort descriptors.

Let us know if you need more details.


Replied On March 30, 2010 12:33 PM UTC

Thanks very much for the respond

About Regarding 1:Sorry, Because our project is confidential,I can't provide our project. Is there any other solution?

Regarding 3: Please see the attachment

Regarding 4: I don't understand very clearly, Could you provide a sample, Thanks very much.

I have some new questions, please see the attachment

Best Regards,

Replied On March 30, 2010 12:34 PM UTC

Forget to add the Attachment


Karthik Vishnu R [Syncfusion]
Replied On March 31, 2010 07:05 PM UTC

Hi J.T,

Regarding 1). We do not require your project. By default Triangle icon is only rendered.If you want numbers to display please create a Direct Trac Incident. You can create it in the following location:


We will analyse the feasibility and update you.

Regarding 3) To move the focus use the following code snippet:


Regarding 4) Please download the following sample which illustrates the requirement


The sample also contains solution for New question 1

Regarding New Question 2)

You can listen to Resizing Column event and can set image margins.

Code Snippet:

this.dataGrid.ResizingColumns += new GridResizingColumnsEventHandler(dataGrid_ResizingColumns);

void dataGrid_ResizingColumns(object sender, GridResizingColumnsEventArgs args)
if (args.Columns.Left == colIdx)
//Add your code to adjust the image position as per the new width
//args.Width is the new width

Regarding New Question 3)

You can set columnwidths based on cell content by calling the following method:

this.dataGrid.Model.ResizeColumnsToFit(GridRangeInfo.Col(colIdx), GridResizeToFitOptions.None);



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