jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Grid Cellselect master detail
Tagged: #jqwidgets-grid, grid, javascript grid, jquery grid
This topic contains 7 replies, has 2 voices, and was last updated by Hristo 7 years, 8 months ago.
-
Author
-
Hi I have a grid using master detail with a listbox. For some reason I cant bind my cellselect event correctly. Its not showing any detail. I have set the cellselect to work only on the “Company Name” column. Also the id is “CustomerID”
Here is my jsfiddle:
https://jsfiddle.net/vu833ebw/179/Sorry i figured that out. But I do have one request, I have this “a” tag on the “Product Name” column, and I binded two events one cellclick and rowselect to have only the “Product Name” column to perform click event. I was thinking if it is possible to have this click event on that “a” tag’s id only and not the entire cell itself.
Here is my jseditor:
https://www.jseditor.io/?key=prevent-rowselect-action-in-particular-column-1-2-3Hello dan123,
Could you set option “Everyone” from menu ‘Share’ and save again?
ThanksBest Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comSorry Hristo,
I forgot to mention this on my first post, but basically I used the custom checkbox selection that was given in your examples. I have left the checkbox selection to be performed under the “rowselect” function, and I also create have a linkrenderer column for Company Name. I want to execute the either the rowclick or rowselect for just this column and the checkbox column only. I know since selectionmode is set to ‘none’, only the checkbox column could be selectable. But I want the “Company Name or link renderer column to also perform this selection”. I also added a class name for that link renderer “a tag”, so only when its clicked on that value, it will perform the selection.
I changed it to jsfiddle example:
https://jsfiddle.net/UbK74/1179/Wow Hristo, I solved my above problem. But I do have one problem that I cannot seem to fix. Let me give you test problem so you will see what I mean.
Test Case:
1. Click on the hyperlink of row 1: “Alfreds ……”
2. Now click on the second hyperlink of row 2: “Ana Trujillo….”
3. Now unselect or uncheck any checkbox from the checkbox column.Problem:
It seems to keep the data in the details grid even if none are selected on the main grid. It should not be showing any data in the details grid if there are not selected rows. Also if I tried to select after the test case scenario, it will make duplicates. But they go away when I uncheck them and it reverts back to normal.Note:
I tried using the “clear” method and still didn’t work cause when I checked on any row, it will show that previous data. I know the problem is under my rowclick function specifically code line 300 where its unselecting all rows and only selecting by index(This is for the link renderer column).Here is my jsfiddle:
https://jsfiddle.net/UbK74/1185/Hello dan123,
Could you clarify it, because I tested your example from the last post and it seems to work fine?
Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.comHi Hristo, try this scenario. Maybe you will see this.
Test:
1. Check the checkbox header
2. Now click on row 1 hyperlink
3. Now uncheck the checkbox for row 1.See the detail grid still shows the data of row 2 even if no rows are selected.
Here is my jsfiddle:
https://jsfiddle.net/UbK74/1185/Hello dan123,
I would recommend you do not use to bind to an event within another one, this will cause many issues.
You could set an empty DataAdapter for the$("#dataTable").jqxGrid
and when you have changed to the data source you could update it –source.localdata = newDataArray; $("#dataTable").jqxGrid('updatebounddata');
I would like to suggest you look at this example and try to use this approach:
https://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/masterdetails.htm?light
(also, you could try to useselectionmode: 'checkbox'
, instead of custom-made created column if it is possible)Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.