delagoutte Posted June 12, 2018 Share Posted June 12, 2018 Hello, is it possible to activate row select with unidbtreegrid like one of the solution that are in fiddle in this page https://www.sencha.com/forum/showthread.php?299616-Tree-Grid-using-Checkbox-Model ps : i am using the version with extjs 4 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 12, 2018 Share Posted June 12, 2018 Hello, Let's start with this, can you try? function beforeInit(sender, config) { config.selModel = { selType: 'checkboxmodel', mode: 'MULTI' }; } Quote Link to comment Share on other sites More sharing options...
delagoutte Posted June 13, 2018 Author Share Posted June 13, 2018 there is the column with selection checkbox but just after display the form i have this error message " Could not set cell position: row: [0], column:[1] .view is undefined " Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 13, 2018 Share Posted June 13, 2018 Yes, can you try with this option for now? UniDBTreeGrid -> Options -> dgDontShowSelected=True Quote Link to comment Share on other sites More sharing options...
delagoutte Posted June 13, 2018 Author Share Posted June 13, 2018 it is better ,now i don't have any error message buti have a new problem. i try to get the list of selected row with the method that i use for grid : //TGLots : TDBUnitreegrid; //dsLotsRO : datasource that is linked with the treegrid dsLotsRO.DisableControls; try for I := 0 to TGLots.SelectedRows.Count - 1 do begin dsLotsRO.Bookmark := TGLots.SelectedRows[I]; aLstLot.Add(dsLotsRO.fieldByName('LRO_ID').asstring); end; finally dsLotsRO.EnableControls; end; but SelectedRows.Count is always with 0. i try to work with onselectionchange but the event is not fire. How can i do ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 13, 2018 Share Posted June 13, 2018 Ok, I will let you know Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 14, 2018 Share Posted June 14, 2018 Try with this approach for now...: 1. function select(sender, record, index, eOpts) { var IDs = ""; this.getSelection().forEach(function (rec) {if (IDs == "") {IDs = rec.data[yourIDIndx]} else {IDs = IDs + "," + rec.data[yourIDIndx]}}); ajaxRequest(this, "_getSelection", ['IDs=' + IDs]); } 2. procedure TMainForm.UniDBTreeGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_getSelection' then begin ShowMessage(Params.Values['IDs']); end; end; Quote Link to comment Share on other sites More sharing options...
MSMK Posted August 30, 2021 Share Posted August 30, 2021 On 6/14/2018 at 6:29 PM, Sherzod said: Try with this approach for now...: 1. function select(sender, record, index, eOpts) { var IDs = ""; this.getSelection().forEach(function (rec) {if (IDs == "") {IDs = rec.data[yourIDIndx]} else {IDs = IDs + "," + rec.data[yourIDIndx]}}); ajaxRequest(this, "_getSelection", ['IDs=' + IDs]); } 2. procedure TMainForm.UniDBTreeGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_getSelection' then begin ShowMessage(Params.Values['IDs']); end; end; Добрый день! а как реализовать выборку по группе? Чтобы возвращал список ID всех записей в родительском ноде Quote Link to comment Share on other sites More sharing options...
MSMK Posted August 30, 2021 Share Posted August 30, 2021 1 hour ago, =GGG= said: Добрый день! а как реализовать выборку по группе? Чтобы возвращал список ID всех записей в родительском ноде событие checkChange не работает Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.