Link to home
Start Free TrialLog in
Avatar of rutledgj
rutledgj

asked on

asp gridview - limiting cell width

I have a gridview that I'm trying to limit the width of a column. I'm using this  code to set the width:

<asp:TemplateField HeaderText="Note"  >
                                 <EditItemTemplate>
                                     <asp:Label ID="Label1" width="100px" runat="server" Text='<%# Eval("note") %>'></asp:Label>
                                 </EditItemTemplate>
                                 <ItemTemplate>
                                     <asp:Label ID="Label1" width="100px" runat="server" Text='<%# Bind("note") %>'></asp:Label>
                                 </ItemTemplate>
                                 <ItemStyle Width="100px" Wrap="False" />
                             </asp:TemplateField>

The result is the cell is only 100px but the data is full length and extends into the adjoining column.  

My goal is to only display a short amount of text and when the user clicks on the cell a popup window will open displaying the entire contents.

Any suggestions?
Avatar of Rajar Ahmed
Rajar Ahmed
Flag of India image

do u mean that the content doesnot have spaces ?

Like this ?
"abcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdefabcdef"
Avatar of rutledgj
rutledgj

ASKER

No. There is a lot of text that is in the column. I just want to display a small portion of it (controlled by the column width) and when the cell is clicked I want a popup window to display the entire contents.
ASKER CERTIFIED SOLUTION
Avatar of Rajar Ahmed
Rajar Ahmed
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial