 |
|
|
 |
|
 |
great article....
thanks for provinding such a worthfull article.
Can u plz provide the article for merging the rows of datagrid in template columns as this article works only for bound column in datagrid.
I have to insert the checkbox with each item in datagrid so this code will not work for the columns having checkbox.
modified on Sunday, September 7, 2008 11:17 PM
|
|
|
|
 |
|
 |
Hi,
I wanna same code in C#, Its giving me problem when i am trying to convert it into C#. m not able to create handlers properly. More over for me its working when I m setting Autogenerate column property to true. If I am explicitly defining columns its not working.
|
|
|
|
 |
|
 |
Ya agregue el codigo pero me esta marcando
Error 2 Class 'ASP.carteras_default_aspx' must declare a 'Sub New' because its base class 'Carteras_Default' does not have an accessible 'Sub New' that can be called with no arguments. D:\Apps\Main\Carteras\Default.aspx 1 1 D:\Apps\Main\
gracias
|
|
|
|
 |
|
 |
Hi,
Does anyone know why the merging of cells is ignored when using a Grid with the AutoGenerateColumns property set to true?
|
|
|
|
 |
|
 |
IsGroupedCol method is not available.Please give code it so that i can proceed.
Amit
|
|
|
|
 |
|
 |
See the Reply below on the next message.
|
|
|
|
 |
|
 |
It might be me but I can't find the IsGroupedCol function. Where can I find it? Richard
|
|
|
|
 |
|
 |
Just add the folliwing function:
Private Function IsGroupedCol(Byval index as Integer) as Boolean
Return Not Array.IndexOf(arrCls, index) = -1
End Function
|
|
|
|
 |
|
 |
Hii..
It's great if u can provide info ab't the 'IsGroupedCol' function, which was missing from the download.
i checked in the discussions but it's all in some otherlanguage which i could not understand.
hope you understood.
Thank you.
|
|
|
|
 |
|
 |
How could I use the class from my aspx?...I'm using Visual Basic .NET
Thanks a Lot
Xania
|
|
|
|
 |
|
 |
anyone that comes up with a brilliant idea on how to do a Win Datagrid that has this similiar functions? Thank you
|
|
|
|
 |
|
 |
Is it possible for you to develop similar code for windows datagrid in C#.Net? Thanks
|
|
|
|
 |
|
 |
Everything's possible, however this algorithm is based on HTML table's rowspan capability. I don't know now which approach should be followed to develop the same for WinDatagrid.
|
|
|
|
 |
|
 |
I'm getting trace not declared, what is trace supposed to be? Has anyone got a resolution to this?
|
|
|
|
 |
|
 |
Please add Imports System.Diagnostics to the beginning of the class.
|
|
|
|
 |
|
 |
Thanks, work pefectly now.
|
|
|
|
 |
|
 |
thanks, that's what I was looking for.
|
|
|
|
 |
|
 |
Good work.
Just what I needed
|
|
|
|
 |
|
 |
Hi, In the line: Trace.Write(arrCls(i) & " ") I have an error: Trace is not declared, the same in: If IsGroupedCol(i) Then, there is an error: IsGroupedCol() is not declared. What means this?
Thank's, please excuse my english
|
|
|
|
 |
|
 |
Trace.Write(arrCls(i) & " ")
|
|
|
|
 |
|
 |
I couldn't figure out where IsGroupedCol Function in any of the previous Posts . Can u please help.
Regards
Raj
|
|
|
|
 |
|
 |
Hi, i´m sorry the bad writer, but i speak spanish, in the post of the nickpatel (Good Job.. ) is the full code, i´m work for the C# version, but no finished, when finished, up this page.
Regard´s, from Mexico City
|
|
|
|
 |
|
 |
Hola brcordova: yo también hablo español, puedes colaborarme por favor indicandome los pasos a seguir para utilizar esta clase en mi proyecto?, ya descargué el archivo y puse la clase en mi proyecto pero aparecen algunos errores: Trace.Write(arrCls(i) & " ") dice que trace no se ha declarado, igual con If IsGroupedCol(i) Then también dice que isGroupedCol() no se ha declarado, te agradezco de antemano cualquier colaboración
Lasaya
|
|
|
|
 |
|
 |
Estimado Yolimap, estudiando el codigo, bastante interesante por cierto, lo adapte a C#, no se si te sirva, este es la clase que utilice y funciona a la perfeccion, esta clase la puse en el evento del datagrid
private void TuDataGrid_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
GroupGridItem(sender, e);
}
public void GroupGridItem(object sender, DataGridItemEventArgs e)
{
TableCell cell;
DataGrid _dg = ((DataGrid)sender);
if( e.Item.ItemType == ListItemType.AlternatingItem | e.Item.ItemType == ListItemType.Item )
{
foreach(TableCell cell1 in e.Item.Cells)
{
cell1.RowSpan = 1;
}
int i;
if( _previtem != null )
{
for(i = 0; i <= e.Item.Cells.Count - 1; i++)
{
cell = e.Item.Cells[i];
cell.Visible = true;
if( cell.Text.Trim() == _previtem.Cells[i].Text.Trim() & cell.Text.Trim() != "" )
{
int a;
for(a = e.Item.ItemIndex; a >= 0; a--)
{
if( a - 1 < 0 )
{
break;
}
DataGridItem ditm2;
ditm2 = _dg.Items[a-1];
if( ditm2 != e.Item )
{
if( ditm2.Cells[i].Text.Trim() == cell.Text.Trim() & ditm2.Cells[i].Visible == true )
{
ditm2.Cells[i].RowSpan += 1;
cell.Visible = false;
break;
}
}
}
}
}
_previtem = e.Item;
}
else
{
_previtem = e.Item;
}
}
}
Saludos desde la Cd. de Mexico
Ricardo Ostos {MX}
|
|
|
|
 |