Re: ASP.Net scrollable datagrid, but with static/unmoving column headers

  • From: "Jacob Kruger" <jacobk@xxxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Thu, 29 Jul 2010 15:21:54 +0200

aven't looked into it yet - starting to go through various possibilities 
roundabout now, and this is in any case more of a recommendation to other 
developer about how to try make it work, but will still try give him an example 
or 2 to look at.

Something like JQuery does interest me in any case since seems like it might do 
a couple of other types of things I might like to make use of at some stage, 
but the ASPX list view, templatised might in fact be the quickest/easiest way 
to do what they want right now.

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

  ----- Original Message ----- 
  From: RicksPlace 
  To: programmingblind@xxxxxxxxxxxxx 
  Sent: Thursday, July 29, 2010 2:59 PM
  Subject: Re: ASP.Net scrollable datagrid, but with static/unmoving column 
headers


  Hi Guys: Again I would recommend looking at the ASP ListView control. It 
allows you to use a templated html setup to format outputs. I believe You could 
just  bind the ListView to the data then specify either a couple of list or 
tables as the rendered outputs. Then, in the templates, set up the headings to 
remain fixed and the data columns to scroll. I'm not sure about this but it 
deservs a look since the real question here is picking the right tool for a job 
and perhaps the DataGrid or GridView is not the right tool for this job. If it 
is, Scott Mitchell has  a step by step article describing using html to set up 
a webpage as desired. Other approaches including CSS and JQuery are more 
complex and used to get around the GridView's inherrant flaws in this respect. 
Anyway, I have not seen any discussion on whether the tool mentioned, GridView 
or whatever it is now called, is the best tool for the job at hand. 
  Is it because you know it is not the correct tool from experience or because 
you have just never used it? Just asking because I found the ListView good for 
another purpose and it is quite flexible once you understand how it works.
  Rick USA
    ----- Original Message ----- 
    From: Jacques Bosch 
    To: programmingblind@xxxxxxxxxxxxx 
    Sent: Thursday, July 29, 2010 8:00 AM
    Subject: Re: ASP.Net scrollable datagrid, but with static/unmoving column 
headers


    You could do that, yes, but if you clone the header row with jQuery you 
probably wouldn't have to. Unless your columns are being sized by the content 
of the data rows.

      ----- Original Message ----- 
      From: Jacob Kruger 
      To: ProgrammingBlind@xxxxxxxxxxxxx 
      Sent: Thursday, July 29, 2010 10:52 AM
      Subject: Re: ASP.Net scrollable datagrid, but with static/unmoving column 
headers


      Ok, that also makes sense.

      In other words, a javascript function would go and set the column widths 
for the header table to the same as the widths of the actual data displaying 
table columns?

      Stay well

      Stay well

      Jacob Kruger
      Blind Biker
      Skype: BlindZA
      '...fate had broken his body, but not his spirit...'

        ----- Original Message ----- 
        From: black ares 
        To: programmingblind@xxxxxxxxxxxxx 
        Sent: Thursday, July 29, 2010 7:38 AM
        Subject: Re: ASP.Net scrollable datagrid, but with static/unmoving 
column headers


        is not necessary jquery.
        With only javascript it is enough to do this.

          ----- Original Message ----- 
          From: Jacob Kruger 
          To: programmingblind@xxxxxxxxxxxxx 
          Sent: Wednesday, July 28, 2010 11:37 PM
          Subject: Re: ASP.Net scrollable datagrid, but with static/unmoving 
column headers


          JQuery?

          I'm somewhat out of practice with this type of web development - 
obviously...<smile>

          Stay well

          Jacob Kruger
          Blind Biker
          Skype: BlindZA
          '...fate had broken his body, but not his spirit...'

            ----- Original Message ----- 
            From: Jacques Bosch 
            To: programmingblind@xxxxxxxxxxxxx ; Program-l 
            Cc: ProgrammingBlind@xxxxxxxxxxxxx 
            Sent: Wednesday, July 28, 2010 10:02 PM
            Subject: Re: ASP.Net scrollable datagrid, but with static/unmoving 
column headers


            Well, somebody mentioned a MX data grid which I have never used.
            But what you could do is to put the datagrid in a div with overflow 
set to auto.
            Then, with jQuery, it should be quite trivial to clone the header 
row and insert it in another div right above the data grid's div and hide the 
original header row.
            With a little fiddling that should give you the static headers you 
are aiming for.

            Jacques
              ----- Original Message ----- 
              From: Jacob Kruger 
              To: Program-l 
              Cc: ProgrammingBlind@xxxxxxxxxxxxx 
              Sent: Wednesday, July 28, 2010 4:52 PM
              Subject: ASP.Net scrollable datagrid, but with static/unmoving 
column headers


              Don't think there are too many guys involved in/looking into 
ASP.Net on VI programming lists, but specifically, at the moment, trying to 
figure out how to implement static/unmoving column headers for an ASP.Net 
datagrid, with the specific issue being that since there are quite a few 
datarows being rendered in a datagrid, they want the column headers to stay 
static/floating above the then scrollable columns of data, and was just 
wondering if anyone had ideas off hand.

              My own would be to in fact implement a static HTML table above 
the datagrid, with the column headers in it, and then implement the datagrid in 
something like either an inline frame, or a normal frame to allow the browser 
to scroll up and down inside it, while still seeing the column headers above, 
but the primary issue so far is I don't seem to be able to query/find a 
rendition of the column widths etc. from the datagrid control, but have 
otherwise been thinking about in fact chucking out the datagrid control as 
such, and just something closer to older, classic ASP to in fact just render 
the HTML output version of something like this, and would then just base the 
column widths on something like a certain number of pixels/points per letter of 
the column name, and would then use something closer to the classic ASP/PHP 
outputting of the data table inside another frame or something.

              Thoughts/examples/suggestions?

              Stay well

              Jacob Kruger
              Blind Biker
              Skype: BlindZA
              '...fate had broken his body, but not his spirit...'



              __________ Information from ESET NOD32 Antivirus, version of 
virus signature database 5318 (20100727) __________

              The message was checked by ESET NOD32 Antivirus.

              http://www.eset.com



          __________ Information from ESET NOD32 Antivirus, version of virus 
signature database 5321 (20100728) __________

          The message was checked by ESET NOD32 Antivirus.

          http://www.eset.com



      __________ Information from ESET NOD32 Antivirus, version of virus 
signature database 5321 (20100728) __________

      The message was checked by ESET NOD32 Antivirus.

      http://www.eset.com


      __________ Information from ESET NOD32 Antivirus, version of virus 
signature database 5321 (20100728) __________

      The message was checked by ESET NOD32 Antivirus.

      http://www.eset.com



  __________ Information from ESET NOD32 Antivirus, version of virus signature 
database 5323 (20100729) __________

  The message was checked by ESET NOD32 Antivirus.

  http://www.eset.com



__________ Information from ESET NOD32 Antivirus, version of virus signature 
database 5323 (20100729) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com

Other related posts: