talshadar
15 Apr 2009, 1:26 PM
I'm trying to load some information into a qtip on a grid depending on the value of the cell.
IE If the cell value == 'Bryan, Matthew' then grab some information for that user and display that in the tooltip.
I'm using ext 1.1 and C# - the C# function call returns a datatable to the callback function which parses out the info and writes it to a variable.
When setting up the col model function ,I use that variable in the tooltip. The problem is that the variable value never changes for the tooltip. I'm sure it has something to do with timing but I'm not sure how to resolve it.
CODE::
in the begining (init section) I set
interfaceTooltip = "STUPID"; -- that's the only value that shows up for tooltips
the grid column model - relevant column only.
{id:"Assigned", header: "Assigned", dataIndex:"ActionBy", width: 100, sortable: true, renderer: formatAssigned},
the rendering function
function formatAssigned(value, p, record)
{
//return renderingFunction (value, record.data ["offset"])
if (value == "Bryan, Matthew")
{
cActions.getInterfaceInfo(value,getCellTooltip_Callback, Ext.util.errorHander)
p.attr = 'ext:qtip=" ' + cellTooltip + '" ext:qtitle="' + value + '"';
return value;
}
}
the callback function - the REALLY change never goes either. I've tried walking through and the callback does get data, but it never updates the cellTooltip variable .. as far as I can tell.
function getCellTooltip_Callback(response)
{
cellTooltip = "REALLY";
if (response.tables)
{
dsTooltipStore.loadData(response.tables[0].rows);
var record = dsTooltipStore.getAt(0); //get first record
var receiptParty = record.get('Receipt_Party');
var rpContact = record.get('RP_Contact');
var deliveryParty = record.get('Delivery_Party');
var dpContact = record.get('DP_Contact');
var msgText = "";
msgText = receiptParty +" ( "+rpContact+" )";
msgText += "<br>" + deliveryParty +" ( "+dpContact+")";
cellTooltip = "INFO:" + msgText;
}
}
I hope someone can point me in the right direction here.
IE If the cell value == 'Bryan, Matthew' then grab some information for that user and display that in the tooltip.
I'm using ext 1.1 and C# - the C# function call returns a datatable to the callback function which parses out the info and writes it to a variable.
When setting up the col model function ,I use that variable in the tooltip. The problem is that the variable value never changes for the tooltip. I'm sure it has something to do with timing but I'm not sure how to resolve it.
CODE::
in the begining (init section) I set
interfaceTooltip = "STUPID"; -- that's the only value that shows up for tooltips
the grid column model - relevant column only.
{id:"Assigned", header: "Assigned", dataIndex:"ActionBy", width: 100, sortable: true, renderer: formatAssigned},
the rendering function
function formatAssigned(value, p, record)
{
//return renderingFunction (value, record.data ["offset"])
if (value == "Bryan, Matthew")
{
cActions.getInterfaceInfo(value,getCellTooltip_Callback, Ext.util.errorHander)
p.attr = 'ext:qtip=" ' + cellTooltip + '" ext:qtitle="' + value + '"';
return value;
}
}
the callback function - the REALLY change never goes either. I've tried walking through and the callback does get data, but it never updates the cellTooltip variable .. as far as I can tell.
function getCellTooltip_Callback(response)
{
cellTooltip = "REALLY";
if (response.tables)
{
dsTooltipStore.loadData(response.tables[0].rows);
var record = dsTooltipStore.getAt(0); //get first record
var receiptParty = record.get('Receipt_Party');
var rpContact = record.get('RP_Contact');
var deliveryParty = record.get('Delivery_Party');
var dpContact = record.get('DP_Contact');
var msgText = "";
msgText = receiptParty +" ( "+rpContact+" )";
msgText += "<br>" + deliveryParty +" ( "+dpContact+")";
cellTooltip = "INFO:" + msgText;
}
}
I hope someone can point me in the right direction here.