We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how do i rearrange the columns in a gridgrouping control

Thread ID:

Created:

Updated:

Platform:

Replies:

96287 Sep 3,2010 07:24 AM UTC Sep 7,2010 11:51 AM UTC WinForms 3
loading
Tags: Grouping
Sai Pavan Kumar
Asked On September 3, 2010 07:24 AM UTC

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


Sai Pavan Kumar
Replied On 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..


Christopher Issac Sunder K [Syncfusion]
Replied On 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.



Christopher Issac Sunder K [Syncfusion]
Replied On 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.



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;