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.
Unfortunately, activation email could not send to your email. Please try again.

Syncfusion grid click and corresponding image is show ? (Sagar)

Thread ID:

Created:

Updated:

Platform:

Replies:

68648 Sep 26,2007 08:49 AM Oct 26,2007 04:54 AM ASP.NET Web Forms (Classic) 1
loading
Tags: FAQ
Asit Sinha
Asked On September 26, 2007 08:49 AM

Dear Sir
I am facing a problem in syncfusion grid.
If I am click any row then corresponding image will display.
Example
In grid 3 item a, b, c.
If we click a row then an image show other wise another image.
Please immediate reply on this mail.
Am waiting your reply......
Sagar

Jeba S [Syncfusion]
Replied On October 26, 2007 04:54 AM

Hi Asit,

Sorry for the delay in response.

You can assign different images while clicking the row by handling CellClick and QueryCellInfo events. You can check the corresponding RowIndex and assign the Style.ImageIndex property in the QueryCellInfo event.

Please refer this code snippets:

private void gridControl1_CellClick(object sender, GridCellClickEventArgs e)
{
cc = this.gridControl1.CurrentCell;
if (cc.RowIndex == 5 && cc.ColIndex == 3)
{
flag1 = !flag1;
cc.Refresh();
}
if (cc.RowIndex == 6 && cc.ColIndex ==3)
{
flag2 = !flag2;
cc.Refresh();
}
if (cc.RowIndex == 7 && cc.ColIndex == 3)
{
flag3 = !flag3;
cc.Refresh();
}
}

private void gridControl1_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if (e.RowIndex > 0 && e.ColIndex > 0)
{
if (e.RowIndex ==5 && e.ColIndex == 3 && flag1 == true )
{
e.Style.ImageIndex = 3;
}
}
if (e.RowIndex == 6 && e.ColIndex == 3 && flag2 == true)
{
e.Style.ImageIndex = 0;
}
if (e.RowIndex == 7 && e.ColIndex == 3 && flag3 == true)
{
e.Style.ImageIndex = 1;
}
}


Please refer this sample which implements the above said feature.
http://websamples.syncfusion.com/samples/Grid.Windows/F68648/main.htm

Kindly let us know if you need any further assistance.

Thank you for using Syncfusion Products.

Best Regards,
Jeba.

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.

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.

;