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. Image for the cookie policy date
close icon

grid grouping control cell cursor

Hellow,

How can I add a hand cursor
to a specific cell in GGC child table.



5 Replies

AA Arulraj A Syncfusion Team November 11, 2011 10:23 AM UTC

Hi Michal,

Thanks for using Syncfusion Products.

To set cursor for a particular cell in a child table, we suggest you to hook the ChildTableControl’s CellCursor event and set the cursor. Using the following code, this can be achieved.

GridTableControl childTableControl = this.groupingGrid1.GetTableControl("Products");
childTableControl.CellCursor += new GridCellCursorEventHandler(childTableControl_CellCursor);

void childTableControl_CellCursor(object sender, GridCellCursorEventArgs e)
{
if (e.RowIndex == 3 && e.ColIndex == 3)
{
e.Cursor = Cursors.Hand;
}
else
{
e.Cursor= Cursors.Default;
}
e.Cancel = true;
}


Here is a sample for your reference.
http://www.syncfusion.com/downloads/Support/DirectTrac/87095/CS-385546723.zip

Please let us know if you have any further concerns.

Regards,
Arulraj.A




MI Michal November 14, 2011 06:49 AM UTC

thank you for the answer,
but this is not what I need.
I have a web grid and I had not found any event
for cursor.




YO Yogeshwaran Syncfusion Team November 16, 2011 09:35 AM UTC

Hi Michal,

Sorry for the inconvenience caused.

Your requirement to set hand cursor at particular child cell can be achieved by using CSS property in "QueryCellStyleInfo". please refer the following code snippet:

[CSS]

.CursorChange
{
//border color depends on grid color
border-color: #96C5F3 !important;
border-style: none none solid solid !important;
border-width: 0.5px 0 1px 1px !important;
padding-left: 4px !important;
padding-right: 4px !important;
cursor:pointer !important;
}


[code behind C#]



void GridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Web.UI.WebControls.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{

if (e.TableCellIdentity.TableCellType == GridTableCellType.RecordFieldCell || e.TableCellIdentity.TableCellType == GridTableCellType.AlternateRecordFieldCell)
{
if (e.TableCellIdentity.Column.MappingName == "Role" && e.TableCellIdentity.Table.TableDescriptor.Name == "ChildEmployee")
{
if (e.Style.Text == "software level2")
e.Style.CssClass = "CursorChange";
}

}

}



For your convenience, we have created the simple sample and the same it can download from below link:

HAND CURSOR-682038469.zip

please let us know any other concerns.

Regards,

Yogesh R



MI Michal November 28, 2011 11:10 AM UTC

Thank you very much,
it solved my problem.



YO Yogeshwaran Syncfusion Team November 30, 2011 04:35 AM UTC

Hi Michal,

Thank you for using Syncfusion products.

we are happy to know that your issue is resolved.

Please let us know if any other concerns.

Regards,
Yogesh R


Loader.
Live Chat Icon For mobile
Up arrow icon