Welcome Guest Search | Active Topics | Sign In | Register

Dynamic create custom column. Options
Alvin Sinha
Posted: Wednesday, June 17, 2009 1:04:49 PM
Rank: Member
Groups: Member

Joined: 2/24/2009
Posts: 16
Hi,

i am trying to create dynamic custom column and add drop down to EditorTemplate. Is this possible to get any example or sample code how to do that. Any help will be highly appreciated.

I tried doing but did not succeed.

Dim column As New EO.Web.CustomColumn()

Don't know what to do next.. :)

Thanks,
Alvin
eo_support
Posted: Wednesday, June 17, 2009 1:12:42 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

It will be easier for you if you just create the column at design time and then dynamically set the column's Visible to true/false. Dynamically creating custom column requires you to dynamically create an ITemplate object. This is a rather advanced ASP.NET topic and we are not in a position to guide you through it if you are not already familiar with it.

Thanks!
Alvin Sinha
Posted: Wednesday, June 17, 2009 1:48:57 PM
Rank: Member
Groups: Member

Joined: 2/24/2009
Posts: 16
Hi,

My requirement is to create column dynamically. As user has option to select column, column order and grid will bind those column in selected order. I already implemented same for the asp.net GridView. But i am not aware of this control. Is any documentation available where i can take a look of implementation.

Thanks,
Alvin
eo_support
Posted: Wednesday, June 17, 2009 2:11:59 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Alvin,

Unfortunately we do not have any documenation covering this, you may want to search online for that. The issue at here is not how to create a custom column, it is how to create an ITemplate because in order for a CustomItem to be useful, you need to initialize its EditorTemplate property, which is an ITemplate object --- That's pretty much as far as our support can go on this. Creating an ITemplate is a generic ASP.NET programming issue, so our support will not be able to cover that.

Thanks!
Alvin Sinha
Posted: Thursday, June 18, 2009 6:33:51 AM
Rank: Member
Groups: Member

Joined: 2/24/2009
Posts: 16
Thanks for your quick response.

Will you please give me the interface name that i can use to create dynamic template. System.Web.UI.ITemplate is not supported with EO grid as for ASP.NET gridview code will be like this "Public Sub InstantiateIn(ByVal container As System.Web.UI.Control) Implements ITemplate.InstantiateIn" but for EO gird we need to change it to EO.Web.WebControl. I need only basic info as i alreday implemented the same for normal asp.net gridview.

Thanks,
Alvin
eo_support
Posted: Thursday, June 18, 2009 7:02:05 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You will need to create your own object that implements ITemplate and then pass that object to the GridColumn's EditorTemplate property. The implementation has nothing to do with the Grid or whatever.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.