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

Item Templates

Hello, I would like to add an ItemTemplate, add controls to it and it to the GridGroupingControl Programatically without any Design View clicks Thank you for your help

5 Replies

AD Administrator Syncfusion Team March 8, 2006 04:20 PM UTC

Hi Driss, We are looking on this. We will get back to you regarding this shortly Regards, A.Sivakumar


DS Driss Selhoum March 17, 2006 09:01 AM UTC

Hi, I have found a way to add a Template Column programatically, if you are interested please let me know and I will be sending you the code to accomplish such Tasks Driss


AD Administrator Syncfusion Team March 17, 2006 02:25 PM UTC

Driss, Yes, we would very much like to see the sample. Unfortunately, we were not able to find any solution for this ourself. We apologize for not updating you. Regards, Praveen Ramesh


DS Driss Selhoum March 17, 2006 03:45 PM UTC

the first thing I did is create a Class that inherits from a System.Web.UI.Webcontrols.CheckBox, or any other Control Class depending on what Item Template you''d like. This class, Let''s call it TemplateCheckBox also inherits from the ITemplate Interface, therfore the Template checkBox class must implement a method called InstantiateIn. Once you have the class, you can add this code to wherever you have you GridGroupingControl Instantiated: TemplateCheckBox TaskChkBox = new TemplateCheckBox("TasksChkBox"); GridColumnDescriptor ChildGridColumnDescriptor = ChildTableDescriptor.Columns.FindByMappingName("Select"); ChildTableDescriptor.Columns.FindByMappingName("Select").HeaderText = " "; ChildGridColumnDescriptor.ItemTemplate = TaskChkBox; Voila, Hope it works for you.


AD Administrator Syncfusion Team March 23, 2006 10:00 AM UTC

Hi Driss, Thanks ,It works. Thanks, A.Sivakumar

Loader.
Live Chat Icon For mobile
Up arrow icon