EasyUI Forum
May 15, 2024, 08:43:09 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 / EasyUI for jQuery / Re: Is it correct behavior of datagrid? on: October 07, 2013, 02:26:46 AM
I have a datagrid created from markup.
The code of the lines1..4 is in the function which "feeds" this datagrid with data.
How then to be sure that only one database request will be done?

Unfortunately, do not very understand why my datagrid  has to be created with every selector statement?
Even if I like just to change only a property of the datagrid? - $('#dg-jrn').datagrid({showHeader: false});

What I have...
-------------------------------------------------------------------------------
   <table id="dg-jrn" title="Journal" class="easyui-datagrid" pagination="true" rownumbers="true" >
      <thead>
         <tr>
            <th field="jrn_dat" >Date</th>
            <th field="jrn_usrid" formatter=fmtUser>User</th>
            <th field="jrn_rec" >Text</th>
         </tr>
      </thead>
   </table>
----------------------------------------------------------------------------------
   function editRecord(){
      var row = $('#dg-jrn').datagrid('getSelected');
      if (row){
         idn = row.inc_idn;
         $('#inc_form').form('clear');
....
         incLoadJrn(row.inc_id);
....
         url = 'incact.php?act=update';
      }
   }
----------------------------------------------------------------------
   function incLoadJrn(value){
//1      $('#dg-jrn').datagrid({showHeader: false});
//2      $('#dg-jrn').datagrid({ url: 'jrnact.php?ent=inc'  });   
//3      $('#dg-jrn').datagrid('load',{ eid: value });
//4      $('#dg-jrn').datagrid({ url: 'jrnact.php?ent=inc', queryParams: { eid: value}  });   
   }
2  General Category / EasyUI for jQuery / Is it correct behavior of datagrid? on: October 06, 2013, 10:29:47 PM
Hello!

Please, check if the behavior of datagrid is correct. Or I do not understand something...
If I un-comment lines 1,2 and 3 - I get on the server side 3 requests to the database, not 1 as I expect! Why it is so?
If I use only lines 2 and 3 - thus, I see 2 database requests...
If I use line 4 - I see only 1 database request, just what is needed.
What can be wrong? If I add any code like $('#dg').datagrid - I get an extra database request, what is very unexpected.

//1      $('#dg').datagrid({showHeader: false});
//2      $('#dg').datagrid({ url: 'jrnact.php?ent=inc'  });   
//3      $('#dg').datagrid('load',{ eid: value });
//4      $('#dg').datagrid({ url: 'jrnact.php?ent=inc', queryParams: { eid: value}  });   
3  General Category / EasyUI for jQuery / Table header is not visible in a datagrid. on: October 06, 2013, 02:35:00 AM
Hello!

there is a next problem...

1. There is a very simple datagrid with a few columns. (Master).
2. Open my detailed screen for editing any selected record from this Master datagrid.
3. On the detailed screen, there is a new datagrid with some subordinated records. All subordinated records are shown in a good way.
4. But, every column header of this child datagrid has only a very beginning part of it's text. It means, f.e. if the header of a column is Current price - I see only a half of C letter. Thus, for 5 columns I see only a part of every first letter + vertical line delimiter between columns and all this takes a couple of centimeters on the screen...
5. If I click refresh button on the child pager then the header becomes good, just the way it should be, it means that every column header is fully visible.

Yes, I can use width="xxx" property for every  column header, but I need flexible width, because some of the columns has text values and they must be fully visible.

Can somebody advice how to make the header completely visible just after opening the detailed screen and not after refresh button clicking.

4  General Category / EasyUI for jQuery / Re: how to load easyui-combobox data after typing 1-2 symbols on: September 17, 2013, 01:32:45 AM
Hi, thanks for reply.

Yes, this should work, but maybe there is more elegant local side solution with JS?

Well, if NOT - will do this way.
5  General Category / EasyUI for jQuery / how to load easyui-combobox data after typing 1-2 symbols on: September 16, 2013, 11:01:47 PM
Hello!

I have an easyui-combobox. It's loading with PHP script and the amount of entries is ~2000.
Is it possible to let user input 1-2 leading chars and only after that to load with PHP scrips the records to the combobox? Thus, the result set will be much smaller in my case.

I have tried many combinations to pass Q parameters, but without success.

Greetings.
6  General Category / EasyUI for jQuery / easyui-searchbox with menu returns not name, but description on: September 12, 2013, 02:12:54 AM
Hello!
There is a small problem or misunderstanding. I have the next:
Code:
<input class="easyui-searchbox" data-options="searcher:orgSearch,prompt:'Input value',menu:'#org-sm'"></input>
<div id="org-sm" style="width:120px">
<div data-options="name:'all',iconCls:'icon-ok'">All organizations</div>
<div data-options="name:'sts'">Participants</div>
</div>
...
function orgSearch(value,name){
alert('You input: ' + value+'('+name+')');
}
...

Alert returns my input value + the description: All organizations or Participants, but in the demo the same alert returns ALL or STS.
I need namely ALL or STS and not the description.

The question is how to get ALL or STS?

Thanks in advance.
7  General Category / EasyUI for jQuery / Re: easyui-searchbox not aligned with easyui-linkbutton in a toolbar on: September 10, 2013, 08:18:48 PM
Thank you! It helped.
8  General Category / EasyUI for jQuery / easyui-searchbox not aligned with easyui-linkbutton in a toolbar on: September 09, 2013, 10:42:57 PM
Hello!

Can't get thru the problem of placing easyui-searchbox after three easyui-linkbuttons in my toolbar. The buttons are aligned to the bottom of the div and the searchbox is to top. If I use any input field instead of easy-search component - everything is aligned and looks good.

Looks urgly this
<div id="usr-tbar">
   <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addUsrRecord()">Add</a>
   <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editUsrRecord()">Edit</a>
   <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="removeUsrRecord()">Delete</a>
   <input id="ss" class="easyui-searchbox" style="width:300px" data-options="prompt:'Please Input Value'"></input>
</div>

Looks good this
<div id="usr-tbar">
   <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="addUsrRecord()">Add</a>
   <a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editUsrRecord()">Edit</a>
   <a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="removeUsrRecord()">Delete</a>
   <input id="ss" ></input>
</div>


Greetings.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!