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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

using context Menu strip i would like to apply color to particular column

Thread ID:





74499 Jun 17,2008 05:04 AM UTC Jun 30,2008 10:26 AM UTC WinForms 1
Tags: GridControl
Asked On June 17, 2008 05:04 AM UTC

I used two Events those are
1.private void applyColorToolStripMenuItem_Click(object sender, EventArgs e)
applyColorToolStripMenuItem.BackColor = Color.Aqua;
color = Convert.ToString(applyColorToolStripMenuItem.BackColor);

private void Model_QueryCellInfo(object obj, GridQueryCellInfoEventArgs e)
int r1= gridDataBoundGrid1.CurrentCell.RowIndex;
int c1 = gridDataBoundGrid1.CurrentCell.ColIndex;

if (e.RowIndex < 0 && e.ColIndex < 0)
e.Style.BackColor = gridDataBoundGrid1.BackColor;
if (r1.Equals(e.RowIndex)
&& c1.Equals(e.ColIndex))
GridStyleInfo info = new GridStyleInfo();
info.BackColor = applyColorToolStripMenuItem.BackColor;
e.Style.BackColor = info.BackColor;
the problem is when i click particular cell the backgroundcolor is changed to backgroundcolor of context menu strip item color it is not correct.
i need this functionality when i right click context menu strip will be appeared and when I click on ApplyColor Task,Task color should be applied

Sri Rajan [Syncfusion]
Replied On June 30, 2008 10:26 AM UTC

Hi Mahesh,

Thank you for your interest in Syncfusion products.

Please try this coding to change the backcolor of a particular column, using Context Menu Strip.

private void applyColorToolStripMenuItem_Click(object sender, EventArgs e)
applyColorToolStripMenuItem.BackColor = Color.Aqua;
this.gridDataBoundGrid1.Binder.InternalColumns[3].StyleInfo.BackColor = Color.Aqua;

Please let me know if this helps.

Best Regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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