Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Dynamically add Template Column for Datagrid in webpart

  Asked By: Fallon    Date: Feb 07    Category: Sharepoint    Views: 1608

I need to add Template column dynamically to datagrid in my webpart.
I am getting an error like TemplateColumn.ItemTemplate as NULL
Exception...Here is my code.

ProjectGrid.ItemDataBound += new
DataGridItemEventHandler(ProjectGrid_ItemDataBound);
TemplateColumn TempCol = new TemplateColumn();
Innerpan = new Panel();
Innerpan.ID = "innerpanel";
TempCol.ItemTemplate.InstantiateIn(Innerpan);


TempCol.ItemTemplate is Null in the above code.
"It may not be correct approach to add Template Column to DataGrid".

Please help me out and Give me different approach to ADD Template
Column.

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Dynamically add Template Column for Datagrid in webpart Or get search suggestion and latest updates.




Tagged: