EasyUI Forum
March 16, 2025, 02:02:27 AM *
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 ... 15
16  General Category / EasyUI for jQuery / Re: Datagrid column same width depending on longest title on: October 16, 2024, 12:07:35 AM
Hi jarry


Thanks. Works fine.

Any way to revert it without reload ??
17  General Category / EasyUI for jQuery / Re: Datagrid column same width depending on longest title on: October 14, 2024, 02:00:18 AM
One solution

var colWidth = 0;
$.each(scrollCols, function(index, element) {
     if ($('#'+element.id).width() > colWidth){colWidth = $('#'+element.id).width()}
});
$.each(scrollCols, function(index, element) {
   $('#'+element.id).css('width',colWidth);
});

BUT, is there a better way to do it ??
18  General Category / EasyUI for jQuery / [SOLVED] Datagrid column same width depending on longest title on: October 12, 2024, 11:47:47 AM
HI.

Can't find anythig about this.

Have a datagrid with dynamic columns. How can i set the width to alle columns depending on the longest header title.

Jesper
19  General Category / EasyUI for jQuery / Re: Datagrid row tooltip on: September 04, 2024, 01:58:53 AM
Hi Jarry

Yes, have already used nbsp;

But the solution in onLoadSuccess is much better

thanks
20  General Category / EasyUI for jQuery / Re: Datagrid row tooltip on: September 03, 2024, 12:34:32 AM
Yes i know this, but it dosen't work

I have tried this code. Then i just need one formatter, but this way there is no title on empty cell


$('#dgList').datagrid({
   columns: [[
      {field: 'metaServer', width: 200, title: 'Meta Server', formatter: formatRow},
      {field: 'objektNavn', width: 250, title: 'Objekt navn', formatter: formatRow},
      {field: 'jobNavn', width: 500, title: 'Job navn', formatter: formatRow},
      {field: 'filNavn', width: 300, title: 'Fil navn', formatter: formatRow},
      {field: 'lastfiledate', width: 120, title: 'Senest ændret', formatter: formatRow},
      {field: 'dato_udgaaet', width: 120, title: 'Udgået', formatter: formatRow},
   ]]
});

function formatRow(value,row){
   if (row.udgaaet == '1'){
      return '<div title="Udgået">' + value + '</div';
   } else {
      return value;
   }
}

I think this is a lot of code to something that's just a title over the row (every column)


21  General Category / EasyUI for jQuery / [SOLVED] Datagrid row tooltip on: September 02, 2024, 01:16:33 AM
Hi

Have this in the rowstyler

         rowStyler: function(index,row){
            if (row.active == '0'){
               return 'background-color:#FF9D9D;color:#0;';
            }
         },

This makes row background red if it's not active

How to have a tooltip on these rows

Jesper
22  General Category / EasyUI for jQuery / Re: Formdata with serialize on: June 25, 2024, 12:08:55 AM
H jarry

Thanks, it works.

And works with only one wrapped div and works with all types

   <div class="valData">
      <input id="val3" name="val3" class="easyui-textbox" value="3">
      <input id="val4" name="val4" class="easyui-textbox" value="4">
                <input id="val5" name="val5" class="easyui-combobox" value="5">
                <input id="val6" name="val6" class="easyui-datebox" value="yyyy-mm-dd">
   </div>

Result "val3=3&val4=4&val5=5&val6=yyyy-mm-dd"
23  General Category / EasyUI for jQuery / [SOLVED] Formdata with serialize on: June 24, 2024, 02:21:47 AM
Hi

Having a problem with getting some dadta in a form with serialize.

$('#fmTest').form('load',row); //datagrid row data val1 = 1, val2 = 2, val3 = 3, val4 = 4


<form id="fmTest" class="easyui-form">
   <input id="val1" name="val1" class="easyui-textbox">
   <input id="val2" name="val2" class="easyui-textbox">

   <input id="val3" name="val3" class="easyui-textbox valData">
   <input id="val4" name="val4" class="easyui-textbox valData">
   
</form>

Using var formData = $('#fmTest').serialize(); results in "val1=1&val2=2&val3=3&val4=4"

But i only want val3 and val4

Added class "valData" to val3 and val4

var formData = $('.valData').serialize(); results in nothing


If i remove easyui-textbox from class the result is "val3=3&val4=4"

How can i get this to work ? (My project is not only 2 fields, but 20, so i don't want to do a getValue from each, one by one)
24  General Category / EasyUI for jQuery / Re: Datalist checked rows on: May 17, 2024, 06:59:34 AM
Hi jarry

Didn't have so much time in the past.

Now i had the same in another code. This was a datagrid

Found that my idField of datagrid not had a right idField.

idField="libName" but in the data it was "libID". Changed to that, and everything works.



25  General Category / EasyUI for jQuery / [SOLVED] Datalist checked rows on: February 19, 2024, 05:55:02 AM
Hi.

Having som trouble with the datalist

I have a dialog with a datalist which is loaded with 130 rows. On open list i check the rows that i need. First time it's 36 rows checked. Closing dialog and open again with 46 different rows checked.

If i only open list with first 36 checked and using var rows = $('#dtList').datalist('getChecked'), rows.length is 36.
When open dialog 2nd time and there is 46 rows checked, rows.length is 82.

Why can this happen, when i only see the 36 or 46 rows checked Huh

Jesper

26  General Category / EasyUI for jQuery / re: Validation required show tab on: September 01, 2023, 09:29:54 AM
Ohh, just found it in another topic


$('#ff').form('submit', {
   onSubmit: function(){
      var form = $(this);
      var isValid = form.form('validate');
      if (!isValid){
         var field = form.find('.validatebox-invalid:first');
         var panels = $('#tabs').tabs('tabs');
         for(var i=0; i<panels.length; i++){
            var panel = panels;
            if (panel.has(field).length){
               var index = $('#tabs').tabs('select', i);
               setTimeout(function(){
                  field.focus();
               },0)
               break;
            }
         }
      }
      
      return isValid;
   }
})
27  General Category / EasyUI for jQuery / [SOLVED] Validation required show tab on: September 01, 2023, 09:24:30 AM
Hi.

On validation, how can i show the tab where the required textbox is ??


Jesper
28  General Category / EasyUI for jQuery / Populate datebox from another datebox on: June 26, 2023, 02:42:42 PM
Hi.

Have a datebox1 and want to set datebox2 to same date.

If user do an onClick in the calendar, it's easy, but how to set it if user only writes a date


Jesper
29  General Category / EasyUI for jQuery / Re: attribute form on input element on: May 12, 2023, 01:05:44 PM
Why do you want it this way. ?

30  General Category / EasyUI for jQuery / Re: EasyUI Datagrid Export on: May 08, 2023, 09:34:45 AM
Hi jarry

I know this. Maybe i do something not so smart.

Because i have the script file on every page where it is used, i'll have to add/change ?v=x.x.x on every one of these pages, everytime i'll upgrade, and therefor i dont have ?v= on all pages. Maybe this is stupid. Maybe i just have to load all used script files from index file, and then only add/update ?v= on this page. It should not affect performance, because they are loaded from cache other than first load and after upgrade. What do you think ?

Jesper

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