EasyUI Forum
June 01, 2024, 05:00:52 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: 1 [2]
16  General Category / EasyUI for jQuery / Re: Numberbox ,datebox types are not displaying with easyui-datebox class on: October 30, 2014, 03:40:07 AM
       <div  id="editPrjPopup" data-options="iconCls:'icon-edit'" style="display:none;">
      <form id="fm" method="post">
      <table id="tb"> </table>
      

      </form>
      </div>

This is my div with popup and inside form ...
   $('#editPrjPopup').dialog({
      title: 'Edit Project',
      width: '80%',
      closed: false,
      cache: false,
      modal: true,
      height: '60%',
   });


and inside popup there is a table.I am loding table content dynamically .When loading dynamically its not showing date box number box ....just taking as text box.
pls look below code how i m loading dynamic table content inside popup.

for (var item in editors)
      {
         if (typeof editors[item] !== 'function') {
            console.log(editors[item]);
            var type= editors[item].type;
               switch(type) {
                   case "text":
                    //execute code block 1
                     tdData += '<td>'+editors[item].field+':<input type="text" class="easyui-textbox" data-options="min:0,precision:2" value="'+editors[item].oldHtml+'"></input></td>';
                    break;
                   case "numberbox":
                    //execute code block 2
                   tdData += '<td>'+editors[item].field+':<input type="text" class="easyui-numberbox" value="100" data-options="min:0,precision:2"></input></td>';
                   break;
                   case "datebox":
                    //execute code block 3
                   tdData += '<td>'+editors[item].field+':<input type="text" class="easyui-datebox" value="'+editors[item].oldHtml+'"></input></td>';

                    break;
                   default:
                   // code to be executed if n is different from case 1 and 2
               } 
         }
            console.log("count + tdData"+ count +" :: "+tdData);
            if(compCount === count){
            $('<tr>'+tdData+'</tr>').appendTo(table);
            count = 0;
            tdData ='';
            }else{
            count = count+1;
            }

      }
17  General Category / EasyUI for jQuery / Re: Numberbox ,datebox types are not displaying with easyui-datebox class on: October 30, 2014, 01:14:34 AM
I was trying inside table.please look the below code.

       <div  id="editPrjPopup" data-options="iconCls:'icon-edit'" style="display:none;">
      <form id="fm" method="post">
      <input id="dd" type="text" class="easyui-datebox" required="required"></td></tr></table>
      

      </form>
      </div>
18  General Category / EasyUI for jQuery / Re: Numberbox ,datebox types are not displaying with easyui-datebox class on: October 30, 2014, 01:08:13 AM
I am trying inside popup
19  General Category / EasyUI for jQuery / Numberbox ,datebox types are not displaying with easyui-datebox class on: October 30, 2014, 12:52:07 AM
Hi ,
I m trying to display number box dateboxes and comboxes as explained in documentaion .But i cant see any date box.All are displaying as textboxes only.
for eg <input id="dd" type="text" class="easyui-datebox" required="required">
is displayed as textbox.please help me soon
20  General Category / EasyUI for jQuery / How can I get only frozenColumns fields,data and editors with rowIndex on: October 29, 2014, 02:18:33 AM
How can I get only frozenColumns fields and its data and editors with rowIndex.pleas let me know
21  General Category / EasyUI for jQuery / Re: Subgrid is loading within frozen columns of ParentGrid on: October 28, 2014, 12:43:46 AM
Thanks lot for quick response.my requirement is not to create two sub grids in the detail view.
I have only one subgrid on click of expand row.But the problem is The subgrid is displayed only 50% of datagrid.The reason is to the parent grid i had given the below css because my requirement was to show 50% to frozen and 50% to columns.
.datagrid-view1 {
  width: 50% !important;
}
.datagrid-view2 {
  width: 50% !important;
}

.If I remove  this css
 .datagrid-view1 {
  width: 50% !important;
} the subgrid is fitting to 100% of width.And few columns were overlapped because I am having 19 columns in frozen columns
Please look the same in attached image.




 
22  General Category / EasyUI for jQuery / Re: Subgrid is loading within frozen columns of ParentGrid on: October 27, 2014, 11:37:10 PM
Thanks for your valuable response

I have given the width of frozenColums fields in % values.
Along with the css
.datagrid-view2 {
  width: 50% !important;
}
still i see the subgrid  half filled in the ui

actually i need this subgrid independent to fill in the ui area on the dataview2 also as currently it is not displaying.

 

