sábado, 14 de noviembre de 2009
Sencillo ejemplo donde se explica como implementar columnas que se autoordenan al clickar en la cabecera.
http://www.programandoen.net/blog/docs/?year=2009&month=3&day=3&title=Como-ordenar-columnas-de-un-Gridview
No requiere modificar procedures, como se ve en el ejemplo:
Dim dt As Data.DataTable
Dim jj As New dllvalorex
dt = jj.GetValorex.Tables(0)
Dim dv As New Data.DataView(dt)
dv.Sort = sortExpression + " " + direction
Me.gvValorex.DataSource = dv
Me.gvValorex.DataBind()
Se aplican propiedades al DataView. Rápido y sencillo de implementar.
http://www.programandoen.net/blog/docs/?year=2009&month=3&day=3&title=Como-ordenar-columnas-de-un-Gridview
No requiere modificar procedures, como se ve en el ejemplo:
Dim dt As Data.DataTable
Dim jj As New dllvalorex
dt = jj.GetValorex.Tables(0)
Dim dv As New Data.DataView(dt)
dv.Sort = sortExpression + " " + direction
Me.gvValorex.DataSource = dv
Me.gvValorex.DataBind()
Se aplican propiedades al DataView. Rápido y sencillo de implementar.
Suscribirse a:
Enviar comentarios (Atom)
1 comentarios:
El problema con los CSS aparece cuando el texto del header, se convierte en enlace y hereda el estilo de los Enlaces.
Tras un rato investigando, encuentro la solucion con:
.GridHeader
{
border: solid 1px black;
font-weight: bold;
background-color: #008DBB;
color: White;
}
tr.GridHeader a,
tr.GridHeader a:link,
tr.GridHeader a:hover,
tr.GridHeader a:visited
{
border: solid 0px black!important;
font-weight: bold!important;
background-color: #008DBB!important;
color: White!important;
text-decoration: none!important; /* la ostia, esto fuerza ke no herede ª */
}
Encontrado aqui: http://stackoverflow.com/questions/309035/asp-net-gridview-css-issue-when-sorting-turned-on
Publicar un comentario