EasyUI Forum
June 14, 2025, 04:01:08 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: [SOLVED]Datagrid Change singleselect and keep title  (Read 419 times)
jega
Full Member
***
Posts: 223


View Profile
« on: May 02, 2025, 02:28:01 PM »

Hi

Have set title on datagrid with

var dgPanel = $('#dgList').datagrid('getPanel');
dgPanel.panel('setTitle',data.titleName);

When changing singleselect state with

$('#dgList').datagrid({
   singleSelect:true            
});

it destroys the title.

How to keep it without do a setTitle on panel again


« Last Edit: June 11, 2025, 11:03:57 PM by jega » Logged
jega
Full Member
***
Posts: 223


View Profile
« Reply #1 on: June 09, 2025, 02:41:21 PM »

Any help ??
Logged
jarry
Administrator
Hero Member
*****
Posts: 2293


View Profile Email
« Reply #2 on: June 11, 2025, 05:01:00 AM »

Call the code below will recreate the datagrid again.
Code:
$('#dgList').datagrid({
   singleSelect:true           
});
You can set the 'title' property while creating the datagrid.
Code:
$('#dgList').datagrid({
   title: '...',
   singleSelect:true           
});

If you only want to change the selecting mode, please set the 'singleSelect' property instead of recreating the whole datagrid again.
Code:
$('#dgList').datagrid('options').singleSelect=true;
Logged
jega
Full Member
***
Posts: 223


View Profile
« Reply #3 on: June 11, 2025, 11:03:38 PM »

Hi jarry.

Ohh i see. Just use the options

Thanks
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!