Anjali Khan

Anjali Khan

  • 1.3k
  • 867
  • 174.7k

how to create grid column horizontal in asp.net ?

Dec 18 2017 7:08 AM
Hi frnds
i created gridview which i am sending screen short in attachment. 1 and 2
and i created picture 1 but i want type of picture 2.
how to do this
i am sharing my gr code also
<asp:Panel ID="Panel1" runat="server">
<asp:GridView ID="GrdViewDetails" runat="server" AutoGenerateColumns="False"
GridLines="Vertical" Width="100%" CssClass="table-responsive">
<AlternatingRowStyle CssClass="alt" />
<Columns>
<asp:TemplateField HeaderText="NO" SortExpression="inwardno" HeaderStyle-CssClass="Text-Center">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "InwardNO")%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Letter Ref.NO" SortExpression="ltrrefno" HeaderStyle-CssClass="Text-Center">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Letter Ref.NO")%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Received Date" SortExpression="recdate" HeaderStyle-CssClass="Text-Center"
ItemStyle-CssClass="Text-Center">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Received Date")%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Subject" SortExpression="subject" HeaderStyle-CssClass="Text-Center"
ItemStyle-CssClass="Text-Center">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Subject")%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="File Link" SortExpression="file link" HeaderStyle-CssClass="Text-Center"
ItemStyle-CssClass="Text-Center">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "File Link")%>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Comment" SortExpression="comment" HeaderStyle-CssClass="Text-Center"
ItemStyle-CssClass="Text-Center">
<ItemTemplate>
<%# DataBinder.Eval(Container.DataItem, "Comment")%>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>

Attachment: gridview.rar

Answers (1)