Hi, Boki:
Coming from NxGrid5 (still not confident about moving my code over) and doing a new form with a new NextGrid, thus using NextGrid6 and in that a Treed Column.
Basically trying to do the following with a dataset to load the grid, the LastAddedRow is not correct when AddChildRow;
How do I do this with the new NextGrid6?
Thank you,
Chuck
p.s. I posted an issue in NextGrid5 and would really like your feedback, i.e. is the issue corrected in NextGrid6? You said you would have a fix about a year ago. Were you able to do so? Regards Autoupdate of list column cells which require enter or clicking onto another cell in grid otherwise the cell acts as though no value was entered. Thank you!
with gridClientSessions do
begin
while not EOF do
begin
PRID := FieldByName('pr_id').AsInteger;
AddRow();
LastPRRow := LastAddedRow;
Cell[NxTreeColumn61.Index, LastAddedRow].AsString := FieldByName('prname').AsString;
while not Eof and (PRID = FieldByName('pr_id').AsInteger) do
begin
PTID :=FieldByName('pt_id').AsInteger;
// LastPTRow := AddChildRow(LastPRRow).GetIndex; <== this does not give the correct row index added.
LastPTRow := LastAddedRow; //this is not correct! <==
Cell[NxTreeColumn61.Index,LastAddedRow].AsString := FieldByName('Client_Name').AsString;
while not Eof and (PTID = FieldByName('pt_id').AsInteger) do
begin
// LastSesRow := AddChildRow(LastPTRow).GetIndex;
LastPTRow := LastAddedRow; // incorrect row value
AddChildRow(LastPTRow);
Cell[NxTreeColumn61.Index, LastAddedRow].AsString := 'Session Number: ' + FieldByName('ses_number').AsString;
Next;
end;//same PTID patient ID
end; //Same PRID practitioner ID
end; //not eof