sicoobcooplivre Posted June 9, 2023 Share Posted June 9, 2023 @Sherzod Good afternoon! I have a UniDBGrid where I use RowExpand to display some data. Is there a possibility to find all the RowControls that are expanded so that I can send a variable for each one I find? Thanks! Quote Link to comment Share on other sites More sharing options...
asapltda Posted June 9, 2023 Share Posted June 9, 2023 procedure TFGENERARRESERVAS.UniDBGrid_VPEDDETRowExpand(Sender: TUniCustomDBGrid; const RowId: Integer; var RowControl: TControl; Container: TUniContainer); var AUX:TFGENERARRESERVASAUX1; I:INTEGER; W_IDPEDDET:Int64; //20210212 se cambia de integer begin W_IDPEDDET := VPEDDET_CDS.FieldByName('IDPEDDET').AsLargeInt ; d.generarreservas_g_idpeddet := W_IDPEDDET; // mostrar una forma asociada al grid EL AUXILIAR DEBE SER UN FRAME // AUX:= TFGENERARRESERVASAUX1.Create(Self ); // AUX.p_idpeddet := VPEDDET_CDS.FieldByName('IDPEDDET').AsInteger ; // RowControl := AUX.Create(Container); RowControl := TFGENERARRESERVASAUX1.Create(Container); // VPEDDET_CDS.RefreshRecord ; //20210212 Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted June 9, 2023 Author Share Posted June 9, 2023 Even I got it! It turns out that I have 3 RowWidgets that the user has opened, and I need to loop and send a variable to these 3 or however many he has opened, and I can't find a way to find the RowWidgets! Thanks! Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted June 12, 2023 Author Share Posted June 12, 2023 @SherzodIs there a possibility to do as I asked: search for all expanded RowWidgets and pass a variable to each one of them? Thanks! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 12, 2023 Share Posted June 12, 2023 @sicoobcooplivre I don't understand what you mean about passing variables. Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted June 12, 2023 Author Share Posted June 12, 2023 What I need is to pass a value to the RowWidget that is expanded. The user types some values outside the unidbgrid, in a uniedit, and I need to get the RowWidget that is expanded and pass a value to it! If possible, it would solve my case, but if not, I think of another way to display the data! Thank you for your attention! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 12, 2023 Share Posted June 12, 2023 1 hour ago, sicoobcooplivre said: If possible Yes, on the server side. Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted June 12, 2023 Author Share Posted June 12, 2023 I will study, thank you! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 12, 2023 Share Posted June 12, 2023 46 minutes ago, sicoobcooplivre said: I will study, thank you! I will give an example. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 13, 2023 Share Posted June 13, 2023 12 hours ago, sicoobcooplivre said: The user types some values outside the unidbgrid, in a uniedit, and I need to get the RowWidget that is expanded and pass a value to it! If possible, it would solve my case Okay, if I understand your case correctly: 1. Using the standard demo as an example -> \FMSoft\Framework\uniGUI\Demos\Desktop\Grid - RowWidget 2. DetailFrm -> We will change the value of UniEdit1. 3. MainForm -> Uses ..., System.StrUtils; Usage: procedure TMainForm.UniButton1Click(Sender: TObject); var I: Integer; begin for I := 0 to UniDBGrid1.Owner.ComponentCount-1 do if UniDBGrid1.Owner.Components[I] is TUniContainerPanel then if StartsStr(UniDBGrid1.Name+'_'+UniDBGrid1.JSName+'_Row', UniDBGrid1.Owner.Components[I].Name) then if UniDBGrid1.Owner.Components[I].Components[0].FindComponent('UniEdit1')<>Nil then TUniEdit(UniDBGrid1.Owner.Components[I].Components[0].FindComponent('UniEdit1')).Text := 'NewValue' end; Quote Link to comment Share on other sites More sharing options...
sicoobcooplivre Posted June 13, 2023 Author Share Posted June 13, 2023 Perfect! It was exactly what I needed! Thank you very much for your attention and have a great week! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 13, 2023 Share Posted June 13, 2023 Thanks, you too! 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.