EasyUI Forum
September 13, 2025, 04:31:15 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: edatagrid maxlength of input  (Read 7808 times)
jaimi
Full Member
***
Posts: 121


View Profile
« on: October 29, 2014, 08:21:11 PM »

Hi, I have a numberbox within a edatagrid like this:

$('#edgGLL').edatagrid({
 title : 'Ländercode-Tabelle',
  iconCls:'icon-Database',
  width:'100%', 
  height:'auto',
  collapsible: 'true',
  columns:[[ 
    {field:'OLT00L001T_KEY',title:'OLT00L001T_KEY',width:120,sortable:'true'}
   ,{ field   :'GLL_NUM'
     ,title   :'GLL_NUM'
    ,width   :100
    ,sortable:'true'
    ,editor :
     { type   :'numberbox'
      ,options:
      { required :true
      ,prompt   :'Land...'
      ,validType:'extLength[3]'
      }
      }
   }
....
The input field GLL_NUM should allow only 3 digits entry. How to manage?

Thanks
Jaimi
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 30, 2014, 01:29:45 AM »

You can set the 'min' and 'max' properties to limit the value to a certain range.
Code:
editor:{
type:'numberbox',
options:{
required:true,
min:100,
max:999
}
}
Logged
jaimi
Full Member
***
Posts: 121


View Profile
« Reply #2 on: October 30, 2014, 04:10:15 AM »

how does this work for a textbox? My possible range is bezween '000' and '999'.
Within the database it is a char(3) field which holds a 3 digit code front filled with 0-digits.

thanks
Jaimi
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!