EasyUI Forum
May 23, 2024, 02:36:20 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: why my datagrid is loaded 2 times on: January 06, 2013, 08:49:12 PM
remove css in your table definition and your datagrid won't loaded 2 times again  Smiley
2  General Category / EasyUI for jQuery / Re: help me please. can we use combogrid filter more than one in on page on: July 29, 2012, 08:21:45 PM
halo rishal,

tidak masalah anda gunakan lebih dari 1 combogrid filter dalam satu form.
 $(function(){

function initObat(suplierId){
      $('#cc').combogrid({
         ........
         url: 'popkode.php?supplierId=' + supplierId,
         ......
      });
      $('#cc').combogrid('enable');
}

 $('#cg').combogrid({
         .........,
          url: 'popsupplier.php',
         /** jika mau filter kode obat berdasar supplier, gunakan saja event onSelect */
         onSelect:function(row){
            var supplierId = $('#cg').combogrid('getValue');
            initObat(supplierId);
           
         }

   });

  // Jika diperlukan, disable dulu combogrid kode obat sebelum kode supplier di pilih
  $('#cc').combogrid('disabled');
}
3  General Category / EasyUI for jQuery / Re: How to make select field required with missingMessage on: July 26, 2012, 07:25:25 AM
You can make uneditable combobox with just set editable property set to false.

$('#xx').combobox({
            ...
            editable:false,
            method:'get',
            ...
});
4  General Category / EasyUI for jQuery / Re: Why this form won't submitted ? on: July 24, 2012, 08:28:48 PM
OK, problem fixed. masalahnya ada di combogrid, setting required=true pada inisialisasi combogrid konflik dengan html5...

referensi: http://www.jeasyui.com/forum/index.php?topic=505.msg1100#msg1100
5  General Category / EasyUI for jQuery / Re: How to make Collapsed datagrid ? on: July 20, 2012, 07:21:09 PM
thankyou stworthy...

heru
6  General Category / EasyUI for jQuery / How to make Collapsed datagrid ? on: July 19, 2012, 10:33:00 PM
hi all,

I have many datagrids in one page how to make these datagrids in collapsed state when user open the page ? Am I missing something ?

thankyou,

heru
7  General Category / EasyUI for jQuery / Re: using GET instead of POST on: July 17, 2012, 08:58:19 PM
hi tomhj,

Thankyou for feedback, i'm using django (python ) for the server side processing.. since CSRF protection in Django is restricted POST data using csrf token...

heru
8  General Category / EasyUI for jQuery / Re: How To Set Required and display error messag for input for combogrid in a Form ? on: July 17, 2012, 08:54:49 PM
Thankyou stworthy, it works like charm... Smiley

heru
9  General Category / EasyUI for jQuery / using GET instead of POST on: July 16, 2012, 11:38:56 PM
Hello all,

please tell me how to change ajax request method in datagrid, combogrid  from POST to GET ?

Thankyou

heru -- indonesia
10  General Category / EasyUI for jQuery / Why this form won't submitted ? on: July 16, 2012, 09:40:58 PM
hi all, please someone tell me what's wrong with this code ? why the form won't submitted ?

HTML

<!DOCTYPE html>
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta name="keywords" content="jquery,ui,easy,easyui,web">
   <meta name="description" content="easyui help you build your web page easily!">
   <title>Grid Validation</title>
   <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
   <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">
   <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
   <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
   <script type="text/javascript">
   $(document).ready(function(){   
      $('#xx').combogrid({
         panelWidth:450,            
         required:true,
         multiple:false,
         idField:'code',
         textField:'name',
         url:'data/datagrid_data.json',
         columns:[[
            {field:'code',title:'Code',width:60},
            {field:'name',title:'Name',width:100},
            {field:'addr',title:'Address',width:120},
            {field:'col4',title:'Col41',width:100}
         ]]
      });
      $('#ff').form({            
         success:function(data){
            $.messager.alert('Info', data, 'info');
         }
      });
   });
      
   </script>
</head>
<body>   
   <form id="ff" method="post" action="index.php">
      <table>
         <tr>
            <td>Name:</td>
            <td><input type="text" name="name" style="width:350px;"/></td>
         </tr>
         <tr>
            <td>Address:</td>
            <td><input type="text" name="address" style="width:350px;"/></td>
         </tr>
         <tr>
            <td>City:</td>
            <td><select class="easyui-combotree easyui-validatebox" required="true" url="data/city_data.json" name="city" style="width:156px;"/></td>
         </tr>
         <tr>
            <td>Item:</td>
            <td><select class="easyui-validatebox" id="xx" name="xx" style="width:350px;"/></td>
         </tr>         
         <tr>
            <td></td>
            <td><input type="submit" value="Submit"></input></td>
         </tr>
      </table>
   </form>   
</body>
</html>

index.php

<?php

$name = $_POST['name'];
$address = $_POST['address'];
$city = $_POST['city'];
$item= $_POST['xx'];
echo "Your Name: $name <br/> Your Address: $address <br/>Provinsi $item<br/> Your City ID: $city";

?>

data/datagrid_data.json

{                                                     
   "total":239,                                                     
   "rows":[                                                         
      {"code":"001","name":"Name 1","addr":"Address 11","col4":"col4 data"},         
      {"code":"002","name":"Name 2","addr":"Address 13","col4":"col4 data"},         
      {"code":"003","name":"Name 3","addr":"Address 87","col4":"col4 data"},         
      {"code":"004","name":"Name 4","addr":"Address 63","col4":"col4 data"},         
      {"code":"005","name":"Name 5","addr":"Address 45","col4":"col4 data"},         
      {"code":"006","name":"Name 6","addr":"Address 16","col4":"col4 data"},         
      {"code":"007","name":"Name 7","addr":"Address 27","col4":"col4 data"},         
      {"code":"008","name":"Name 8","addr":"Address 81","col4":"col4 data"},         
      {"code":"009","name":"Name 9","addr":"Address 69","col4":"col4 data"},         
      {"code":"010","name":"Name 10","addr":"Address 78","col4":"col4 data"}     
   ]                                                         
}   

data/city_data.json

[{
   "id":1,
   "text":"City",
   "children":[{
      "id":11,
      "text":"Wyoming",
      "children":[{
         "id":111,
         "text":"Albin"
      },{
         "id":112,
         "text":"Canon"
      },{
         "id":113,
         "text":"Egbert"
      }]
   },{
      "id":12,
      "text":"Washington",
      "state":"closed",
      "children":[{
         "id":121,
         "text":"Bellingham"
      },{
         "id":122,
         "text":"Chehalis"
      },{
         "id":123,
         "text":"Ellensburg"
      },{
         "id":124,
         "text":"Monroe"
      }]
   }]
}]
11  General Category / EasyUI for jQuery / Re: How To Set Required and display error messag for input for combogrid in a Form ? on: July 16, 2012, 03:53:32 AM
hi stworthy, thanky you for quick feedback. here is the code:
this form won't submitted when submit button clicked, but there is no informative error message just like in normal validatebox.

<!DOCTYPE html>
<html>
<head>
    <title>Test</title>
    <link rel="stylesheet" type="text/css" href="/static/css/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="/static/css/themes/icon.css">
   <script type="text/javascript" src="/static/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="/static/js/jquery.easyui.min.js"></script>
   <script type="text/javascript">
   $(function(){
      $("#province").combogrid({
         panelWidth:500,
         url:"/core/search_provinsi/",
         idField: 'id',
         textField:'name',
         mode:'remote',
         fitColumns:true,
         columns:[[
            {field:'id',title:'ID',width:60},
            {field:'name',title:'Name',width:150}
         ]]
      });
         
      $('#test_form').form({
         url : '/quickaccess/province/newaction/',
         onSubmit: function(){            
            var result =  $("#test_form").form('validate');            
            if(result){               
               $(":submit", this).attr("disabled", "disabled");
               $.messager.progress();
            }
            return result;
         },
         success:function(success){
            $.messager.progress('close');
            
            if(success){
               $(this).form('clear');
               $.messager.show({
                  title:'Success',
                  msg:'Success'
               });
               window.location = "/quickaccess/list/";

            }else{
               $.messager.show({   // show error message
                  title: 'Error',
                  msg: success
               });
            }
         }
      });
   });
   </script>
</head>
<body>
<form method="post" id="test_form">
   <label for="id_province">Province</label>
   <input required="true" type="text" id="province">
   <input type="submit" name="save" value="save">
</form>
</body>
</html>
12  General Category / EasyUI for jQuery / How To Set Required and display error messag for input for combogrid in a Form ? on: July 15, 2012, 06:40:41 PM
Hello,

I'm new member here, and this is my first post...  Smiley

I have a form which contain some combogrid. These combogrid value must entered so the form can submitted. how to set validation on this combogrid as required since if I passed required="true" id combogrid tag ie. <input id="someid" required="true"/> there is no error message displayed in combogrid input but form validation is false.

Thank you for attentions,

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