how do i rearrange the columns in a gridgrouping control

Hi

I am binding a data table to my grid grouping control.

My requirement is that my last column in the data table has to be displayed first in the grid grouping control.

How do i re-arrange ?

Please help..

Thanks and regards
Pavan


3 Replies

SP Sai Pavan Kumar September 3, 2010 10:35 AM UTC

never mind.. i have achieved it..

please let me know how can i format
1) a complete row in GGC.
2) only 1 particular cell in GGC.

thanks in advance..



CI Christopher Issac Sunder K Syncfusion Team September 7, 2010 11:16 AM UTC

Hi Pavan,

Thank you for your interest in Syncfusion products.

Formatting of a particular row or a cell in GridGroupingControl can be handled through “QueryCellStyleInfo” event with the following code.


this.gridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{

//format a full row
if (e.TableCellIdentity.RowIndex == 5)
{
e.Style.BackColor = Color.HotPink;//set back color
e.Style.CellTipText = "4 th row formatted";//set tooltip
}

//format a cell (12,3)
if (e.TableCellIdentity.RowIndex == 12 && e.TableCellIdentity.ColIndex == 3)
{
e.Style.CellType = "ComboBox";//set cell type
e.Style.ChoiceList = str; // set source list (collection)
e.Style.TextColor = Color.Red; // set forecolor
e.Style.CellTipText = "RowIndex : " + e.TableCellIdentity.RowIndex + ", ColIndex : " + e.TableCellIdentity.ColIndex; // set tool tip
}
}


Please refer the following sample which illustrates the above.

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GGC_Formatting1657301659.zip

Please let me know if you have any other concerns.

Regards,
Christo.




CI Christopher Issac Sunder K Syncfusion Team September 7, 2010 11:51 AM UTC

Hi Pavan,

Thanks for the update.

You can make use of Font, Text color , border style, cell value type and many other things through “e.Style”. To Bold a text, use the below code snippet.


e.Style.Font.Bold = true;


Please let me know if you need more help regarding this.

Regards,
Christo.



Loader.
Up arrow icon