Skip to main content
added 8 characters in body
Source Link
ar.gorgin
  • 1.2k
  • 8
  • 31
  • 56

I have a web part with SPGridView. I defined TemplateField for SPGridView.

 TemplateField tmp = new TemplateField();
 tmp.HeaderText = field.Title;
 tmp.ItemTemplate = new AddTemplateToGridView(ListItemType.Header, field.InternalName);
 grid.Columns.Add(tmp);

when load page, all data display , but when filter or sort a column , don't display item in template field.

I have a web part with SPGridView. I defined TemplateField for SPGridView.

 TemplateField tmp = new TemplateField();
 tmp.HeaderText = field.Title;
 tmp.ItemTemplate = new AddTemplateToGridView(ListItemType.Header, field.InternalName);
 grid.Columns.Add(tmp);

when load page, all data display , but when filter a column , don't display item in template field.

I have a web part with SPGridView. I defined TemplateField for SPGridView.

 TemplateField tmp = new TemplateField();
 tmp.HeaderText = field.Title;
 tmp.ItemTemplate = new AddTemplateToGridView(ListItemType.Header, field.InternalName);
 grid.Columns.Add(tmp);

when load page, all data display , but when filter or sort a column , don't display item in template field.

Source Link
ar.gorgin
  • 1.2k
  • 8
  • 31
  • 56

Don't display template field of SPGridView in filtering!

I have a web part with SPGridView. I defined TemplateField for SPGridView.

 TemplateField tmp = new TemplateField();
 tmp.HeaderText = field.Title;
 tmp.ItemTemplate = new AddTemplateToGridView(ListItemType.Header, field.InternalName);
 grid.Columns.Add(tmp);

when load page, all data display , but when filter a column , don't display item in template field.