EasyUI Forum
May 02, 2024, 12:58:21 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 ... 27 28 [29]
421  General Category / EasyUI for jQuery / Re: Datagrid Re-Fit after Colum Show / Hide on: March 28, 2012, 11:57:39 PM
Bump...
422  General Category / EasyUI for jQuery / tree not firing on uncheck on: March 21, 2012, 05:02:02 AM
Hi, not sure if I am doing anything wrong, but during tree load the onCheck event is fired which is great as it shows the columns, however it does not hide those columns where the tree node is unchecked.

I am using the tree to dynamically show / hide columns in a datagrid.

Code:
onCheck:function(node){
  if(node.checked) {
    $('#data').datagrid('showColumn',node.id);
    console.log(node.id+' show');
}
else {
  console.log(node.id+' hide');
  $('#data').datagrid('hideColumn',node.id);
}
423  General Category / EasyUI for jQuery / Re: Datagrid with variable number of columns on: March 21, 2012, 01:17:13 AM
Hi;

Well the columns will be created based on the columns provided to the datagrid:

This will dynamically create 3 columns:

Code:
columns: [[
{field:'xxx',title:'xxx'},
{field:'xxx',title:'xxx'},
{field:'xxx',title:'xxx'},
]]

And this will dynamically create 5 columns:

Code:
columns: [[
{field:'xxx',title:'xxx'},
{field:'xxx',title:'xxx'},
{field:'xxx',title:'xxx'},
{field:'xxx',title:'xxx'},
{field:'xxx',title:'xxx'},
]]

I recall that there's also a demo on how to change the columns under the demo section.

Cheers
424  General Category / EasyUI for jQuery / Datagrid Re-Fit after Colum Show / Hide on: March 21, 2012, 01:11:02 AM
I have a data grid with say 10 frozen columns and 2 non frozen ones with fitColumns set to true.

This does exactly what I want and works GREAT, in that only the last 2 columns are stretched / squeezed to fit the remaining window width.

But the problem is I cannot get them to re-fit after a column has been hidden or displayed, I have tried all of these but nothing appears to re-fit the columns:

Code:
$('#data').datagrid('fixColumnSize');
$('#data').datagrid('fitColumns');
$('#data').datagrid('reload');

Any ideas Huh
425  General Category / EasyUI for jQuery / event after get but before load on: March 18, 2012, 10:24:55 PM
Hi;

With controls like the tree which has it's own axaj load function via supplied url etc, is it possible to have an event which fires after the data has been retrieved but before the data is loaded into the control elements Huh

I would like to do some processing of the data after retrieval but before it's actually loaded to the control's data elements.

Thanks

426  General Category / EasyUI for jQuery / Re: combobox edit formatting - SOLVED on: March 18, 2012, 07:57:08 PM
Brilliant !!

Thanks so much

Pete
427  General Category / EasyUI for jQuery / progress bar in datagrid on: March 18, 2012, 05:52:09 AM
Hi all;

I've been trying to add a progress bar to each row of the datagrid and update the % individually.

Any guidelines or code snippets to help me do this ??

Thanks
428  General Category / EasyUI for jQuery / combobox edit formatting on: March 17, 2012, 11:01:18 PM
Hi;

on pressing a "Add New" button, I want to change the combobox by removing the drop arrow, making it editable but also, preventing the drop down search after text is keyed into the box.

I have tried using a long delay, which has the desired effect of preventing the drop down appearing, but the problem is the value of the combobox does not get the value of the textbox.

How can I prevent the drop down appearing but allow the combobox to get the entered value ??

Code:
$('.fkey').combobox({hasDownArrow:false,editable:true,delay:60000,width:'152'});
429  General Category / EasyUI for jQuery / tab on unSelect on: March 15, 2012, 04:07:22 AM
Hi;

I need to be able to fire off some actions related to the selected tab when the current tab's focus is lost, i.e when another tab is selected.

Other than saving the current tab's Title to a persistent variable and reading this value into the onSelect handler for the opening tab to process, is there a better way ??

430  General Category / EasyUI for jQuery / Re: addin dilog to panel on: March 14, 2012, 11:39:31 PM
Hi;

Thanks so much for helping, but the problem is not that I can't add a <div> container to a tab, but the fact that the dialog script appears to remove itself from the tab, and append itself to the <body>.

Here's an example, the div is added successfully to the tab, and as soon as the dialog() function is executed, the dialog is created and append to the <body> and not to Tab1.

Code:
<script type="text/javascript" src="../jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../jquery.easyui.min.js"></script>
<link rel="stylesheet" type="text/css" href="../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../themes/icon.css">
<script>

$(document).ready(function(){
var tab = $('#ttab').tabs('getTab','Tab1');
var div = $('<div>').attr({'id':'Main_epan'});
$(tab).append(div);
$('#Main_epan').dialog({content:'Test Text'})
})

</script>

<body class="easyui-layout">

<!-- Main Body -->
<div region="center" title="Main Title" style="overflow:hidden;">
<div class="easyui-tabs" fit="true" border="false" id="ttab">
<div title="Tab1" style="padding:20px;overflow:hidden;"> </div>

</div>
</div>


</body>

431  General Category / EasyUI for jQuery / addin dilog to panel on: March 13, 2012, 03:42:46 AM
Hi;

I need to dynamically add elements to a tab and are having problems with the dialog panel.

I want to add them to the tab as there are many tabs and when a tab is closed I want to also destroy the dialog, and it seems the most logical way to do it.

First I check if the tab exists and add it if it doesnt.

Then I append the dialog <div> container which is loaded correctly to the tab.

but as soon as I call the dialog, the div container is removed from the tab and appended to the body.

How can I dynamically add to the tab ??

Code:
// if NOT tab then add it.
var exists = $('#ttab').tabs('getTab',tabID);
if(!exists) $('#ttab').tabs('add',{title:tabID});

// Append the dialog Container
$(tab).append($('<div>').attr({'id': 'epan'}));

// Init the dialog
$('#epan').dialog({})
Pages: 1 ... 27 28 [29]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!