EasyUI Forum
March 28, 2024, 04:45:22 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Button in Datagrid fire before select row  (Read 9922 times)
Naresh Mehta
Newbie
*
Posts: 8


View Profile Email
« on: April 22, 2019, 06:33:11 AM »

I have used Link Button in the datagrid in particular column, after clicking this button Modal will open with textbox where I can put more line instead writing in datagrid textbox, if user in edit mode the textbox will display store value, but while button click without selecting any row  the row index value is not getting, in this user have to select Row first so index get return according stored data can display in textbox.

Please help, to solve this problem.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #1 on: April 22, 2019, 06:20:42 PM »

The simple way to get the selected row in the 'onClick' event is to delay a little time to call your code. Please try this code.
Code:
onClick: function(){
setTimeout(function(){
var row = $('#dg').datagrid('getSelected');
},0)
}
Logged
Naresh Mehta
Newbie
*
Posts: 8


View Profile Email
« Reply #2 on: April 22, 2019, 09:12:45 PM »

Thanks Sir, It is working nicely.
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!