PDA

View Full Version : Disable QuickTips error message



Sejal
22 Feb 2010, 4:17 AM
Hi

I want to disable error messge in quik tip . how can i do it ?

Thanks

fay
22 Feb 2010, 4:30 AM
See disable() or cancelShow() in http://www.extjs.com/deploy/dev/docs/?class=Ext.QuickTip

Sejal
22 Feb 2010, 5:58 AM
not working

fay
22 Feb 2010, 6:10 AM
?

not working

I'm assuming that you have actually called "Ext.QuickTips.init();" Can you post your code?http://www.extjs.com/learn/Ext_Forum_Help#Posting_a_working_showcase

Sejal
22 Feb 2010, 8:44 PM
Ext.onReady(function () {

show();

});

function show() {
var stocks_proxy = new Ext.data.HttpProxy({

api: {
read: baseUrlForAdminJs + '/stocksposition/originalposition1',
create: baseUrlForAdminJs + '/stocksposition/originalposition',
update: baseUrlForAdminJs + '/stocksposition/originalposition2',
destroy: baseUrlForAdminJs + '/stocksposition/originalposition3'
}



});

var reader = new Ext.data.JsonReader({

totalProperty: 'total',
successProperty: 'success',
idProperty: 'id',
message: 'message',
root: 'data'
}, [{
name: 'stocks',
type: 'string'
},
{
name: 'datetime',
type: 'string'
},
{
name: 'price',
type: 'float',
},
{
name: 'postion_type',
type: 'string'
}

]);

var writer = new Ext.data.JsonWriter({
encode: true,
writeAllFields: true

});


var store = new Ext.data.Store({
reader: reader,
writer: writer,
proxy: stocks_proxy
});

var editor = new Ext.ux.grid.RowEditor({
saveText: 'Update'
});

var stocks_list_store = new Ext.data.JsonStore({
url: baseUrlForAdminJs + '/stocksposition/stockslist/type/original',
fields: ['id', 'name']

});

stocks_list_store.load();

var stocks_combobox = new Ext.form.ComboBox({
id: 'stocks',
store: stocks_list_store,
lazyRender: true,
fieldLabel: 'Stocks',
name: 'stocks',
valueField: 'id',
displayField: 'name',
forceSelection: true,
mode: 'local',
triggerAction: 'all',
selectOnFocus: true,
allowBlank: false,
typeAhead: true,
listeners: {
afterrender: function (e) {
e.setValue(e.store.collect('id', true)[0]);

}
}


});

var postion_type_combobox = new Ext.form.ComboBox({
typeAhead: true,
lazyRender: true,
triggerAction: 'all',
id: 'postion_type',
name: 'postion_type',
fieldLabel: 'Postion',
forceSelection: true,
mode: 'local',
allowBlank: false,
hiddenName: 'type',
selectOnFocus: true,
store: new Ext.data.ArrayStore({
fields: ['name'],
data: [
['LONG'],
['SHORT']
]
}),
valueField: 'name',
displayField: 'name',
listeners: {
afterrender: function (e) {
e.setValue(e.store.collect('name', true)[0]);

}
}
});

var grid = new Ext.grid.GridPanel({
store: store,
width: 600,
height: 200,
plugins: [editor],
/*view: new Ext.grid.GroupingView({
markDirty: false
}),*/
tbar: [{
text: 'Add',
handler: function () {
var e = new grid.store.recordType({
stocks: '',
datetime: (new Date()),
price: '1',
postion_type: 'LONG'
});
console.log(e);
editor.stopEditing();
store.insert(0, e);
//grid.getView().refresh();
//grid.getSelectionModel().selectRow(0);
editor.startEditing(0);
}
},
{
ref: '../removeBtn',
iconCls: 'icon-user-delete',
text: 'Remove Employee',
disabled: true,
handler: function () {
editor.stopEditing();
var s = grid.getSelectionModel().getSelections();
for (var i = 0, r; r = s[i]; i++) {
store.remove(r);
}
}
}],

columns: [{
//id: 'stocks_id',
header: 'Stocks',
dataIndex: 'stocks',
width: 220,
editor: stocks_combobox,

},
{
xtype: 'datecolumn',
header: 'Date & Time',
dataIndex: 'datetime',
width: 100,
editor: {
//{xtype:'datetimefield',fieldLabel: 'My Date',dateFormat:'d-m-Y',timeFormat:'G:i A'}
xtype: 'datetimefield',
dateFormat: 'd-m-Y',
timeFormat: 'G:i A',
allowBlank: true

}
},
{
xtype: 'numbercolumn',
header: 'Price',
dataIndex: 'price',
format: '$0,0.00',
width: 100,
editor: {
xtype: 'numberfield',
allowBlank: false
}
},
{
header: 'Postion',
dataIndex: 'type',
width: 50,
editor: postion_type_combobox
}]
});

}