EasyUI Forum
May 03, 2024, 09:12:54 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / Bug Report / Datagrid group-view: incorrect row number height on: November 14, 2011, 02:48:19 AM
In datagrid group-view extension, the row numbering TD does not stretch according the rest row height.
When group is reopened or browser window resized, it is fixed. Tested on FF7, works on IE8+ (but few pixels off)
2  General Category / EasyUI for jQuery / Re: Serverside validation and editable datagrid on: July 19, 2011, 04:42:03 AM
Thank you very much for help and update.
$(nameEditor.target) was the tricky part...Smiley
3  General Category / EasyUI for jQuery / Re: Serverside validation and editable datagrid on: July 18, 2011, 02:02:20 AM
Ah, it is already updated Smiley nice...

Anyways, I have now problem to retrieve data of all editors in a row inside onBeforeSave(), so I can sent it to server in an post array...
I tried:
Code:
onBeforeSave: function(index){
    $('#tt').edatagrid('endEdit', index);
    var changes = $('#tt').edatagrid('getChanges');
}

but it seems that call endEdit triggers saving of the data to the server regardless what is defined in
onBeforeSave
4  General Category / EasyUI for jQuery / Re: Serverside validation and editable datagrid on: July 16, 2011, 02:12:19 AM
Indeed. Does it mean you are going to include it in some future release?
5  General Category / EasyUI for jQuery / Re: Serverside validation and editable datagrid on: July 15, 2011, 06:39:56 AM
The first way does not work with combobox. It always sends textValue to the server, not the fieldValue and I cant handle returned error message to show it to user.

The other way looks more flexible, but I was simply not able to find out, which event should I put it in...onBeforeEdit seems to be too early, onAfterEdit is already late...

I use $('#tt').edatagrid('saveRow'); call from toolbar button, I can probably do it this way:
handler:function(){
    //validation code

    $('#tt').edatagrid('saveRow');
}
but still I cant validate before new row is created automatically without user actually clicked on "Save" button. If user clicks on "Create" button, the currently edited row is sent to server without validation. And returning false, onSave event, seems not to stop row from being sent to server...I guess, it is needed to have onBeforeSave event.
6  General Category / EasyUI for jQuery / Serverside validation and editable datagrid on: July 14, 2011, 10:26:47 AM
Is it possible to return false status to editable datagrid in server response?
When I create a new record, I use serverside validation for additional checks (e.g. duplicity of the item etc.)
I however didnt find anything in documentation, if there are any return values which save/update/destroy calls listen to.
7  General Category / EasyUI for jQuery / Grids within Tabs with the same ID on: July 12, 2011, 06:27:27 AM
I am using tabs, each tab having a grid as its "content". How to avoid DOM conflicts if all the grids must have the same table ID.?
I use rather tricky loop, where I update all tabs content with ' ', except the selected one, but it does not work in Firefox 4 (grid does not show the data). It does however work in FF3.6...
Any idea?
8  General Category / EasyUI for jQuery / Re: treegrid dynamic load and grid refresh on: July 08, 2011, 02:02:30 AM
I actually sorted this out, hopefully it can help someone else:

if you use lazy data load to branches of a treegrid, the URL property will be poluted by queryParams, such as
id = id of selected row
pageNumber = from pagination (if used)
pageSize = from pagination (if used)
this is everything perfectly ok, till you decide to reload the whole grid (e.g. after you append a new row). The poluted data URL is used to fetch data from server, but with appended queryParams the server cannot really distinguish whether to send all recordset or only branch data. For that reason you have to clear things out.

Used this snippet to reload grid:
Code:
var params = $('#tt').treegrid('options').queryParams;
if(params.id){delete params.id};
$('#tt').treegrid('reload');

Note, that I preserved all other params except id, as they will not interfere with server side logic.
also note, that pagination object must be handled separately:

I added this event function:
Code:
onBeforeRefresh:function(pageNumber, pageSize){
            var params = $('#tt').treegrid('options').queryParams;
            if(params.id){delete params.id};
        }

If there is a smarter way how to handle this kind of a problem, I will certainly appreciate to hear about it. Thanks.
9  General Category / EasyUI for jQuery / Re: determining object type on: July 08, 2011, 01:08:23 AM
Thank you. Worked. Roll Eyes
10  General Category / EasyUI for jQuery / treegrid dynamic load and grid refresh on: July 07, 2011, 01:30:23 PM
I use treegrid component and because of the number of records, i load branches dynamically via ID reference.
Problem is, that when I hit refresh, the appended id in uri is sent to server and it returns only that portion of records that is supposed to be that branch data...
My question is how can I load data dynamically to the treegrid and be able to refresh the whole grid without last used ?id=foo beying appended to grid url.
11  General Category / EasyUI for jQuery / determining object type on: July 07, 2011, 11:39:44 AM
Is it possible to determine what UI object is attached to a DOM node?
e.g.

$('#tt').datagrid({config...})

how can I check that UI object attached to $('#tt') is actually datagrid? Option object does not return it.
I use to reload data in grids using single common function, but have troubles to determine if it is datagrid or treegrid.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!