This is a migrated thread and some comments may be shown as answers.

Change Headertext programmatically

3 Answers 75 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Viktor Takacs
Top achievements
Rank 2
Viktor Takacs asked on 11 Jul 2011, 03:57 PM
HI,
I am trying to set the HeaderText property of the columns in a RadTreeList, however, it doesn't seem to respond to the following command:
tlCategories.Columns[0].HeaderText = common.RM.GetString("ctName");

The column's header stays empty.
If I use the HeaderText attribute in the aspx file it displays it correctly.

I am back to a previous issue I encountered with a GridView. Are these related? Any way around it?

By the way: the localization example on your deom site doesn't work at all: it fails to display localized resources and when I click on the related files link it gives me a no access error...

Any pointers would be greatly appreciated!

3 Answers, 1 is accepted

Sort by
0
Viktor Takacs
Top achievements
Rank 2
answered on 11 Jul 2011, 04:08 PM
HI,

I think I spoke a bit too fast... sorry about that....
It does display something in the header, but according to the Culture. So the same issue happens as with the DataGrid.
thanks
0
Accepted
Iana Tsolova
Telerik team
answered on 14 Jul 2011, 09:37 AM
Hi Viktor,

The best way to access a column in RadTreeList is to use its UniqueName:
tlCategories.Columns["Column_UniqueName_here"].HeaderText = common.RM.GetString("ctName");

For more information, you can check the below articles:
http://www.telerik.com/help/aspnet-ajax/treelist-column-types.html
http://www.telerik.com/help/aspnet-ajax/treelist-accessing-items.html

Regarding the mentioned demo: can you check it now and let me know if you find any issues? The broken link should be already fixed.

Kind regards,
Iana
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Viktor Takacs
Top achievements
Rank 2
answered on 14 Jul 2011, 09:46 AM
Hi Iana,

yes, that was it - they all seem to work now.thanks again for the quick reply!

viktor
Tags
TreeList
Asked by
Viktor Takacs
Top achievements
Rank 2
Answers by
Viktor Takacs
Top achievements
Rank 2
Iana Tsolova
Telerik team
Share this question
or