Hi, I have a grid inside a JQuery dialog with row selection features enabled. When this grid is initialized the row selection features do not function until I sort, page or filter the grid. This sometimes happen when using the grid outside a dialog. Can you please advise how I can resolve this issue?
Thanks in advance
Regards Christoff
Hi Christoff,
I've attached a sample HTML page that uses this combination of grid features while the grid is both in and outside of a jQuery UI dialog.
Can you please take a look at it?If the problem you are experiencing is reproducible in this sample, can you please let us know?(a screenshot would be perfect :))
I've tested this scenario with the latest nightly build for NetAdvantage for jQuery 2011.2 as well as the latest publicly-available Service Release build and I didn't encounter any problems with the Row Selectors.
Also, can you please let us know what browser (or browsers) did you use?(I've tried IE9, Firefox (latest), Chrome, Safari and Opera)
Thanks in advance for your cooperation!
Cheers,
Bobby
Hi, I had a look at the sample it all seems to be working fine. I will unfortunately get hit on the fingers if I leak the code but basically what I did was I created a new JQuery widget that inherits from the $.ui.dialog prototype.
$.widget("browsePage", $.ui.dialog,
Then I hooked into the open event of the base $.ui.dialog, when triggered I initialize the grid inside the dialog, and destroy it when it’s closed.
Grid init code:
$widget._dataSource = new $.ig.JSONPDataSource({
dataSource: $widget.options.url,
type: "remoteUrl",
responseDataKey: "Results"
});
_initGrid: function () {
var $widget = this;
$widget._grid = $widget._table.igGrid({
dataSource: $widget._dataSource,
alternateRowStyles : true,
showHeader: true,
showFooter: false,
width:"100%",
height: "100%",
columns: [
{
key: "Index",
hidden: true
}
],
features: [
name: 'Paging',
pageSize: 15,
recordCountKey: "Total",
showFirstLastPages : true,
showPagerRecordsLabel: true,
showPageSizeDropDown: false,
showPrevNextPages: true,
pageIndexChanging: function (event, args) {
$widget._grid.igGridSelection('clearSelection');
$widget._updateSelectButton();
},
pageSizeChanging: function (event, args) {
name: 'Sorting'
name: "Filtering",
mode : 'simple',
allowFiltering: true,
caseSensitive: false,
dataFiltering: function (event, args) {
name: "Selection",
mode: "row",
multipleSelection: false,
rowSelectionChanged: function (event, args) {
]
I hope this helps if not I’ll try to re-create the widget from my side.
Thanks in advanced
Christoff
Hi, I’ve upgraded to the 12.1 release and the issue seems to be resolved.
Thank you.
I've updated my sample based on the script you provided and I wasn't able to reproduce the problem: I could select rows without the need to page, sort or filter.
(I also tried it under IE9, 8 and 7, Firefox (latest), Chrome and Safari)
Can you please take a look for yourself and let me know if there is anything that differs from your case?
Borislav