Click here to Skip to main content
12,511,734 members (43,478 online)

data display problem in gridview

pal5hah asked:

Open original thread
good morning all
in gridview display,some of my data value is to lengthy,so in display,they are overwitten.
if i set the fixed width then if any data that will be inserted in future will be more then that width then problem will occur.
is there any solution???
another problem is that if there will be no data in my database means 0 record,then gridview will not be displayed.but i want my header to be displayed even if there is no record

------------------------------------------------------------------------------------
<div id="Div4" style="overflow-x: auto; width: 1207px;">
<asp:GridView ID="gvState" runat="server" CellPadding="10" CellSpacing="10" AutoGenerateColumns="False" AlternatingRowStyle-CssClass="alternate-row"
HeaderStyle-Height="50px" RowStyle-Height="30px" RowStyle-CssClass="table-product" OnRowUpdating="gvvendor_RowUpdating" OnRowCommand="gvvendor_rowcommand"
OnRowDeleting="gvvendor_rwdeleting" CssClass="grid_css" Visible="true" AllowPaging="true" OnPageIndexChanging="gvState_PageIndexChanging" DataKeyNames="ID">
<rowstyle cssclass="table-product" font-size="30px" height="30px" horizontalalign="Center" verticalalign="Middle">
 </rowstyle>
Tags: ASP.NET

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the The Code Project Open License (CPOL).



Advertise | Privacy | Mobile
Web01 | 2.8.160929.1 | Last Updated 26 Mar 2009
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100