EasyUI Forum
May 03, 2024, 02:59:26 AM *
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 Combo Panel Height and Reload on save.  (Read 18300 times)
2plus2
Jr. Member
**
Posts: 75


View Profile
« on: March 30, 2013, 10:00:54 PM »

Two questions on edatagrid. One, I need the combo drop down panel to auto size. It's only two values. I tried dropping in panelHeight into the object properties and that didn't work.

Also, we'd like the grid to reload after a save (either save button or click to new row). But when we add the success property it doesn't work:

        $('#dg').edatagrid({
            panelHeight: 'auto',
            url: '/admin/ajax.aspx?a=getList&r=' + Id,
            saveUrl: '/admin/ajax.aspx?a=updateStatus&r=' + Id,
            updateUrl: '/admin/ajax.aspx?a=updateStatus&r=' + Id,
            onSave: function (data) {
                $('#dg').edatagrid('reload');
            }
        });

Id is declared elsewhere, the grid works just looking for a way to reload/refresh the grid because we have an update date/time column  that I'd like to see current after the save.

What am I doing wrong?

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


View Profile Email
« Reply #1 on: March 31, 2013, 06:14:24 AM »

The 'panelHeight' property is defined in combobox not in datagrid. To define a combobox editor with auto drop-down panel height, try the code below:
Code:
$('#dg').datagrid({
    columns:[[
        {
title:'...',
field:'...',
editor:{
type:'combobox',
options:{
panelHeight:'auto'
//...
}
}
        }
    ]],
});
Logged
2plus2
Jr. Member
**
Posts: 75


View Profile
« Reply #2 on: April 01, 2013, 01:05:33 PM »

Danka. That was very helpful. Much appreciated.

P.S. What about refresh / reload on the save event? that appears to be ignored. Am I using the correct event to add this?
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!