ASPX templates
Version 5.x > ASPX templates > CustomTableDataGrid Select Certain Columns & Format Header Row View modes: 
User avatar
Member
Member
eric.rovtar-hudsonchapel - 9/11/2010 1:32:57 PM
   
CustomTableDataGrid Select Certain Columns & Format Header Row
I can seem to find a way to select certain columns using the CustomTableDataGrid. I've tried using the ColumnsSelector property, but any value other than empty returns an error:

<cms:CMSCustomTableDataGrid ID="cmsPodcasts" 
CustomTable="customtable.podcasts"
ShowHeader="true"
EnableSorting="true"
AllowSorting="true"
UseUpdatePanel="true"
ZeroRowsText="Sorry, there were no podcasts found."
ColumnsSelector=""
runat="server" />


Also, is there a way to set how the Header Row is formatted? Why isn't it using the th element? I know I can customize the web part, but I'd like to avoid doing that if possible and use what's already implemented.

Thanks!

-Eric

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 9/24/2010 6:19:41 AM
   
RE:CustomTableDataGrid Select Certain Columns & Format Header Row
Hi,

to display only requested columns you can set SelectedColumns property in the CMSCustomTableDataGrid control:

SelectedColumns="columnName1;columnName2"

Among properties of this control you can find:
Item* properties for setting design of items.
Header* properties for setting design of header.

Best regards,
Ivana Tomanickova