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

Some question about GridData Control

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



Some questin about GridData Control_3c6e601a.rar

4 Replies

KV Karthik Vishnu R Syncfusion Team 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)
{
this.dataGrid.Model.Grid.CurrentCell.MoveToLeftEnd();
}

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.

Regards,
Karthik




J. J.T 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,
J.T


J. J.T March 30, 2010 12:34 PM UTC

Forget to add the Attachment



Question_efa0f33f.rar


KV Karthik Vishnu R Syncfusion Team 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:

http://www.syncfusion.com/account/dashboard

We will analyse the feasibility and update you.

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

this.dataGrid.Model.Grid.CurrentCell.MoveTo(rowIdx,colIdx);


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

http://www.syncfusion.com/uploads/redirect.aspx?file=CS_5bb98a82.zip&team=development

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);


Regards,
Karthik

Loader.
Live Chat Icon For mobile
Up arrow icon