TRxDbGrid with lookup field lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- nelson777 · 2007-09-03 19:12 About the TRxDbGrid component from RxLib for Lazarus package (http://alexs75.narod.ru/fpc/rxfpc/index.html), does it support edditing a lookup field  in a combo-like manner ? I only see a fixed pick-up list. Is there something like OnSelectEditor event ? Nelson BLOG: http://www.aocontrario.com ---------------------------------------------------------------------- alexs · 2007-09-03 20:11 It should be realized in standard DBGrid - rxDBGrid only expands functions standard DBGrid. And in Delphi it too is realized in DBGrid. It is necessary to ask Jesus Reyes or to send it a ready code. ---------------------------------------------------------------------- nelson777 · 2007-09-05 18:33 Sorry, I didn´t understand. OnSelectEditor event IS present on DBGrid, so it should be published by TRxDbGrid, right ? So if it isn´t, I think it was deliberately hidden by the developer of Rx package, am I right ? In this case what would Jesus Reyes do ? I need this event, so I can implement the procedure I described in this thread http://www.lazarus.freepascal.org/index.php?name=PNphpBB2&file=viewtop ic&p=17221#17221 Nelson ---------------------------------------------------------------------- alexs · 2007-09-05 19:32 n RxDBGrid I have published those properties which is in DBGrid and was not present in RxDbGrid. It will be in following version (1.1.6) - it during development - will be in the beginning of October. ---------------------------------------------------------------------- nelson777 · 2007-09-06 02:30 Great new Alexs! looking foward to it. Can you say if you will implement the combo functionality for lookup fields as well in rxDBGrid ? ---------------------------------------------------------------------- alexs · 2007-09-06 14:05 in future. For this purpose I plan to use a code from components TRxDBLookupCombo. ---------------------------------------------------------------------- nelson777 · 2007-09-06 20:59 Great! Keep up the good work! ---------------------------------------------------------------------- nelson777 · 2007-10-24 23:40 any news about this issue ? ---------------------------------------------------------------------- alexs · 2007-10-25 14:21 I now do not have free time. All can be seen last changes on Lazarus CCR. About your request I have not forgotten. ---------------------------------------------------------------------- nelson777 · 2007-10-25 16:03 Ok np... when you got news, let us know ---------------------------------------------------------------------- Almindor · 2007-10-26 09:04 BTW could you please look on z-ordering and drawing order? This might be a Lazarus/LCL bug, but if you put a RxLookupDBComboBox on top of eg: TDBGrid, the "button" and popup will get drawn behind the grid (so user can't click the arrow and can't select). Only the "edit" area will be visible. I think this is a LCL/widgetset bug but can you confirm please? ---------------------------------------------------------------------- alexs · 2007-10-26 14:30 i'm try to fix this ---------------------------------------------------------------------- Almindor · 2007-10-26 14:54 NOTE: it's probably a LCL bug, happens with other components too (eg: TDateEdit) ---------------------------------------------------------------------- alexs · 2007-10-30 11:53 see new version of TRxLookupDBComboBox in Lazarus CCR ---------------------------------------------------------------------- nelson777 · 2007-10-30 13:58 Almindor2: are u using a dblookupcompo to pickup values in a DBGrid ? if that´s the case, could you please tell me how you position it ? ---------------------------------------------------------------------- Almindor · 2007-10-31 09:45 use OnDrawCell there's a TRect argument for the cell position, just use it's left/right/bottom/top to set the comboboxes. I currently use normal comboboxes which I manage myself (eg: fill etc.) ---------------------------------------------------------------------- alexs · 2007-11-06 11:25 Hi i'm make in RxDBGrid new editor for lookup fields ---------------------------------------------------------------------- nelson777 · 2007-11-09 01:10 Almindor: I tried that and all I got was a bunch of crazy combos jumping on the dbgrid Let me get this right: u use combo.BoundsRect := Rect in OnDrawColumnCell event and Editor := combo in the OnSelectEditor event ? is that it ? or there´s something else ? ---------------------------------------------------------------------- Almindor · 2007-11-09 10:40 I use this: Code: [Select]   if gdFocused in State then begin     case DataCol of // col # need to be the one where you want to display the combo       0 : with aControl do begin // a control is just some Control like TComboBox placed on form which is invisible ATM.              Left := aRect.Left + aDBGrid.Left + 2; // windows specific, to make it look 100% fitting              Top := aRect.Top + aDBGrid.Top + 1;              Width := aRect.Right - aRect.Left;              Height := aRect.Bottom - aRect.Top;              Visible := True;            end;         // if you had more of them, meke sure to make the OTHER ones invisible       else begin         AllControls.Visible := False // quasi-code -- make all those controls invisible again since we're on different cols       end;     end;   end; ---------------------------------------------------------------------- nelson777 · 2007-11-09 16:02 Almindor: thanx! u helped me a lot. Yet, I adapted your code a bit. Maybe it helps you too. in OnDrawColumnCell:   if (gdFocused in State) and (DataCol = 3) then // whatever column number       combo.BoundsRect := Rect; in OnSelectEditor:   if (Column.DesignIndex = 3) then // whatever column number       Editor := combo; What do u think ? yet using this approach, one of the cells of the column containing the combo appears blank until I post the record. Sometimes the first, sometimes the last. I couldn´t find whatever is causing this. ---------------------------------------------------------------------- hccadre@gmail.com · 2021-07-14 20:26 Hello alex I am using lazarus v2.012 and rxnew 3.3.5.231. In a form I have placed a RxDBGrid component with a lookup column, I want to know if it is possible search on the values ​​of this column as the user types, just like the TRxDBLookupCombo component does. Now when I run the project, position the cursor on the lookup column field and write some value nothing happens, and I would like to locate the values ​​that contain the characters that the user types. Thanks in advance.