Header Fixed

Discussion in 'ASP .Net' started by =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=, Apr 26, 2007.

  1. =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=, Apr 26, 2007
    #1
    1. Advertising

  2. Hi,
    This link should help you:
    http://www.dotnet247.com/247referen...rance/ScrollableDataGridWithFixedHeader.shtml
    --
    If my answer helped you,then please do press Yes below.
    Thanks and Regards.
    Manish Bafna.
    MCP and MCTS.



    "Alhambra Eidos Kiquenet" wrote:

    > Hello misters,
    >
    > I have an DAtalist that generates an html table with a header. There are
    > many rows, and I want that it appears scroll horizontal and vertical, and the
    > header be fixed.
    >
    > Any help ? Thanks in advance.
    > --
    > http://www.alhambra-eidos.es/web2005/index.html
    > www.kiquenet.net
    >
     
    =?Utf-8?B?TWFuaXNoIEJhZm5h?=, Apr 27, 2007
    #2
    1. Advertising

  3. Hello misters again,

    Thanks mister Manish, for your answer, but I'm with the same problem. Repeat
    my trouble:

    I have an HTML table with a header.
    There are many rows, and I want that it appears scroll horizontal and
    vertical, and the header be fixed.

    Very important point, the user would select an row and then, its changes
    row's color (I use javascript to do this)

    I have seen this references:

    http://home.tampabay.rr.com/bmerkey/examples/locked-column-csv.html
    http://www.webdeveloper.com/forum/showthread.php?t=108597

    The trouble about this references, when the user select an row and changes
    color of row, the header dissaparears !!!.

    Any solution about this issue, now I'm crazy.

    Thanks in advance. Any help will be appreciated, very grateful if any help.
    Greetings


    --
    http://www.alhambra-eidos.es/web2005/index.html
    www.kiquenet.net



    "Manish Bafna" wrote:

    > Hi,
    > This link should help you:
    > http://www.dotnet247.com/247referen...rance/ScrollableDataGridWithFixedHeader.shtml
    > --
    > If my answer helped you,then please do press Yes below.
    > Thanks and Regards.
    > Manish Bafna.
    > MCP and MCTS.
    >
    >
    >
    > "Alhambra Eidos Kiquenet" wrote:
    >
    > > Hello misters,
    > >
    > > I have an DAtalist that generates an html table with a header. There are
    > > many rows, and I want that it appears scroll horizontal and vertical, and the
    > > header be fixed.
    > >
    > > Any help ? Thanks in advance.
    > > --
    > > http://www.alhambra-eidos.es/web2005/index.html
    > > www.kiquenet.net
    > >
     
    =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=, May 3, 2007
    #3
  4. On May 3, 1:52 pm, Alhambra Eidos Kiquenet
    <> wrote:
    > Hello misters again,
    >
    > Thanks mister Manish, for your answer, but I'm with the same problem. Repeat
    > my trouble:
    >
    > I have an HTML table with a header.
    > There are many rows, and I want that it appears scroll horizontal and
    > vertical, and the header be fixed.
    >
    > Very important point, the user would select an row and then, its changes
    > row's color (I use javascript to do this)
    >
    > I have seen this references:
    >
    > http://home.tampabay.rr.com/bmerkey...ebdeveloper.com/forum/showthread.php?t=108597
    >
    > The trouble about this references, when the user select an row and changes
    > color of row, the header dissaparears !!!.
    >
    > Any solution about this issue, now I'm crazy.
    >


    A solution about which issue? You referenced to an examples with the
    fixed headers, but not with the code you used to select a row.
     
    Alexey Smirnov, May 3, 2007
    #4
  5. Sorry,

    the javascript code for change color of row:

    // Selecciona la fila y cambia el hidden del seleccionado
    function SeleccionarFila(identificadorTarea, offset)
    {
    if( (identificadorSeleccionada != null) &&
    (document.getElementById(identificadorSeleccionada) != null) )
    {
    document.getElementById(identificadorSeleccionada).className
    = 'ItemStyle';
    if(identificadorTarea == identificadorSeleccionada)
    {
    identificadorSeleccionada == null;
    if(document.getElementById(HiddenSeleccionadoClientID)
    != null)
    {

    document.getElementById(HiddenSeleccionadoClientID).value = null;

    document.getElementById(HiddenSeleccionadoOffsetClientID).value = null;

    }
    return;
    }
    }
    document.getElementById(identificadorTarea).className =
    'SelectedItemStyle';
    identificadorSeleccionada = identificadorTarea;
    if(document.getElementById(HiddenSeleccionadoClientID) != null)
    {
    document.getElementById(HiddenSeleccionadoClientID).value =
    identificadorTarea;

    document.getElementById(HiddenSeleccionadoOffsetClientID).value = offset;
    }
    }
     
    =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=, May 3, 2007
    #5
  6. On May 3, 4:15 pm, Alhambra Eidos Kiquenet
    <> wrote:
    > Sorry,
    >
    > the javascript code for change color of row:
    >
    > // Selecciona la fila y cambia el hidden del seleccionado
    > function SeleccionarFila(identificadorTarea, offset)
    > {
    > if( (identificadorSeleccionada != null) &&
    > (document.getElementById(identificadorSeleccionada) != null) )
    > {
    > document.getElementById(identificadorSeleccionada).className
    > = 'ItemStyle';
    > if(identificadorTarea == identificadorSeleccionada)
    > {
    > identificadorSeleccionada == null;
    > if(document.getElementById(HiddenSeleccionadoClientID)
    > != null)
    > {
    >
    > document.getElementById(HiddenSeleccionadoClientID).value = null;
    >
    > document.getElementById(HiddenSeleccionadoOffsetClientID).value = null;
    >
    > }
    > return;
    > }
    > }
    > document.getElementById(identificadorTarea).className =
    > 'SelectedItemStyle';
    > identificadorSeleccionada = identificadorTarea;
    > if(document.getElementById(HiddenSeleccionadoClientID) != null)
    > {
    > document.getElementById(HiddenSeleccionadoClientID).value =
    > identificadorTarea;
    >
    > document.getElementById(HiddenSeleccionadoOffsetClientID).value = offset;
    > }
    > }


    Hi... how do you call that function?

    >> Very important point, the user would select an row and then, its changes
    >> row's color (I use javascript to do this)


    I see that in your js-function you are doing much more than just
    changing a color. What exactly do you need once the row is clicked?
     
    Alexey Smirnov, May 3, 2007
    #6
  7. Hi,

    I call my function like this

    <tr ... onclick="SeleccionarFila(12034, 0)" ...

    the function SeleccionarFila does the following:

    - change the color of row (selected row)

    - set values in input hidden. This values are codes (id of row and another
    value)

    Any problem with the code ?? Only put values in hidden ...and changes color
    with className attribute..

    Thanks...

    "Alexey Smirnov" wrote:

    > On May 3, 4:15 pm, Alhambra Eidos Kiquenet
    > <> wrote:
    > > Sorry,
    > >
    > > the javascript code for change color of row:
    > >
    > > // Selecciona la fila y cambia el hidden del seleccionado
    > > function SeleccionarFila(identificadorTarea, offset)
    > > {
    > > if( (identificadorSeleccionada != null) &&
    > > (document.getElementById(identificadorSeleccionada) != null) )
    > > {
    > > document.getElementById(identificadorSeleccionada).className
    > > = 'ItemStyle';
    > > if(identificadorTarea == identificadorSeleccionada)
    > > {
    > > identificadorSeleccionada == null;
    > > if(document.getElementById(HiddenSeleccionadoClientID)
    > > != null)
    > > {
    > >
    > > document.getElementById(HiddenSeleccionadoClientID).value = null;
    > >
    > > document.getElementById(HiddenSeleccionadoOffsetClientID).value = null;
    > >
    > > }
    > > return;
    > > }
    > > }
    > > document.getElementById(identificadorTarea).className =
    > > 'SelectedItemStyle';
    > > identificadorSeleccionada = identificadorTarea;
    > > if(document.getElementById(HiddenSeleccionadoClientID) != null)
    > > {
    > > document.getElementById(HiddenSeleccionadoClientID).value =
    > > identificadorTarea;
    > >
    > > document.getElementById(HiddenSeleccionadoOffsetClientID).value = offset;
    > > }
    > > }

    >
    > Hi... how do you call that function?
    >
    > >> Very important point, the user would select an row and then, its changes
    > >> row's color (I use javascript to do this)

    >
    > I see that in your js-function you are doing much more than just
    > changing a color. What exactly do you need once the row is clicked?
    >
    >
     
    =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=, May 3, 2007
    #7
  8. On May 3, 6:27 pm, Alhambra Eidos Kiquenet
    <> wrote:
    > Hi,
    >
    > I call my function like this
    >
    > <tr ... onclick="SeleccionarFila(12034, 0)" ...
    >
    > the function SeleccionarFila does the following:
    >
    > - change the color of row (selected row)
    >
    > - set values in input hidden. This values are codes (id of row and another
    > value)
    >
    > Any problem with the code ?? Only put values in hidden ...and changes color
    > with className attribute..
    >


    Well, I prefer to use something simple, as an example at the following
    tutorial

    http://www.rgagnon.com/jsdetails/js-0093.html

    You don't need any offset, etc. and I hope it will work better.
     
    Alexey Smirnov, May 3, 2007
    #8
  9. =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=

    carion1 Guest

    <!--display header here-->
    <div style="width: 800px; height: 400px; overflow : auto">
    <!--display data here-->
    </div>

    Change the width and height to whatever floats your boat.

    Derek

    On May 3, 1:49 pm, Alexey Smirnov <> wrote:
    > On May 3, 6:27 pm, Alhambra Eidos Kiquenet
    >
    >
    >
    >
    >
    > <> wrote:
    > > Hi,

    >
    > > I call my function like this

    >
    > > <tr ... onclick="SeleccionarFila(12034, 0)" ...

    >
    > > the function SeleccionarFila does the following:

    >
    > > - change the color of row (selected row)

    >
    > > - set values in input hidden. This values are codes (id of row and another
    > > value)

    >
    > > Any problem with the code ?? Only put values in hidden ...and changes color
    > > with className attribute..

    >
    > Well, I prefer to use something simple, as an example at the following
    > tutorial
    >
    > http://www.rgagnon.com/jsdetails/js-0093.html
    >
    > You don't need any offset, etc. and I hope it will work better.- Hide quoted text -
    >
    > - Show quoted text -
     
    carion1, May 3, 2007
    #9
  10. Thanks, Derek. Have you any sample code about it ??

    Regards.

    > <!--display header here-->
    > <div style="width: 800px; height: 400px; overflow : auto">
    > <!--display data here-->
    > </div>
    >
    > Change the width and height to whatever floats your boat.
     
    =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=, May 4, 2007
    #10
  11. =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?=

    carion1 Guest

    I thought you already had the data displaying on the page? Just make
    two tables from your existing table (header and body). Place the
    header table above the div and the body table inside the div. Your
    clientside code should all still work.

    On May 4, 1:08 am, Alhambra Eidos Kiquenet
    <> wrote:
    > Thanks, Derek. Have you any sample code about it ??
    >
    > Regards.
    >
    >
    >
    > > <!--display header here-->
    > > <div style="width: 800px; height: 400px; overflow : auto">
    > > <!--display data here-->
    > > </div>

    >
    > > Change the width and height to whatever floats your boat.- Hide quoted text -

    >
    > - Show quoted text -
     
    carion1, May 4, 2007
    #11
    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. kurt sune

    Fixed header by CSS only

    kurt sune, Mar 21, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,549
    kurt sune
    Mar 21, 2005
  2. =?Utf-8?B?Sm9lIER1bmxlYXZ5?=

    Fixed Header on a Data Grid using CSS - problem with Drop downs

    =?Utf-8?B?Sm9lIER1bmxlYXZ5?=, Oct 13, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    4,876
  3. batista
    Replies:
    1
    Views:
    6,178
    Patrick.O.Ige
    Feb 16, 2006
  4. johnp
    Replies:
    4
    Views:
    3,721
    Toby Inkster
    May 23, 2005
  5. mlt
    Replies:
    2
    Views:
    914
    Jean-Marc Bourguet
    Jan 31, 2009
Loading...

Share This Page