Hi

I am using <asp:Gridview> to display my data.
I am adding columns and rows dynamically.
I am facing following issues:
1.
I want scrollbars around the gridview and for this purpose i used <div style="overflow:auto"> and its working fine. But issue is that the header row also scroll down with scrollbar and i want to fix header row .
I searched on google and found a lot of solutions but nothing is working for me.
I am using css for header row and setting position:relative.
Its working fine in mozilla but when using in IE, the header row is growing out of gridview boundaries horizontally when horizontal scrollbar appears. Vertically working fine.

2.
I am using commandfield to select the row.
But I want to select the row at client side in such a way that when i click on command button, it should not go to server for processing., rather it should selecet the row using client side code only.


Please help me in solving above issues.

Thanks & Regards,
Anu

Hi dear,
Please find the code fro scrllable DaTaGridView

<div style="width:100%; height:300; overflow:auto;">
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</div>

GridView inside Panel Control
To create GridView scrollbars with a little help of Panel control, use this code:

<asp:Panel ID="Panel1" runat="server" ScrollBars="Both" Height="300" Width="100%">
 <asp:GridView ID="GridView1" runat="server">
 </asp:GridView>
</asp:Panel>

And answer of ther question is that. You can achive this thing in dataset ot any data container object. Consider if we have used the Dataset as data container then simplaly user the Databaset.Filter = "Column name = '".Value need to gate filer."'"


Thanks & Regards
Jaiswar Vipin Kumar R. (India)

This article has been dead for over six months. Start a new discussion instead.