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

data text problem in RadGrid

2 Answers 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
bankey
Top achievements
Rank 1
bankey asked on 23 Jun 2008, 12:52 PM
i have a template column in rad grid Which have name like Subject

<Telerik:GridTemplateColumn  UniqueName ="Subject" >

<ItemTemplate >

<asp:Label runat ="server" ID="lblSubject" Text ='<%# Eval("Subject") %>'></asp:Label>

</ItemTemplate>

<EditItemTemplate >

<asp:TextBox runat ="server" ID ="txtSubject" MaxLength ="1000" Text ='<%# Eval("Subject") %>'></asp:TextBox>

</EditItemTemplate>

</Telerik:GridTemplateColumn>

here i set the txtSubject textbox property maxlenth in 1000 because it can have 1000 charecters

now in that case if i insert 1000 charector in textbox that it inserted succussfully but after this here is a lebel named lblSubject Which shows this Inserted Subject in the grid.
due this the Gui of grid is disturbed and it Stretched only in single line with taking all 1000 charectors.

So i want to know how to solving this wrap problem of data  to show in boundries of grid

2 Answers, 1 is accepted

Sort by
0
Greg
Top achievements
Rank 1
answered on 23 Jun 2008, 01:21 PM
Set the Width property to the required size in your label declaration.

<asp:Label runat ="server" ID="lblSubject" Text ='<%# Eval("Subject") %>' Width="40"></asp:Label>
0
Princy
Top achievements
Rank 2
answered on 24 Jun 2008, 05:55 AM
Hi Bankey,

I have found a forum link discussing a similar scenario. Go through it and see whether it is helpful.
Line Breaks in a label

Thanks
Princy.
Tags
Grid
Asked by
bankey
Top achievements
Rank 1
Answers by
Greg
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or