JTable Edit Panel

199 Views Asked by At

I have incorporated the JTable Plugin which I like very much and works fine.

The only "issue" I have is that I would like to edit the Edit Record Panel. When I say by editing, I am meaning that I would like to insert a new text input. Is this possible?

Screenshot Edit Panel

For example in the image above, I would like to enter the following inputs:

  1. Old Password
  2. New Password
  3. Confirm Password
1

There are 1 best solutions below

0
On

Add these 3 fields to your jTable and set 'list' to false and 'edit to true.

fields: {
            OldPassword: {
                title: 'Old Password',
                list: false,
                edit: true
            },
            NewPassword: {
                title: 'New Password',
                list: false,
                edit: true
            },
            ConfirmPassword: {
                title: 'Confirm Password',
                list: false,
                edit: true
            }

Don't forget to add these 3 properties to your model. You may also want to validate the passwords. I think you can add the logic by adding this event to your table :

formSubmitting: function (event, data) {
            //Compare passwords and validate logic    

            return data.form.validationEngine('validate');
        }