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

Creating a link label for a column style

How would i go about creating a column with the link label look and feel and also have the functionality of the the click method of a link label. I'm using the databound grid. I have already build the linklabel in the .Net system grid but do not know how to go about it in syncfusion grids. Thanks for any help.

3 Replies

AD Administrator Syncfusion Team November 11, 2002 06:21 PM UTC

Take a look at the DerivedCellControl Tutorial sample that ships with Essential Grid. It derives a LinkLabel.

SB Soung Bae November 11, 2002 07:13 PM UTC

Thanks Clay. I have noticed that the sample adds the linklable to each individual cell. I need to add the linklable to the whole column depending on the column header text which I got using grdResults.Model.NameToColIndex("Case Number"). Is there an easy way to add the linklable to a whole column? Thanks again. Soung

AD Administrator Syncfusion Team November 12, 2002 11:15 AM UTC

In your databound grid, if you want column 2 to be a column of links, then try: this.gridDataBoundGrid1.Model.CellModels.Add("LinkLabel", new GridLinkLabel.LinkLabelCellModel(this.gridDataBoundGrid1.Model)); this.gridDataBoundGrid1.Binder.InternalColumns[1].StyleInfo.CellType = "LinkLabel"; You also probably want to change the line in the control code to launch the style.Text directly, instead of using style.Tag, since this will not be set by database binding. process.StartInfo.Arguments = (string) style.Text;

Live Chat Icon For mobile
Up arrow icon