23  General Category / EasyUI for jQuery / Re: Subgrid is loading within frozen columns of ParentGrid on: October 27, 2014, 11:33:22 AM
I had already mentioned in datagrid properties fitColumns.Please look into below html code.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta name="keywords" content="spark,RPT,spark datagrid">
   <meta name="description" content="SPARK, RPT DATA GRID">
   <title>SPARK DATA GRID</title>
   <link rel="stylesheet" type="text/css" href="css/easyui.css">
   <link rel="stylesheet" type="text/css" href="css/icon.css">
   <link rel="stylesheet" type="text/css" href="css/demo.css">
   <link rel="stylesheet" type="text/css" href="css/datagrid.css">
   <script type="text/javascript" src="js/jquery-1.6.min.js"></script>
   <script type="text/javascript" src="js/jquery.easyui.min.js"></script>
   <script type="text/javascript" src="js/jquery.edatagrid.js"></script>
   <script type="text/javascript" src="js/datagrid-detailview.js"></script>
   <link rel="stylesheet" type="text/css" href="css/dg_custom_styles.css">
   <script type="text/javascript">
   //Global Variables Declaration
   var gridRowsData = [];
   var gridColumnsNames = [];
   var gridFrozenColumnes = [];
   var subGridRowsData = [];
   var subGridColumnNames = [];
   var subGridFrozenColumnes = [];

   //Getting the data from projects.json and pushing to frozen , columns , rows arrays
   $.getJSON('php/projects.json', function(data) {
   gridColumnsNames.push(data.columns);
   gridRowsData = data.rows;
   //gridRowsData.push(data.rows);
   gridFrozenColumnes.push(data.frozenColumns);
   //loads datagrid content dynamically using edatagrid component
   $('#dg').datagrid({
    data: gridRowsData,
   frozenColumns: gridFrozenColumnes,
   columns: gridColumnsNames,
   display:'block',
   width:'100%',
   height:'auto',
   view: detailview,
   detailFormatter:function(index,row){
      //return '<div style="padding:2px"><table id="ddv_' + index + '"></table></div>';
   },
   onExpandRow: function(index,row){
   var opts = $(this).datagrid('options');
   var tr = opts.finder.getTr(this, index, 'body', 1);
   var c = tr.next().find('>td>div.datagrid-row-detail').empty();
   var dg = $('<table></table>').appendTo(c);
   subGridRowsData = []; subGridColumnNames = []; subGridFrozenColumnes = [];
   $.getJSON('php/subgrid/pr_'+row.project_id+'.json', function(data1) {
   subGridRowsData = data1.rows;
   subGridColumnNames.push(data1.columns);
   console.log(subGridColumnNames);
   subGridFrozenColumnes.push(data1.frozenColumns);
    dg.datagrid({
      data:subGridRowsData,
      fitColumns:true,
      singleSelect:true,
      rownumbers:true,
      columns: subGridColumnNames,
      frozenColumns: subGridFrozenColumnes,
      height:'auto',
      onResize:function(){
         $('#dg').datagrid('fixDetailRowHeight',index);
},
      onLoadSuccess:function(){
         setTimeout(function(){
            $('#dg').datagrid('fixDetailRowHeight',index);
         },0);
       }
    });
    $('#dg').datagrid('fixDetailRowHeight',index);
   
   });
   
   },
    });
   });
   </script>
</head>
<body>
<div class="header_color_line"></div>
   <table id="dg" title="Project Datagrid" style="width:100%;height:250px"
         pagination="true" idField="id"
         rownumbers="false" fitColumns="true" singleSelect="true">

   </table>
    <div class="footer_color_line"></div>
</body>
</html>
24  General Category / EasyUI for jQuery / Re: Subgrid is loading within frozen columns of ParentGrid on: October 27, 2014, 08:13:36 AM
Please have a look at the attachment.on the expand row of datagrid subgrid is  not occupied fully.only the frozen (ie the left side columns) columns are visible.rest of the columns are in background.please help me in fixing this.
25  General Category / EasyUI for jQuery / Re: Subgrid is loading within frozen columns of ParentGrid on: October 27, 2014, 05:00:36 AM
Hi I am facing one more ui issue.
I have Parent Grid with frozen columns and subgrid with frozen columns.Frozen  columns should occupy 50% and Columns to 50% As i have set in css.However in subgrid it is showing the right columns.Something is overlapping.I played with Z-index .But still dint work,Please help.Please look in the attachment

and css code is

.panel.datagrid.easyui-fluid {
  margin:0 auto;
  width: 1105px !important;
}
.panel-header {
  padding: 0.5% !important;
  width: 98% !important;
}
.datagrid-wrap.panel-body {
  width: 99% !important;
}
.datagrid-view {
  width: 100% !important;
}
.datagrid-view1 {
  width: 50% !important;
}
.datagrid-view2 {
  width: 50% !important;
}
.datagrid-header {
  width: 100% !important;
}
.datagrid-body {
  width: 100% !important;
}
.datagrid-footer {
  width: 100% !important;
}
.datagrid-pager.pagination {
  width: 100% !important;
}
.datagrid-header-inner {
  float: left;
  width: 100% !important;
}
.header_color_line{
background: url("images/Navigation_Logo.png") repeat-x scroll 0 0 / 100% 100% rgba(0, 0, 0, 0);
clear: both;
display: block;
height: 32px;
margin: 0 16px !important;
width: 1096px !important;
}
.footer_color_line{
background: url("images/Navigation_Logo.png") repeat-x scroll 0 0 / 100% 100% rgba(0, 0, 0, 0);
clear: both;
display: block;
height: 32px;
margin: 0 16px !important;
width: 1096px !important;
}
26  General Category / EasyUI for jQuery / Re: Subgrid is loading within frozen columns of ParentGrid on: October 23, 2014, 09:32:42 PM
please find the screenshot on the same.Here till type columns its frozen.From jan24 columns ,not showing scrollbar
27  General Category / EasyUI for jQuery / Re: Subgrid is loading within frozen columns of ParentGrid on: October 23, 2014, 09:28:27 PM
Hi ,
      After following the below code its not showing scrollbar to the columns next to Frozen columns.I have FozenColumns and columns.Frozen Columns are displayed to left.And columns next following by Frozen .its not showing the scrollbar to columns.However main grid is displayed with scrollbar.
28  General Category / EasyUI for jQuery / Re: Subgrid is loading within frozen columns of ParentGrid on: October 22, 2014, 04:55:39 AM
Hi Thanks a lot ..Its working now .. Smiley Exploring with Easyui
29  General Category / EasyUI for jQuery / Subgrid is loading within frozen columns of ParentGrid on: October 21, 2014, 03:30:24 AM
Hi,
I have A requirement of loading subgrid with Parent Frozen columns.I have implemented on the same ...But the problem is onExpandRow the subgrid is loading within parent frozen columns HTML div structure.There are Panels created in DoM.like datagrid-view1
 and datagrid-view2.The subgrid should created inside datagrid-view1.But it is creating in datagrid-view2.
Please help me in resolving the issue soon.
Below is my code



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <meta name="keywords" content="spark,RPT,spark datagrid">
   <meta name="description" content="SPARK, RPT DATA GRID">
   <title>SPARK DATA GRID</title>
   <link rel="stylesheet" type="text/css" href="css/easyui.css">
   <link rel="stylesheet" type="text/css" href="css/icon.css">
   <link rel="stylesheet" type="text/css" href="css/demo.css">
   <link rel="stylesheet" type="text/css" href="css/datagrid.css">
   <link rel="stylesheet" type="text/css" href="css/dg_custom_styles.css">
   <script type="text/javascript" src="js/jquery-1.6.min.js"></script>
   <script type="text/javascript" src="js/jquery.easyui.min.js"></script>
   <script type="text/javascript" src="js/jquery.edatagrid.js"></script>
   <script type="text/javascript" src="js/datagrid-detailview.js"></script>
   <script type="text/javascript">
   //Global Variables Declaration
   var gridRowsData = [];
   var gridColumnsNames = [];
   var gridFrozenColumnes = [];
   var subGridRowsData = [];
   var subGridColumnNames = [];
   var subGridFrozenColumnes = [];
   var items = [];
      $.getJSON( "php/projects.json", function( data ) {

$.each( data, function( key, val ) {
items.push( "<li id='" + key + "'>" + val + "</li>" );
});
});
console.log('json'+ items);
   //Getting the data from projects.json and pushing to frozen , columns , rows arrays
   $.getJSON('php/projects.json', function(data) {
   gridColumnsNames.push(data.columns);
   gridRowsData = data.rows;
   //gridRowsData.push(data.rows);
   gridFrozenColumnes.push(data.frozenColumns);
   //loads datagrid content dynamically using edatagrid component
   $('#dg').datagrid({
    data: gridRowsData,
   frozenColumns: gridFrozenColumnes,
   columns: gridColumnsNames,
   display:'block',
   width:'100%',
   height:'auto',
   view: detailview,
   detailFormatter:function(index,row){
      return '<div style="padding:2px"><table id="ddv_' + index + '"></table></div>';
   },
   onExpandRow: function(index,row){
   subGridRowsData = []; subGridColumnNames = []; subGridFrozenColumnes = [];
   $.getJSON('php/subgrid/pr_'+row.project_id+'.json', function(data1) {
   subGridRowsData = data1.rows;
   subGridColumnNames.push(data1.columns);
   console.log(subGridColumnNames);
   subGridFrozenColumnes.push(data1.frozenColumns);
    $('#ddv_'+index).datagrid({
      data:subGridRowsData,
      fitColumns:true,
      singleSelect:true,
      rownumbers:true,
      columns: subGridColumnNames,
      frozenColumns: subGridFrozenColumnes,
      height:'auto',
      onResize:function(){
         $('#dg').datagrid('fixDetailRowHeight',index);
},
      onLoadSuccess:function(){
         setTimeout(function(){
            $('#dg').datagrid('fixDetailRowHeight',index);
         },0);
       }
    });
    $('#dg').datagrid('fixDetailRowHeight',index);
   
   });
   
   },
    });
   });
   </script>
</head>
<body>
   <table id="dg" title="Project Datagrid" style="width:100%;height:250px"
         pagination="true" idField="id"
         rownumbers="false" fitColumns="true" singleSelect="true">

   </table>
</body>
</html>
Pages: 1 [2]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!