Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Avoid Multiple Space Elimination in ASP.NET GridView Control [modified]

Avoid Multiple Space Elimination in ASP.NET GridView Control [modified]

Scheduled Pinned Locked Moved ASP.NET
csharpcssasp-netsysadminquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    megivimal
    wrote on last edited by
    #1

    hi, This code is working for me. but the grid cells take too many height and width (Cellspacing&Cellpadding). how can i reduce the space between teh cells content. <asp:GridView ID="grdResult" runat="server" AutoGenerateColumns="False" OnRowDataBound="grdResult_RowDataBound" CellPadding="0" CellSpacing="0"> <Columns> <asp:TemplateField HeaderText="PharmacyID" ConvertEmptyStringToNull="false"> <ItemTemplate> <pre> <asp:LinkButton ID="lnkPatientID" runat="server" Text='<%#Eval("PharmacyID") %>' CommandName="PharmacyName" CommandArgument='<%#Eval("PharmacyID" )%>'></asp:LinkButton></pre> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="NABP" ConvertEmptyStringToNull="false"> <ItemTemplate> <pre><asp:LinkButton ID="lnkNABP" runat="server" Text='<%#Eval("NABP") %>' CommandName="PharmacyName" CommandArgument='<%#Eval("PharmacyID") %>'></asp:LinkButton></pre> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Storename" ConvertEmptyStringToNull="false"> <ItemTemplate> <pre><asp:LinkButton ID="lnkStorename" runat="server" Text='<%#Eval("Storename")%>' CommandArgument='<%#Eval("PharmacyID") %>' CommandName="PharmacyName"></asp:LinkButton></pre> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Address1" ConvertEmptyStringToNull="false"> <ItemTemplate> <pre><asp:LinkButton ID="lnkAddress1" runat="server" Text='<%#Eval("Address1")%>' CommandName="PharmacyName" CommandArgument='<%#Eval("PharmacyID") %>

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups