EasyUI Forum
April 23, 2024, 03:15:20 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: datagrid filter - Prompt goes to first position in textbox  (Read 4222 times)
jega
Full Member
***
Posts: 190


View Profile
« on: March 27, 2017, 03:35:28 AM »

Hi

Have a strange problem. I was doing some test with datagrid filter, to learn how to work with it. I did the test on my pc with win7, IE11 ver 11.0.12. Everything works fine. When writing text in filter textbox, the cursor stays on last position.

After that i wanted to have it on another site, and testet it on a pc with WIN10 and IE 11 ver 11.0.38. On this setup it always set the cursor to first position after filtering. Filtering works fine. When i use chrome on that pc, it works fine, and cursor stays on last position in textbox

Have tried to copy everything from win7 pc to win10 pc, but still same error.

And i know that http://www.jeasyui.com/demo/main/index.php?plugin=DataGrid&theme=default&dir=ltr&pitem= is working, altså on my win10 pc

So why does my own code fail.

Included files

<link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="easyui/themes/iconextra.css">
<script type="text/javascript" src="easyui/js/jquery.min.js"></script>
<script type="text/javascript" src="easyui/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="easyui/locale/easyui-lang-da.js"></script>
<script type="text/javascript" src="easyui/js/datagrid-detailview.js"></script>
<script type="text/javascript" src="easyui/datagrid-filter/datagrid-filter.js"></script>
<script type="text/javascript" src="js/jquery.qstring.js"></script>
<script type="text/javascript" src="js/myscripts.js"></script>

Simple code on asp site

<table id="dgSystems" title="System registreringer" class="easyui-datagrid" style="padding:10px 10px 10px 10px" data-options="
            method:'get',
            pagination:true,
            singleSelect:true,
            idField:'ID'">
   <thead>
      <tr>
         <th data-options="field:'ID',align:'center'">System ID</th>
         <th data-options="field:'SYSTEMNAVN',width:350">System navn</th>
      </tr>
   </thead>
</table>

<script type="text/javascript">
   $( document ).ready(function(){

   });

    $(function(){
      var dg = $('#dgSystems').datagrid({
         url: 'getfromdb.asp?st=systemlist&ct=true',
         pagination: true,
         remoteFilter: true
         });
         dg.datagrid('enableFilter');
    });
            
</script>


Jesper





Logged
jega
Full Member
***
Posts: 190


View Profile
« Reply #1 on: October 26, 2017, 09:34:31 AM »

Found the error.

         <th data-options="field:'ID',align:'center'">System ID</th>
         <th data-options="field:'SYSTEMNAVN',width:350">System navn</th>

When not width on ALL fields, the error shows

But why Huh?

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!