Show Posts
|
Pages: [1]
|
1
|
General Category / EasyUI for jQuery / Re: Combobox default Text
|
on: February 05, 2014, 07:06:23 AM
|
Thanks, but that doesn't seem to show how to put text in a combobox to insert text to instruct the user to "Select". That selected a value which I don't see how it instructed the combobox to select a value.
Thanks
|
|
|
2
|
General Category / EasyUI for jQuery / Combobox default Text
|
on: February 05, 2014, 06:31:45 AM
|
How can I set default text to notify the user on what to do? Example would be to set text such as "Select an Option" as the first option but obviously wouldn't fire an event. Here's my current code: $('#cboParentOrganization').combobox({ url:'Organization/GetOrganizationByRole.php', valueField:'orgid', textField:'orgname', panelHeight:'190', width:'350', onSelect: function(rec) { } });
Thanks
|
|
|
3
|
General Category / EasyUI for jQuery / Change table title
|
on: January 03, 2014, 08:17:32 AM
|
How would I change the tables title in jquery? I want to change the title once an even happens such as combobox selection. I already tried below and neither worked: $('#dgMytablegrid').prop('title', 'your new title');
and $('#dgMytablegrid').prop('title', 'your new title');
Thanks
|
|
|
5
|
General Category / EasyUI for jQuery / Set value in combox from datagrid
|
on: December 27, 2013, 09:16:10 AM
|
I have a grid and when they select a row it brings up a dialog box with a textbox and a combobox. The data is being sent to the dialog box but the dropdown is not selecting the correct value. Here's my code: When they select a row I call a method: var row = $('#dgCategory').datagrid('getSelected'); if (row){ $('#dlgCategory').dialog('open').dialog('setTitle','Edit Category'); $('#frmCategory').form('load',row); url = 'Category/UpdateCategory.php?orgid='+_selectedOrganization + '&categoryid=' +row.categoryid; }
Here's the html code for the dialog box: <div id="dlgCategory" class="easyui-dialog" style="width: 300px; height: 180px; padding: 10px 20px" closed="true" buttons="#dlgCategory-buttons"> <form id="frmCategory" method="post"> <div class="fitem"> <input name="categoryid"> </div> <div class="fitem"> <input name="category"> </div> <div class="fitem"> <label>Category:</label> <input id="cboCategory" class="easyui-combobox" name="cboCategory" data-options="valueField:'id',textField:'text',url:'Lookups/Lookup.php?id=56660623-9932-42AD-AF88-8554618B4997', required:'true', panelHeight:'auto'"> </div> </form> </div>
Thanks
|
|
|
6
|
General Category / EasyUI for jQuery / Re: Datagrid pagination trouble
|
on: November 05, 2013, 07:32:30 AM
|
My server side code is: <?php
$OrgID = $_REQUEST['orgid']; $ServiceID = (isset($_REQUEST['serviceid']) ? $_REQUEST['serviceid'] : 'null');
$ch = curl_init();
$headers = array( "Authorization: Bearer ymDgEVplomtSrLilwlztwCFOOika", ); curl_setopt_array($ch, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_HTTPHEADER => $headers, CURLOPT_URL => "http://ipaddress:port/agency/1.0/Select_Keyword?OrgID=" . $OrgID . "&ServiceID=" . $ServiceID . "&KeywordID=null" )); $response = curl_exec($ch); curl_close($ch); $xml = preg_replace("/(<\/?)(\w+):([^>]*>)/", "$1$2$3", $response); $xml = simplexml_load_string($xml); $results = xml2array($xml); if (count($results) > 0) { if(isset($results['keyword'][0])) { $results = $results['keyword']; } } echo json_encode($results); function xml2array($xml) { $arr = array(); foreach ($xml->children() as $r) { $t = array(); if(count($r->children()) == 0) { $arr[$r->getName()] = strval($r); } else { $arr[$r->getName()][] = xml2array($r); } } return $arr; }
Also, I was wondering how to do it client side instead of server side. The problem is the grid populates just fine just that the paging is messed up. Am i not returning the data correctly? Thanks
|
|
|
7
|
General Category / EasyUI for jQuery / Re: Datagrid pagination trouble
|
on: November 04, 2013, 04:06:06 PM
|
I still can't get this to work. Can you see if I'm missing something. I tried following the example but it is not working. It is failing at ".splice == 'function'" because I'm returning json data. My grid populates just not paging correctly. $('#dgMostVisitedPages').datagrid({ url: 'MostVisitedPages/MostVisitedPages.php?orgid='+ _selectedOrganization, pagination:'true', singleSelect:'true', striped:'true', fitColumns:'true' });
<table id="dgServiceCategory" title="Service Categories" class="easyui-datagrid" toolbar="#toolbarServiceCategory" singleSelect="true"> <thead> <tr> <th data-options="field:'categoryid',width:80" hidden="true">ID</th> <th data-options="field:'category',width:50" >Category</th> </tr> </thead> </table> <div id="toolbarServiceCategory"> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="AddServiceCategory()">New Category</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="EditServiceCategory()">Edit Category</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="DeleteServiceCategory()">Remove Category</a> </div>
Thanks Dennis
|
|
|
8
|
General Category / EasyUI for jQuery / Re: Data grid paging remote loading false ?
|
on: November 04, 2013, 03:59:49 PM
|
I still can't get this to work. Can you see if I'm missing something. I tried following the example but it is not working. It is failing at ".splice == 'function'" because I'm returning json data. My grid populates just not paging correctly. $('#dgMostVisitedPages').datagrid({ url: 'MostVisitedPages/MostVisitedPages.php?orgid='+ _selectedOrganization, pagination:'true', singleSelect:'true', striped:'true', fitColumns:'true' });
<table id="dgServiceCategory" title="Service Categories" class="easyui-datagrid" toolbar="#toolbarServiceCategory" singleSelect="true"> <thead> <tr> <th data-options="field:'categoryid',width:80" hidden="true">ID</th> <th data-options="field:'category',width:50" >Category</th> </tr> </thead> </table> <div id="toolbarServiceCategory"> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="AddServiceCategory()">New Category</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="EditServiceCategory()">Edit Category</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="DeleteServiceCategory()">Remove Category</a> </div>
Thanks Dennis
|
|
|
9
|
General Category / EasyUI for jQuery / Re: Datagrid Pagination issue
|
on: November 04, 2013, 03:55:41 PM
|
Did you get it to work? I have this but it isn't working $('#dgMostVisitedPages').datagrid({ url: 'MostVisitedPages/MostVisitedPages.php?orgid='+ _selectedOrganization, pagination:'true', singleSelect:'true', striped:'true' });
<table id="dgServiceCategory" title="Service Categories" class="easyui-datagrid" toolbar="#toolbarServiceCategory" singleSelect="true"> <thead> <tr> <th data-options="field:'categoryid',width:80" hidden="true">ID</th> <th data-options="field:'category',width:50" >Category</th> </tr> </thead> </table> <div id="toolbarServiceCategory"> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="AddServiceCategory()">New Category</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="EditServiceCategory()">Edit Category</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="DeleteServiceCategory()">Remove Category</a> </div>
Thanks Dennis
|
|
|
10
|
General Category / EasyUI for jQuery / Re: Pagination not calculating correctly for html datagrid
|
on: November 04, 2013, 03:50:42 PM
|
I tried setting fit: true on my grid and it still doesn't work. $('#dgMostVisitedPages').datagrid({ url: 'MostVisitedPages/MostVisitedPages.php?orgid='+ _selectedOrganization, pagination:'true', singleSelect:'true', striped:'true', fitColumns:'true' });
<table id="dgServiceCategory" title="Service Categories" class="easyui-datagrid" toolbar="#toolbarServiceCategory" singleSelect="true"> <thead> <tr> <th data-options="field:'categoryid',width:80" hidden="true">ID</th> <th data-options="field:'category',width:50" >Category</th> </tr> </thead> </table> <div id="toolbarServiceCategory"> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="AddServiceCategory()">New Category</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="EditServiceCategory()">Edit Category</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="DeleteServiceCategory()">Remove Category</a> </div>
Thanks Dennis
|
|
|
11
|
General Category / EasyUI for jQuery / Datagrid Paging
|
on: November 04, 2013, 09:47:02 AM
|
I would like to use paging without the server because it seems you have to send pages and all that and I don't want to modify the stored procedures and all that. The other option that seems "cleaner" is client side paging. How would I do this calling an external .PHP page using URL? This is what I have. How would I modify what I have to make this work: javascript: $('#dgServiceCategory').datagrid({ url: 'Category/SelectCategories.php?orgid='+ _selectedOrganization + "&serviceid=" + rowData.id, pagination:'true', singleSelect:'true', striped:'true', fitColumns:'true' });
HTML: <table id="dgKeyword" title="Organization Keywords" class="easyui-datagrid" toolbar="#toolbarKeyword" > <thead> <tr> <th data-options="field:'keywordid', width:60" hidden="true">ID</th> <th data-options="field:'keyword',width:40" >Keyword</th> </tr> </thead> </table> <div id="toolbarKeyword"> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="AddKeyword()">New Keyword</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="EditKeyword()">Edit Keyword</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="DeleteKeyword()">Remove Keyword</a> </div>
Thanks Dennis
|
|
|
|