EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 21, 2024, 10:40:13 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
Bug Report
>
Button in Datagrid fire before select row
Pages: [
1
]
« previous
next »
Print
Author
Topic: Button in Datagrid fire before select row (Read 10217 times)
Naresh Mehta
Newbie
Posts: 8
Button in Datagrid fire before select row
«
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: 2264
Re: Button in Datagrid fire before select row
«
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
Re: Button in Datagrid fire before select row
«
Reply #2 on:
April 22, 2019, 09:12:45 PM »
Thanks Sir, It is working nicely.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...