I am currently working with a gridview that displays product information. I'm trying to find a way to limit the description field so that only the first few lines are shown if it is too long, and also resize the image to fit into the image column while making the image and description columns slightly larger than the others.
Thank you!
<asp:GridView ID="gvProducts" runat="server" AutoGenerateColumns="False" DataKeyNames="ProductId" OnRowDeleting="gvProducts_RowDeleting" OnSelectedIndexChanged="gvProducts_SelectedIndexChanged">
<Columns>
<asp:CommandField ShowSelectButton="True" />
<asp:BoundField DataField="Productname" HeaderText="Name" />
<asp:BoundField DataField="ProductDescription" HeaderText="Description" />
<asp:BoundField DataField="ProductSupplier" HeaderText="Supplier" />
<asp:BoundField DataField="ProductCategory" HeaderText="Category" />
<asp:BoundField DataField="ProductSubCategory" HeaderText="SubCategory" />
<asp:BoundField DataField="ProductVAT" HeaderText="VAT" />
<asp:BoundField DataField="ProductStock" HeaderText="Stock" />
<asp:ImageField DataImageUrlField="ProductImage" HeaderText="Image"/>
<asp:CheckBoxField DataField="ProductActive" HeaderText="Active" />
<asp:CommandField ButtonType="Button" ShowDeleteButton="True" />
</Columns>
<SelectedRowStyle CssClass="selectedrow" />
</asp:GridView>