EasyUI Forum
May 04, 2024, 05:43:53 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 [3] 4
31  General Category / General Discussion / Re: closing datetimebox on: January 25, 2019, 05:30:58 PM
Hello,

I have exactly the same problem, but dont understand where to put this code.

Cannot be onSelect/onChange in datetimebox data-options as there I dont get the time, only date.
And if I just put outside afterwards in normal script tag then it does not work either.

I simply dont get the time when clicking on the datetimebox calendar and it also does not closed as wanted after the click.

Help appreciated very much and thx in advance !!!

BR Michael.
32  General Category / General Discussion / Re: Datagrid Multiple Sorting - sorting wrongly bug? on: December 06, 2018, 10:02:17 AM
GOT IT!
Thanks Jarry!!!
33  General Category / General Discussion / Re: Datagrid Multiple Sorting - sorting wrongly bug? on: December 05, 2018, 05:21:26 PM
Thanks a lot Jarry, I was assuming this but could/cannot solve it in my code.

I also introduced a sorter function in the table with just these 2 columns,
but the sort function is always showing the values of the first column for comparison.

Any idea???

QUOTE/CODE
<table id="dg" class="easyui-datagrid" title="Multiple Sorting" style="width:1000px;height:400px"
        data-options="
            singleSelect:true,
            collapsible:true,
            remoteSort:false,
            multiSort:true
        ">
    <thead>
        <tr>
            <th data-options="field:'productname',width:100,sortable:true,sorter:MMRDatagridSorter">ProductName</th>
            <th data-options="field:'listprice',width:80,align:'right',sortable:true,sorter:MMRDatagridSorter">List Price</th>
        </tr>
    </thead>
</table>
<div id="mrrconsole"></div>

<script type="text/javascript" src="includes/JS/mrr-main.js"></script>

<script>



//var gDEBUG_LEVEL = 0;  

function MMRDatagridSorter(a,b)
{
  var a_pure = strip(a);
  var b_pure = strip(b);
  logconsole("MMRDatagridSorter(): a_pure=["+a_pure+"] b_pure=["+b_pure+"]");
  
  if ( (a_pure.length == 10) && (a_pure.substr(2,1) == '.') && (a_pure.substr(5,1) == '.') &&
       (b_pure.length == 10) && (b_pure.substr(2,1) == '.') && (b_pure.substr(5,1) == '.')  
     )
  {
    logconsole(' => date');
    a = a_pure.split('.');
    b = b_pure.split('.');
    logconsole(' => date a=['+a+'] b=['+b+']');
    if (a[2] == b[2])
    {
        logconsole(" => (a[2] == b[2]) TRUE" );
        if (a[1] == b[1])
        {
            logconsole(" => (a[1] == b[1]) TRUE return=" + (a[0]>b[0]?1:-1) );
            return (a[0]>b[0]?1:-1);
        } else
        {
            logconsole(" => (a[1] == b[1]) FALSE return=" + (a[1]>b[1]?1:-1) );
            return (a[1]>b[1]?1:-1);
        }
    } else
    {
        logconsole(" => (a[2] == b[2]) FALSE return=" + (a[2]>b[2]?1:-1) );
        return (a[2]>b[2]?1:-1);
    }
  }
  else if ( !isNaN(a_pure) && !isNaN(b_pure) )
  {
    logconsole(' => both numbers return=' + ( (parseFloat(a_pure)>parseFloat(b_pure))? 1: -1) );
    return ( (parseFloat(a_pure)>parseFloat(b_pure))? 1: -1);
  }
  else
  {
    logconsole(' => neither date nor numbers return=' + (a_pure>b_pure?1:-1) );
    return (a_pure>b_pure?1:-1);
  }
}
UNQUOTE/CODE
34  General Category / General Discussion / Datagrid Multiple Sorting - sorting wrongly bug? on: December 05, 2018, 02:15:46 PM
Hello,

I wonder if anybody ever noted, that the multiple sorting on the demo page is actually sorting wrong?

1. looking here https://www.jeasyui.com/easyui/demo/datagrid/multisorting.html
2. click "Unit Cost" sort as first column (where the many 12 are)
3. click "List Price" sort as second column
 
With this all "Unit Cost" rows are sorted correctly, but within the "Unit Cost=12" group
a lot of rows get sorted correctly, but then ItemID EST-14 with List Price 158 gets listed below 18.5
which is so far the lowest List Price. ASC/DESC of List price same problem.

Hope I dont get anything wrong here.
Help very much appreciated.

Thx a lot,
Mike.
35  General Category / EasyUI for jQuery / Re: how to change tab and set focus on first textbox? on: March 31, 2016, 06:11:33 AM
FOUND one HINT

if I "come" onblur from the last textfield in the first tab then it works, see below
<script type="text/javascript">
  var tb = $('#STATUS').combobox('textbox');
  tb.bind('blur',function()
  {
    $('#tt').tabs('select',1);
  });
</script> 

SO the mistake is onbur from the BUTTON in the DIALOG is not able to set focus on the next tab's textbox.

Any idea how I can handle as I need to go over the buttons and not directly from last field first tab to first field second tab???

THX AGAIN!!!
36  General Category / EasyUI for jQuery / Re: how to change tab and set focus on first textbox? on: March 31, 2016, 05:33:13 AM
thx for reply but still doesnt work - see new code below.

