Avoid Multiple Space Elimination in ASP.NET GridView Control [modified]
-
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") %>