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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataBoundGrid LinkLabel cell

Thread ID:

Created:

Updated:

Platform:

Replies:

22050 Dec 2,2004 08:28 AM UTC Dec 2,2004 11:57 AM UTC WinForms 4
loading
Tags: GridControl
Iain
Asked On December 2, 2004 08:28 AM UTC

Hi there, I have a databound grid to which I have added to the GridBoundColumn collection an item of cellType LinkLabelCell. I set the mapping name and the hyperlink shows correctly within the grid. My problem is that I do not want to show the hyperlink text. I want something similar to the LinkLabelCells example: gridControl1(rowIndex, 2).CellType = "LinkLabelCell" gridControl1(rowIndex, 2).Text = "Windows Forms FAQ" gridControl1(rowIndex, 2).Tag = "http://www.syncfusion.com/FAQ/WinForms" whereby the label "Windows Forms FAQ" is shown and when clicked it goes to the hyperlink "http://www.syncfusion.com/FAQ/WinForms" Thanks Iain

Administrator [Syncfusion]
Replied On December 2, 2004 08:41 AM UTC

I thnk you will have to handle the grid.Model.QueryCellInfo event. In the handler, if e.RowIndex > 0 && e.ColIndex points to your linklabel column, then explicitly set e.Style.Text and e.Style.Tag to be what you want. You can probably use the initial setting of e.Style.Text to decide which link you need to put back into e.Style.Text and e.Style.Tag.

Iain
Replied On December 2, 2004 10:17 AM UTC

Hi, Thanks for the quick reply. It''s my 1st day working on the grid so I may have got things wrong but I can''t seem to find the grid.model.QueryCellInfo event. Does this exist on the DataBoundGrid? Thanks Iain >I thnk you will have to handle the grid.Model.QueryCellInfo event. In the handler, if e.RowIndex > 0 && e.ColIndex points to your linklabel column, then explicitly set e.Style.Text and e.Style.Tag to be what you want. You can probably use the initial setting of e.Style.Text to decide which link you need to put back into e.Style.Text and e.Style.Tag.

Administrator [Syncfusion]
Replied On December 2, 2004 11:37 AM UTC

Yes. It is a member of the Model object, not the grid directly. So, to subscribe to it you use, //C# this.grid.Model.QueryCellInfo += new GridQueryCellInfoEventHandler(model_QueryCellInfo); ''VB AddHandler Me.grid.Model.QueryCellInfo, addressof model_QueryCellInfo

Iain
Replied On December 2, 2004 11:57 AM UTC

Thanks... It works a treat

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

;