Comments (12)
Thank you for the feedback!
Your config looks well at first sight.
Try to change loadData
method like following to be sure that ajax call returns the same data (see in console):
loadData : function(filter) {
var d = $.Deferred();
filter["operation"] = "loadUrls";
$.ajax({
type : "GET",
url : "ruleenginehandler",
data : filter,
dataType : "json"
}).done(function(result) {
console.log(result);
d.resolve(result);
});
return d.promise();
},
Actually, there should be no difference between static data
and data returned by loadData
.
from jsgrid.
I tried what you suggested for load method. The console outputs the following :
[Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, Object]
I guess there are the objects that contain the data returned by my serer side code.
Is there any issue with this?
I will explain what I have done in my server side code for returning json array :
I have a pojo class which I convert to a json string using Gson. and then just return that same string as response. Is there something wrong I am doing in my server side code?
from jsgrid.
Hi,
If you want to see what your object contains change: console.log(result) by console.dir(result).
If I checked correctly your code your object must have at least this fields: userId, url, enable and timestamp. If not adapt your server code.
from jsgrid.
I tried using
console.dir(result).
It gives me following :
It is having all required params as mentioned by you. I don't understand what am I missing though.
from jsgrid.
I don't understand your part with the filter and your way to load data
Have you tried a more classic way to load your data ?
For example:
$.ajax({
url: "your/path",
type: 'GET',
dataType: 'json',
data: {
method: "your-method",
userId_filter: filter.userId,
url_filter: filter.url,
enable_filter: filter.enable,
timestamp_filter: filter.timestamp
}
}).done(function(response) {
d.resolve(response);
}).error(function(jqXHR) {
d.reject(jqXHR.status);
});
return d.promise();
from jsgrid.
Yes, I tried this, but this is also not working for me. Only loads first row data on each page.
My loadData method is called when page loads up first time as I have set autoLoad as true.
This my java code for loading data, if it helps :
List<ITCTable> data = dbManager.getAllUrls();
Gson gson = new Gson();
JSONArray jsonData = new JSONArray(gson.toJson(data));
System.out.println(data.size());
System.out.println(jsonData);
writer.write(jsonData.toString());
from jsgrid.
I don't know why sorry.
Just to be sure have you check the others objects in your result.
In your screenshot we can see the first object only.
from jsgrid.
Yes I checked each of 31 objects returned in my result and everything looks fine.
Please someone help me out with my problem, as I found this plug-in as the easiest for usage and understanding.
from jsgrid.
the only difference I see between your result and your static data is with the field enable.
You are using true/false with ajax and 1/0 in the static data.
and personally I have some problems with field name like "enable" or common name like this.
sorry not to be able to help you, I hope @tabalinas can.
from jsgrid.
I changed my server side code to return 0/1 instead of true/false, but still no luck.
@fanturi Thanks for your help and efforts.
UPDATE :
When I removed the CSS, it shows me all data with proper paging. Is there something wrong with the css (jsgrid.min.css
)?
from jsgrid.
Finally my problem is resolved.
I kept the height as 100% in my config which is why the data was not getting displayed below the first row.
I really apologize for this as I don't have much experience with UI.
from jsgrid.
Glad that you figured this out!
from jsgrid.
Related Issues (20)
- Difference between itemTemplate and cellRendering
- How to add subgrid in parent grid HOT 1
- Js grid get cell value cellClick HOT 2
- Need help datetime-local HOT 1
- Is there an official fork that is being heavily used and actively maintained? HOT 1
- Jsgrid select with search box HOT 1
- Detect value of selected value when inserting a new item
- 数据操作时,有没有直接失去焦点保存数据?
- JS grid load data above 5000
- editTemplate on row change error throw $inputFrom was not an function HOT 1
- Multiselect issue.
- Help with a php & Mysql
- Help needed with JsGrid loadData function after I upgraded an old project to .net 7.0 HOT 1
- Help needed with JsGrid loadData function after I upgraded an old project to .net 7.0
- Using autocomplete component with Select2
- How do I validate a DatePicker field? HOT 1
- Loading by Page + Ajax
- how to add password input type in jsgrid HOT 1
- Select type validate required not working in jsgrid
- How to render 1 table instead of 2 tables - First Table(Header, Filter and Insert Row) and Second Table(Item Row) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsgrid.