Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Masked inputs in MVC apps
21/11/2014
18:50
Avatar
vi6cmevm
New Member
Members
Forum Posts: 1
Member Since:
21/11/2014
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 496

Currently Online:
35 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information