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
close icon

Web GridGroupingControl nested table hyperlinks

How do I set/format cells in nested tables as hyperlinks for the Web GridGroupingControl?

2 Replies

AD Administrator Syncfusion Team June 7, 2006 09:16 AM UTC

Hi Dana, You can use ''ItemTemplates'' for any required cells of any columns to be a hyperlink control to acheive this behavior. The best approach is to apply ''Templates through code'' for the nested tables. I have attached the modified ''HierarchySample'' that ships with our ''EssentialGrid'' install to illustrate setting some of the cells in nested tables as hyperlinks Hierarchy_NestedTemplat es_Hyperlink.zip Configuring the Grid: --------------------- 1) QueryCellStyleInfo event is handled and here we do the below steps inside this event only if the TableCellType is AlternateRecordFieldCell and RecordFieldCell 2)Check for the column name that has to be given as a hyperlink column Eg. if(e.TableCellIdentity.Column.Name=="CustomerID")// consider you have to give the text''s in ''CustomerID'' column to be hyperlink 3) Get the GridTableDescriptor of the nested table. Eg code: GridTableDescriptor childDescriptor = (GridTableDescriptor)this.GridGroupingControl1.Table.RelatedTables["Orders"].ParentTableDescriptor;//Consider the nested tables descriptor name is ''Orders'' 4)Create templates programatically using a template class(this class should be inherited from ITemplate, see attached sample) Eg code: TemplateClass tc = new TemplateClass(hlink);//Consider ''hlink'' is the hyperlink control 5) Apply ItemTemplate to the desired column with the template created above. Eg code: childDescriptor.Columns.FindByMappingName("CustomerID").ItemTemplate= tc; Note: I have attached the whidbey sample and the Data folder is pointing to syncfusion virtual directory. The approach to acheive the behavior is same in Vs.Net2003. To get an quick response, it is better to post your WebGrid related queries to web grid forums let me know if you have any queries. Best Regards, A.Sivakumar


AD Administrator Syncfusion Team June 7, 2006 09:18 AM UTC

Hi Dana, Sorry for the broken link Hierarchy_NestedTemplates_Hyperlink.zip Thanks, A.Sivakumar.

Loader.
Live Chat Icon For mobile
Up arrow icon