scrollable grid question

Discussion in 'ASP .Net Datagrid Control' started by Mike, May 24, 2004.

  1. Mike

    Mike Guest

    I know how to get a grid scrollable, but my question, how can I keep the
    Column headers and only scroll the data?

    example:

    header1 header2 - keep this permananet
    ------------------------------
    name1 address1 - make this scroll only
    Mike, May 24, 2004
    #1
    1. Advertising

  2. Mike

    Kilic Beg Guest

    I used two DataGrids for that one for headers only the other
    one for content...
    the content one I put into <DIV> tag..

    code sniplet..
    ===========================================
    <!--Header-->
    <asp:datagrid id="dgHeader" runat="server" .......>
    </asp:datagrid>
    <!--Content -->
    <div style="OVERFLOW">
    <asp:datagrid id="_DataGrid" runat="server" BackColor="White"
    BorderColor="#DEDFDE" BorderStyle="None"
    BorderWidth="1px" Font-Names="Verdana" Font-Size="Smaller"
    ForeColor="Black" GridLines="Vertical"
    CellPadding="0" AutoGenerateColumns="False" AllowSorting="True"
    ShowHeader="False">
    ........................
    </asp:datagrid>
    </div>
    =============================================

    you can bind the datagrid to same dataset before you bind the header
    datagrid delete the content..
    >>>ds.Tables[0].Rows.Clear();

    then you get only the header...

    hope it helps...

    -----------------------
    Kilic Beg


    "Mike" <> wrote in message
    news:%...
    > I know how to get a grid scrollable, but my question, how can I keep the
    > Column headers and only scroll the data?
    >
    > example:
    >
    > header1 header2 - keep this permananet
    > ------------------------------
    > name1 address1 - make this scroll only
    >
    >
    >
    Kilic Beg, May 24, 2004
    #2
    1. Advertising

  3. Saravana [MVP], May 25, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?cG11ZA==?=

    Only Data Grid should be scrollable!

    =?Utf-8?B?cG11ZA==?=, Jan 26, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    487
    =?Utf-8?B?cG11ZA==?=
    Feb 1, 2005
  2. Cristof Falk
    Replies:
    1
    Views:
    465
    =?Utf-8?B?U2hhamk=?=
    May 13, 2005
  3. =?Utf-8?B?U3RldmU=?=

    Scrollable Data Grid

    =?Utf-8?B?U3RldmU=?=, Feb 11, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    315
    Sonu Kapoor
    Feb 12, 2006
  4. sonali
    Replies:
    1
    Views:
    3,442
    eliza81
    Mar 8, 2010
  5. tshad

    Scrollable Grid

    tshad, Sep 5, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    477
    tshad
    Sep 5, 2007
Loading...

Share This Page