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

create dynamically a linkButton Column

Thread ID:

Created:

Updated:

Platform:

Replies:

103498 May 8,2012 05:40 AM UTC Sep 11,2012 12:30 PM UTC ASP.NET Web Forms (Classic) 4
loading
Tags: Grouping
jone
Asked On May 8, 2012 05:40 AM UTC

http://,,,,

jone
Replied On May 10, 2012 10:37 AM UTC

Hello,

I have a GridGrouping Control.

my grid is created in the markup code.

but the child grid is created dynamically.

how can i make one of the columns to be a linkButton column?

and which event is there when i click one link (one cell)?

 

thanks in advance

waiting for an answer, jone

 


Jeya Preetha M [Syncfusion]
Replied On May 15, 2012 11:14 AM UTC

Hi Jone,

Thanks for your interest in Syncfusion products.

Please refer the following code which explains parent child relation with two table. Make use of this code in your application accordingly.

<code>

DataTable parentTable = GetParentTable();

DataTable childTable = GetChildTable();

DataTable grandChildTable = GetGrandChildTable();

// Manually specify relations in grouping engine. The DataSet does not need to have any DataRelations.

GridRelationDescriptor parentToChildRelationDescriptor = new GridRelationDescriptor();

parentToChildRelationDescriptor.ChildTableName = "MyChildTable"; parentToChildRelationDescriptor.RelationKind = RelationKind.RelatedMasterDetails;

parentToChildRelationDescriptor.RelationKeys.Add("parentID", "ParentID");

// Add relation to ParentTable

gridGroupingControl1.TableDescriptor.Relations.Add(parentToChildRelationDescriptor);

GridRelationDescriptor childToGrandChildRelationDescriptor = new GridRelationDescriptor();

childToGrandChildRelationDescriptor.ChildTableName = "MyGrandChildTable"; childToGrandChildRelationDescriptor.RelationKind = RelationKind.RelatedMasterDetails;

childToGrandChildRelationDescriptor.RelationKeys.Add("childID", "ChildID");

// Add relation to ChildTable

parentToChildRelationDescriptor.ChildTableDescriptor.Relations.Add(childToGrandChildRelationDescriptor);

// Register any DataTable/IList with SourceListSet, so that RelationDescriptor can resolve the name

this.gridGroupingControl1.Engine.SourceListSet.Add("MyParentTable", parentTable);

this.gridGroupingControl1.Engine.SourceListSet.Add("MyChildTable", childTable);

this.gridGroupingControl1.Engine.SourceListSet.Add("MyGrandChildTable", grandChildTable);

this.gridGroupingControl1.DataSource = parentTable;

Please let me know if this helps you.

Regards,
Jeya Preetha M


jone
Replied On September 11, 2012 07:31 AM UTC

hello,

thank you for your answer.

that is what i did, and it works,

but i cant make a column to be a link.

how can do that?


Kalaiarasan B [Syncfusion]
Replied On September 11, 2012 12:30 PM UTC

Hi Jone,

By default you can’t set a celltype for GridGroupingControl as LinkLabel, but you can achieve it by creating a custom renderer and assign it to the Grid.

Please make use the custom renderer in the below link and include it in the Grid’s CellModels and assign it as celltype for the columns.

 

http://www.syncfusion.com/downloads/Support/DirectTrac/98078/LinkLabelCell-1466590518.zip

Here is the code to assign the custom cell as celltype for a specific column

this.gridGroupingControl1.TableModel.CellModels.Add("LinkLabel",new LinkLabelCellModel(this.gridGroupingControl1.TableModel));

this.gridGroupingControl1.TableDescriptor.Columns[Column name].Appearance.AnyRecordFieldCell.CellType = "LinkLabel";

Please let me know if you have any concerns

Regards,

Kalai


CONFIRMATION

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.

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

;