Showing posts with label jEasyUI. Show all posts
Showing posts with label jEasyUI. Show all posts

Nov 15, 2017

[Solution] How to empty a data grid in jeasyui ?

Question :

I have a data grid with 1000 records when i perform a search on a table, i need to remove all records in the data grid when i call a method, how can i do that ?

Answer :

1. We could load an empty data set to the data grid.
    $('#dg').datagrid('loadData', {"total":0,"rows":[]});

2. We could remove only the selected records in the data grid.

var rows = $('#tt').datagrid('getSelections');  // get all selected rows
for(var i=0; i<rows.length; i++){
var index = $('#tt').datagrid('getRowIndex',rows[i].id);  // get the row index
$('#tt').datagrid('deleteRow',index);
}


Nov 13, 2016

[Fixed Solution] jEasy UI Messenger Change Button Text

Question
I am using jEasy UI Framework for my project. I am using $.messager.confirm to get a confirmation from the user.
Which shows two buttons OK and Cancel.
How can i change button text when i am using $.messager.confirm ?
Example:
'ok' => 'yes',
'cancel' => 'no'
ANSWERE
$.messager.defaults.ok = 'Yes';
$.messager.defaults.cancel = 'No';
These are the two lines which will be need to change the text property of the prompt messenger in jEasy UI

Sep 26, 2016

Disable All Tabs In JEasy UI [Solved]

Question 
I am using jeasy ui Tabs. Link To Jeasy Ui Tabs
Is there a way to disable all tabs at once. ??
Currently i am able to disable one by one only.
$('#tab').tabs('disableTab', 1);    
$('#tab').tabs('disableTab', 2);
Answer 
once soulation :
$('#tab').tabs('tabs').forEach(function(v,i){
     var opts=$('#tab').tabs("getTab",i).panel("options");
     opts.tab.addClass("tabs-disabled");
     opts.disabled=true;      
});
other soulation :
$('#tab').tabs('tabs').forEach(function(v,i){
  var opts=$('#tab').tabs("disableTab",i);
});

JWT Token Decode Using Jquery

When it come to authentication we use many mechanism. Ones the user authenticated we must keep these details somewhere safe. So we can share...