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

[Solved] Databinding expressions in GridBoundColumns

2 Answers 458 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 31 Aug 2009, 09:55 AM
Hi,

i want to set the HeaderText in a GridBoundColumn by a Databinding expression.

<telerik:GridBoundColumn DataField="Text" HeaderText='<%# MyAssembly.MyHeaderText %>' >

I got the following Exception:

Databinding expressions are only supported on objects that have a DataBinding event. Telerik.Web.UI.GridBoundColumn does not have a DataBinding event.

Can you help me? what is the best Practices to solve this Problem?

Best Regards
Thomas

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 31 Aug 2009, 11:52 AM
Hi Thomas,

I have found the following forum link which discusses a similar error. Go through it and see whether it shed some light on the above mentioned issue.
DataBinding expressions within a GridBoundColumn

Princy

0
Thomas
Top achievements
Rank 1
answered on 31 Aug 2009, 12:08 PM
Hi Princy,

thank you for your Reply! I have found this forum link too, but it doesn't solve the Problem. Sure, i can in access the Column in my Code:

RadGrid1.MasterTableView.GetColumnSafe("GridBoundColumnName").HeaderText = MyAssembly.MyHeaderText;

...but i think, this is NOT the Best Practise, to do it this way.

Best Regards
Thomas
Tags
Grid
Asked by
Thomas
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Thomas
Top achievements
Rank 1
Share this question
or