Scrollable Datagrids & Freeze Panes

I have created a datagrid using C#.NET and was looking to make the datagrid scrollable and have the header frozen when u scroll, like excel.

I have got sample code from various sources and it keeps mentioning apply to a CSS file. Do I create a css containing all the necessary code and call it in, if so how and where

If there's a different / correct way of doing it place let me know.

Thanks for looking

Paul.



Answer this question

Scrollable Datagrids & Freeze Panes

  • Romantic_touch

    Help needed urgently,

    thanks


  • csi_hugh

    thanks for the reply, saw that sort of idea on msdn info.

    Although, just stuck at it and managed to get the actually table header to freeze.

    Now though I am trying to get a couple of columns to freeze when you scroll horizontally.

    Any ideas, I can't seem to apply the same css code to a column as it doesn't seem to allow me to apply css to specific individual columns.

    Any help appreciated, thanks


  • Will Merydith

    I don't have the answer, but I have done this with some blackmagic ASP - not C#.Net - the basics is that you create a single row table of headers on top of your datagrid - might take a little effort to adjust column borders (if you have them, I don't) and then hid the ColumnHeaders of your datagrid.

    This was done in VS2003 with ASP & VB.Net

    would that be useful


  • Scrollable Datagrids & Freeze Panes