Header Fixed

G

Guest

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.
 
G

Guest

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
 
G

Guest

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.
 
G

Guest

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;
}
}
 
G

Guest

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?

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?
 
G

Guest

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...
 
G

Guest

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.
 
C

carion1

<!--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
 
C

carion1

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top