template column in datagrid
i ve template column in datagrid
<asp:TemplateColumn SortExpression="url_desc" HeaderText="Description">
<ItemStyle HorizontalAlign="Left" Width="20%"></ItemStyle>
<ItemTemplate>
<asp:Label id=lblDesc Width="70" BorderStyle="None" Runat="server" text='<%#Container.DataItem("url_desc")%>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox id=txt_Desc runat="server" Width="160px" TextMode="MultiLine" Rows="4" Text='<%#Container.DataItem("url_desc")%>'>
</asp:TextBox>
<asp:CustomValidator id="vld_txtDesc" Runat="server" ClientValidationFunction="fn_maxLength" ControlToValidate="txt_Desc"
Display="None" ErrorMessage="Description cannot exceed more than 250 characters"></asp:CustomValidator>
</EditItemTemplate>
</asp:TemplateColumn>
but when the text on this lable "lblDesc" has more length then the datagrid is getting expanded.
i don't want the width of grid to be streatched.
even setting the "ItemStyle-Wrap" doesn't work
what would be the solution for this?
|