EasyUI Forum
May 16, 2024, 12:06:15 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: combogrid, pagination + setValue  (Read 10173 times)
sky-t
Full Member
***
Posts: 145


View Profile
« on: September 29, 2016, 04:50:10 AM »

I'm using the combogrid('setValue') Method to select a record from combogrid.
This works fine - even if the record is show in first page of combogrid.
When i use pagination and select an record from a page is not first page it can't be shown when load my form again and show this record by setValue.

What can i do? Can i scroll to the page with the searched row?

Kind regards

Thorsten
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: September 29, 2016, 03:22:40 PM »

Please call 'gotoPage' method to navigate to your page.
Logged
sky-t
Full Member
***
Posts: 145


View Profile
« Reply #2 on: September 29, 2016, 09:03:06 PM »

and what should i do if i don't know on which page is the searched record?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #3 on: September 30, 2016, 12:23:31 AM »

When calling the 'setValue' method, you can pass a key-value pair as parameter to set the 'idField' and 'textField' values. If the value does not exist in the loaded grid rows, the combogrid still can display the correct display value.
Code:
$('#cc').combogrid('setValue', {
  itemid: 'id1',
  productname: 'name1'
});
Logged
sky-t
Full Member
***
Posts: 145


View Profile
« Reply #4 on: September 30, 2016, 12:51:28 AM »

Hi jarry,

your solution works for me.
Another question: can i get access to the pager-object of the pagination in combogrid?
I want to have additional buttons and texts in that pagination.

Thank you very much!!!
Logged
sky-t
Full Member
***
Posts: 145


View Profile
« Reply #5 on: October 12, 2016, 07:42:30 AM »

Hi jarry,

there is another problem.When i'm using

            $('#cc').combogrid('setValue', {
               id: '10,
               Matchcode: 'test'
            });
it works. Now when i am entering text for search another record in grid it will be overwritten by setted Text (test in this example).
What can do to prevent this input?
Logged
sky-t
Full Member
***
Posts: 145


View Profile
« Reply #6 on: October 15, 2016, 11:30:45 PM »

no idea?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #7 on: October 16, 2016, 08:28:07 PM »

Please try to download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.5-patch.zip.
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!