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 cursor

Hi,

I need to add a hand cursor
to a specifice column in a grid grouping control.
how can I do that?

another question,
how do I add scrollbars to the grid?(Asp.net)


1 Reply

YO Yogeshwaran Syncfusion Team November 10, 2011 01:21 PM UTC

Hi Michal,

Thank you for using Syncfusion products.

Query#1:

Your requirement to add hand cursor for specific column can be achieved by adding CSS class which has cursor property value is pointer and add this class to column through “QueryCellStyleInfo”. please refer the following code snippet:

[CSS]


.CusorChange
{
//border color is based 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;
//to set hand pointer
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 != null)
{


if (e.TableCellIdentity.Column.MappingName == "Name")
{
e.Style.CssClass = "CursorChange";

}

}
}

}



Query #2:

In Query 2, your requirement to add scroll bar to grid can be achieved by setting height to grid which have large data than their height then automatically scroll bar will appear. Please refer the following code snippet.

[ASPX]



Height="300"

PageSize="20" DataSourceCachingMode="ViewState" AutoFormat="Office 2007 Blue" runat="server" ShowSearchBox="True">



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

gridcombosample384491029.zip

Please let us know if another concerns.

Regards,
Yogesh R



Loader.
Live Chat Icon For mobile
Up arrow icon