Forum
18:50
21/11/2014
Hi All,
While evaluating the free trial version for commercial use, I am trying to add a masked input control to the Edit Dialog using Digital Bush plugin but it’s not cooperating. While the plugin itself is working flawlessly for me, combined with a custom edit control it is not masking anything. Tried other plugins with no luck.
Having modified one of MVC demo’s, I ended up with the following changes.
Model:
new JQGridColumn { DataField = "ShipName",
 Editable = true,
 EditType = EditType.Custom,
 EditTypeCustomCreateElement = "createGridEditElement",
 EditTypeCustomGetValue = "getGridElementValue"
 }     Â
View:
   function createGridEditElement(value, editOptions) {
       return "<input id='ShipName' type='text'></input>";
   }
   function getGridElementValue(elem, two, three) {
       return $(elem).val();
   }
   $(document).ready(function () {
       $("#OrdersGrid").setColProp('ShipName', {
           editoptions: {
               dataInit: setTimeout(function () { $('#ShipName').mask("99-99"); alert('mask has been set') }, 1000)
           }
       });
   });
The above dataInit handler along with its timeout is just my latest sample. I am getting my alert but no masking action.
While there is a sample of using masked input in JQGrid I’d really like to see it working in an MVC app.
http://www.ok-soft-gmbh.com/jq.....dInput.htm
Is there a working MVC JQGrid demo complete with edit popup and a masked input?
Whether it would be using custom controls or not is not important as I am trying to accomplish the masking of user inputs using the most straightforward approach available. Perhaps there is an option in JQGridColumn that I am missing.
Any help will be highly appreciated.
Most Users Ever Online: 715
Currently Online:
80 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66