symptoms are like this - see SCREENSHOT:

after 2 secs the text "abc" gets selected (grey background selection?) but when you start typing nothing happens.
You need to manually click the panel of the dialog (not the tab) then the text "abc" gets selected with BLUE background and when you start typing the text gets replaced/changed.

Again - when I switch manually between the tabs (not via blur) it is different behaviour and works perfect.
But I need the blur on the button to avoid the mouse...

STWORTHY - THX AGAIN FOR HELP!


BR Mike..

          <div id="tt" class="easyui-tabs" style="width:395px;height:350px"
                data-options="
                         onSelect:function(title,index)
                      {
                            if (index==0)
                        {
                               $('#NAME').textbox('textbox').focus();
                        }
                        else if (index==1)
                        {
                               $('#ADDRESS').textbox('textbox').focus();

setTimeout(function(){
   $('#ADDRESS').textbox('textbox').focus().select();
},2000);

                          //$('#dlg').dialog('refresh',''); 
                             }
                         }
                         "         
          >
37  General Category / EasyUI for jQuery / how to change tab and set focus on first textbox? on: March 30, 2016, 03:23:17 PM
onblur of a button in first tab I want to switch to second tab and set the focus to the first textbox on top

button with
   onblur="$('#tt').tabs('select',1)"

and tabs with
                data-options="
                         onSelect:function(title,index)
                      {
                            if (index==0)
                        {
                               $('#NAME').textbox('textbox').focus();
                        }
                        else if (index==1)
                        {
                               $('#ADDRESS').textbox('textbox').focus();
                               $('#ADDRESS').textbox('textbox').select();
                             }
                         }
                         "         

BUT it does not work... It swtiches to the second tab and it also highlights the text in the top textbox,
butu this "selection" is only "grey" (and not blue as it should be) and hence you cannot type.
In order to make it work you have to use the mouse and click the dialog top menu/panel - then grey background turn blue and it works.

onselect handling in the tab data-options also works when you directly click the tabs. Then the text gets directly huglighted blue typing is directly possible.

TRICKY TGRICKY ... PLS HELP
AND THX in ADVANCE!
38  General Category / EasyUI for jQuery / Re: how to get column header data when rowspan > 1 on: February 26, 2016, 09:14:30 AM
God stworthy Wink
They both are set to rowspan 2 - it is perfectly easyui and looks well - see JPG attached.
But when I want to access the column header data now - 2 lines fully dyn created -
all functions I know like below dont work for both lines. 

                var opts = $('#dg').datagrid('getColumnFields');
               var col = $('#dg').datagrid('getColumnOption', column);

f.e. I want to access "Auftrag" AND "ARCH-Design" in 3rd column.
or basically all header elements in header line1 and all in line 2.
I hope I could explain what I mean.

PLEASE HELP!
39  General Category / EasyUI for jQuery / Re: how to get column header data when rowspan > 1 on: February 24, 2016, 11:50:51 AM
Please see the attachment.
Thx in advance!

PS: have to say its a beautiful peace of library!
40  General Category / EasyUI for jQuery / Re: how to get column header data when rowspan > 1 on: February 23, 2016, 01:52:45 PM
tried uploading a small JPG 100K to illustrate the column header iin 2 rows

QUOTE
The upload folder is full. Please try a smaller file and/or contact an administrator.
UNQUOTE
41  General Category / EasyUI for jQuery / Re: how to get column header data when rowspan > 1 on: February 23, 2016, 05:02:15 AM
Dear stworthy

fully understood.
But if I use rowspan > 1 hence creating f.e. TWO lines of column headers I can only access data in one line.
getColumnOption array seems horizontal but what about the other header line?

Any idea?
42  General Category / EasyUI for jQuery / how to get column header data when rowspan > 1 on: February 22, 2016, 12:45:55 PM
I use datagrid and rowspan to group columns.
Now I have 2 lines of header as with rowspan = 2
All columns are created dynamically and I need to access the column header data now...

All functions I use when one header line like below dont work for second line.

                var opts = $('#dg').datagrid('getColumnFields');
               var col = $('#dg').datagrid('getColumnOption', column);

PLEASE HELP!
BR Mike.
43  General Category / Bug Report / UPLOAD ERROR - cannot upload attachment with a post on: December 14, 2015, 08:41:30 AM
An Error Has Occurred!
The upload folder is full. Please try a smaller file and/or contact an administrator.
(file is 40K)
44  General Category / EasyUI for jQuery / Re: getEditor and getEditors always returning NULL on: November 28, 2015, 04:43:02 PM
rezzonico, thx gain, appreciate.

Wit such change I would affect entire rest of code.
Cannot believe it is not possible to access editor defined in datagrid row???
I made test now and it seems you really have to be in edit mode.
But what when you just loop through data after all editing is done for saving purpose...
Any idea?

Greetings and Thank you very much!!!

BR Michael.
45  General Category / EasyUI for jQuery / Re: getEditor and getEditors always returning NULL on: November 27, 2015, 02:59:03 AM
rezzonico, thx.

You mean getEditor/getEditors only works when in Editmode?

I just need to loop  through all data rows and get the value/text of a combobox item in the row.
I get all other row data of course, but not both variables for the combobox.
(accessing datagrid data or the row object only returns combobox selection)

Any idea how to do?
Pages: 1 2 [3] 4
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!