EasyUI Forum
September 14, 2025, 07:21:00 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: loading json from remote URL not working on: November 27, 2012, 08:05:08 PM
I think I ran into the same origination policy issue. When I copied over the JS files to the remote-host, its working fine.

I read somewhere that getJson uses a different protocol. I am wondering if there is a work around for this issue that I just ran into.
2  General Category / EasyUI for jQuery / Re: loading json from remote URL not working on: November 27, 2012, 04:14:19 PM
Even I tried the following. Its not working either. Sad

Code:
 $(document).ready(function(){ 
var mydata;
$.getJSON("http://remote-host/test.json", function(json) {
  mydata = json;
});
$('#tt').datagrid('loadData', mydata); alert('here');}
 )
3  General Category / EasyUI for jQuery / loading json from remote URL not working on: November 27, 2012, 03:59:47 PM
Hi,

I have a treegrid which is using the local json file. However, I made the data-options URL remote and the tree grid stopped working. I can see a call being made to remote data file and then a 200 ok response in firebug. However, the data is not displayed.

Before:
Code:
	<table id="tt" title="TreeGrid" class="easyui-treegrid" style="width:700px;height:300px"
data-options="url:'test.json',idField:'id',treeField:'code',

After(data not getting loaded from remote URL):
Code:
	<table id="tt" title="TreeGrid" class="easyui-treegrid" style="width:700px;height:300px"
data-options="url:'http://remote-host/test.json',idField:'id',treeField:'code',

Could someone please help?
4  General Category / EasyUI for jQuery / Re: hide functonality in tree grid on: November 20, 2012, 05:45:07 PM
I just implemented the hide column functoinality. Idea is to load the entire table disabling the column that is not needed.

However, I am still struggling with hiding the whole treegrid. Any help will be highly appreciated.

I tried the following 2 options. Both of them didnot work.

1) $('table').hide(); // Just hides the contents of treegrid. How Can I select the whole treegrid object?
2) $('#tt').hide(); //Doesnt work at all

Following is the tree grid table def that I am using.

<table id="tt" title="TreeGrid" class="easyui-treegrid"
5  General Category / EasyUI for jQuery / hide functonality in tree grid on: November 20, 2012, 04:32:19 PM
Hi,

I am looking for 2 functionality.

1) Hide a column in treegrid
2) Hide the total treegrid

Could someone please give me an example of how I could achieve this?

Thanks,
Rahul
6  General Category / EasyUI for jQuery / how to save the changes on: November 13, 2012, 03:10:30 PM
Hi,

I am using an editable treegrid. After doing the changes on the client side JS, I want to push these changes to server.

Can I submit the treegrid object to server? Any example/help will be greatly appreciated.

Thanks,
Rahul
7  General Category / EasyUI for jQuery / Re: editable treegrid issue on: November 13, 2012, 11:53:16 AM
I tried that as well. Still Edit is not working Sad

Code:
<script type="text/javascript" src="../../jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
<script>
    $('#tt').treegrid({ 
url:'data.json', 
idField:'Dashboard', 
treeField:'Dashboard',
columns:[[ 
{title:'Dashboard',field:'Dashboard',width:60}, 
{field:'URL',title:'URL',width:200} 
]]
    });

function editNode(){
var node = $('#tt').treegrid('getSelected');
if (node){
alert(node.id);
$('#tt').treegrid('beginEdit',node.Dashboard);
}
}
</script>
</head>

<body>
<h2>TreeGrid</h2>

<div style="margin:10px 0;">
<a href="#" onclick="remove()">Remove</a>
<a href="#" onclick="append()">Append</a>
<a href="#" onclick="editNode()">Edit</a>
<a href="#" onclick="getSelected()">GetSelected</a>
</div>

<table id="tt" class="easyui-treegrid" style="width:600px;height:400px" 
        data-options="url:'data.json',idField:'Dashboard',treeField:'Dashboard'"> 
<thead> 
<tr> 
<th data-options="field:'Dashboard',width:180">Task Name</th> 
<th data-options="field:'URL',width:60,align:'right'">Persons</th>
</tr> 
</thead> 
</table>

8  General Category / EasyUI for jQuery / editable treegrid issue on: November 12, 2012, 06:26:22 PM
The edit functionality is not working. Is this a bug or am I doing something wrong?

When I click on edit by selecting a row, I see the node.id in the alert, but I am not able to edit the row. Any help will be greatly appreciated.

        <script type="text/javascript" src="../../jquery-1.8.0.min.js"></script>
   <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
   <script>
         $('#tt').treegrid({ 
         url:'data.json', 
         idField:'Dashboard', 
         treeField:'Dashboard',
         columns:[[ 
            {title:'Dashboard',field:'Dashboard',width:60}, 
            {field:'URL',title:'URL',width:200} 
         ]]
       });
      
      function editNode(){
         var node = $('#tt').treegrid('getSelected');
         if (node){
            alert(node.id);
            $('#tt').treegrid('beginEdit',node.id);
         }
      }
         
      
   </script>
</head>

<body>
   <h2>TreeGrid</h2>
   
   <div style="margin:10px 0;">
      <a href="#" onclick="remove()">Remove</a>
      <a href="#" onclick="append()">Append</a>
      <a href="#" onclick="editNode()">Edit</a>
      <a href="#" onclick="getSelected()">GetSelected</a>
   </div>

   <table id="tt" class="easyui-treegrid" style="width:600px;height:400px" 
        data-options="url:'data.json',idField:'Dashboard',treeField:'Dashboard'"> 
      <thead> 
         <tr> 
            <th data-options="field:'Dashboard',width:180">Task Name</th> 
            <th data-options="field:'URL',width:60,align:'right'">Persons</th>
         </tr> 
      </thead> 
   </table>

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