Results 1 to 3 of 3

Thread: Bind just first row of datasource

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    589

    Bind just first row of datasource

    I have a gridview which must have a reliable fixed header. So, I've given up with css solutions that do not work cross browser and am using 2 Gridviews. The top one will just show the column names and the bottom will show the data contained within a scrollable div.

    So, I have a datasource which is a datatable.

    Is there a way I can bind the top Gridview so I only bind the first row in the DataTable to it?

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: Bind just first row of datasource

    Quote Originally Posted by Webskater View Post
    Is there a way I can bind the top Gridview so I only bind the first row in the DataTable to it?
    You can select only your first column in the db or use SqlCommand.ExecuteScalar in code
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Bind just first row of datasource

    Hello,

    Is this for a personal project, or do you have some funding behind you?

    There are a number of third party components that handle this very nicely for you, but obviously there is a price involved.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width