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

[Solved] Hidden Columns

2 Answers 96 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gabe
Top achievements
Rank 1
Gabe asked on 28 Apr 2011, 04:51 PM
I have a client side bound grid and I want multple hidden columns.
If I have multiple hidden columns at the end of my grid, the columns are misaligned with the column headers.
If i just have a single hidden column at the end of my grid everything works...
How can I fix this, seems to happen in IE8 but if I turn on 'compatibility mode' the problem goes away...

Example:

This misaligns columns with their respective headers (Two or more hidden columns)

 columns.Bound(o => o.AssignedTo);
 columns.Bound(o => o.ResultLink).HtmlAttributes(new { id = "resultlink" }).Hidden(true);
 columns.Bound(o => o.MyId).HtmlAttributes(new { id = "myid" }).Hidden(true);
 columns.Bound(o => o.MyEvent).HtmlAttributes(new { id = "myevent" }).Hidden(true); 

This works perfect...(One hidden column)

 columns.Bound(o => o.AssignedTo);
 columns.Bound(o => o.MyEvent).HtmlAttributes(new { id = "myevent" }).Hidden(true); 

How can I fix this

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 28 Apr 2011, 04:58 PM
Hi Gabe,

 I think there is no need to use hidden columns in this case. The whole data item is available on the client side for each table row. Use it instead to retrieve the properties which are not displayed in the grid. To get the dataItem to which a certain table row is bound use the dataItem method.

Greetings,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
dgavarin
Top achievements
Rank 1
answered on 05 May 2011, 02:30 PM
dataItem not exist in select event !!!

Daniel,
Tags
Grid
Asked by
Gabe
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
dgavarin
Top achievements
Rank 1
Share this question
or