PDA

View Full Version : [Solved] Where in the GridPanel do I specify a style reference for the cursor



Elijah
2 Aug 2010, 6:37 AM
I want to have the mouse cursor change when the users positions the mouse cursor over a row in the gridpanel.
Where am I to place a style reference?

I tried the cls and iconCls but they are not doing what I am trying to achieve. The cls is only applying it to the panel of the gridPanel and not the rows of data.

Condor
2 Aug 2010, 7:43 AM
Write a getRowClass method that returns the appropriate class(es) for a particular row.

Elijah
2 Aug 2010, 8:28 AM
Write a getRowClass method that returns the appropriate class(es) for a particular row.

okay for those not aware.
getRowClass is part of the viewConfig:

A bit odd though that we use a get method and not a set method. After all, I am setting the CSS name that is to be used. At least thats how I look at it.

once again Thanks Condor.


{
// Set the ID to this grid panel
id:argCfg.id,
// Set the title to this grid panel
title: argCfg.title,
// Set the datastore to this grid panel
ds: argCfg.dataStore,
xtype:'grid',
layout: 'fit',
draggable: false,
stripeRows: true,
border:false,
viewConfig: {
forceFit:true,
// Return CSS class to apply to rows depending upon data values
getRowClass: function() {
return 'rosterCursorPointer';
}
},