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

Accessing invisible column data from clientside

1 Answer 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Meenakshi Nagalingam
Top achievements
Rank 1
Meenakshi Nagalingam asked on 30 Jun 2010, 11:32 AM

Hi,

I am using RadGrid of version "2009.2.701.35". I need have some 5 to 7 columns as invisible columns.  My template column goes like this:
<telerik:GridTemplateColumn HeaderText="" UniqueName="colAttributeId" DataField="AttributeId" ItemStyle-Width="0px" HeaderStyle-Width="0px">
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" />
<ItemTemplate><asp:Label ID="lblAttributeId" runat="server" Text='<%# Bind("AttributeId") %>'></asp:Label></ItemTemplate>
</telerik:GridTemplateColumn>

 

But in the screen the borders are getting displayed (which we want to avoid). Please see the screenshot attached.

We want to access those data from clientside. If we made the column's visible property as 'False' means we couldnt access those data from clientside javascript code. So we specified the width as "0px".

I tried even setting the border's to 0px, it shows an empty space.
<HeaderStyle BorderStyle="None" BorderWidth="0px" />
<ItemStyle BorderStyle="None" BorderWidth="0px" />

If anyone know how to access the invisible column's data from client-side pls share with me.

Thanks in advance.

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 30 Jun 2010, 01:05 PM
Hello Meenkshi,

Try setting Display property instead of Visible and see whether it helps.

[Display property indicates whether the cells corresponding to a column should be rendered with a 'display:none' style attribute. Visible property is useful if you do not want to show/hide a column or completely prevent cells from rendering, server-side. ]

-Shinu.
Tags
Grid
Asked by
Meenakshi Nagalingam
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or