hi,
i am new to extjs.
i created the grid first.
next i am trying to load the data into grid. but it is not loading data
is it possible to load data?
code:
/**
*@authornagasudharsanarg
*/
Ext.namespace('DynamicGrid');
var GridSettings = null;
var success = false;
var fields;
var dataStore;
var Grid;
var DataUrl;
function getGridsettings(GridsettingsUrl, DataUrl,param, method) {
DataUrl=DataUrl;
if (param == null && method == null) {
Ext.Ajax.request({
url : GridsettingsUrl,
method : 'GET',
success : onGetGridSettingsSuccess,
failure : onGetGridSettingsFailure
});
}
};
function onGetGridSettingsSuccess(result, request) {
GridSettings = result.responseText;
Intialize(GridSettings);
};
function onGetGridSettingsFailure(result, request) {
Ext.MessageBox.alert('Failed', 'GetColumns failed: ' + result.date);
};
function Intialize(gridsettings) {
var gridSettingsValues = Ext.util.JSON.decode(gridsettings);
var gridName = gridSettingsValues.title; OpenSwing Framework:: or JDeveloper, then you can visually create the grid frame by means of the UI load data in grid only the the Form is in read only mode and only after Form http://oswing.sourceforge.net/tutorial.htmlHOME | Grid Storage- Home:: High performance - All load balancing is automated within the pool and does not Integrated data services - data written to the grid is automatically protected http://www.nec-labs.com/research/robust/robust_grid-website/index.phpHOME |
var columns = gridSettingsValues.columms;
fields = gridSettingsValues.fields;
//alert(DataUrl);
// trigger the data store load
dataStore.load();
Grid = new Ext.grid.GridPanel({
title : gridName,
renderTo : document.body,
columns : columns,
ds:dataStore,
width : 450,
height : 338,
selModel : new Ext.grid.CellSelectionModel(),
plugins : [new Ext.ux.grid.Search({
mode : 'local'
})],
listeners : {}
});
};
function LoadGridData(DataUrl) {
dataStore = new Ext.data.Store({
// load using script tags for cross domain, if the data in on the same Data Filtering, Filter Editor Control - WinForms Grid and Editors :: Loading Home > The Developer Express Family of Products > Tools for Visual Studio® immediately after changing a value or only when end-users press the http://www.devexpress.com/Products/NET/Controls/WinForms/Grid/datafiltering.xmlHOME |
// domain as
// this page, an HttpProxy would be better
proxy : new Ext.data.HttpProxy({
url : DataUrl
}),
// create reader that reads the Topic records
reader : new Ext.data.JsonReader({
root : 'results',
totalProperty : 'totalCount',
id : 'id'
}, [fields])
});
// trigger the data store load
dataStore.load();
}
DynamicGrid = function() {
return {
CreateGrid : function(GridsettingsUrl,DataUrl, param, method) {
getGridsettings(GridsettingsUrl,DataUrl, param, method);
},
LoadData : function(DataUrl) {
LoadGridData(DataUrl);
}
};
}();
wow, that's really hard to read!
Yes it's possible to load data after the grid is instantiated/rendered. You need to inspect the store to see what's going on. also, does your data match the mapping (fields)?
is it possible to load data?
No.
Or, maybe it is since there's so many examples of grids with data in them. :)
I can't stand reading coding that's not properly indented, so maybe you can look at the Grid FAQ to figure out your problem. The first one should help.
can you please provide me example.
the example looks like
1. function has to return grid settings like function getgridsettins(url,params) and return json object
2. function to create the grid by taking json object and has return grid component.
3. function has to take grid and load the data.
Where's The Advantage In Windows Genuine Advantage?
Stocks Bounce After S&P Joins Bear Market |