artem_niko Posted January 12, 2020 Share Posted January 12, 2020 Hello! I tryed apply sort to UniDBGrid. I was see demo and understatnd why error is exist. I'm talking about this JS error: "FDQueryCards: Parameter 'UserName' not found." UserName - is name of my field where I search. I set property: Write a code: procedure TUniFrameM1.UniDBGridAccessesColumnFilter(Sender: TUniDBGrid; const Column: TUniDBGridColumn; const Value: Variant); var V : Variant; I : Integer; begin if UniMainModule.FDQueryCards.Active then begin for I := 0 to Sender.Columns.Count - 1 do if Sender.Columns[I].Filtering.Enabled then begin V := Sender.Columns[I].Filtering.VarValue; UniMainModule.FDQueryCards.Params.ParamByName(Sender.Columns[I].FieldName).Value := '%'+V+'%'; end; UniMainModule.FDQueryCards.Close; UniMainModule.FDQueryCards.Open; end; end; And when I trying enter need value in UniEdit1.Text I get error. Please, help. I'm using UniGUI 1514 (registered). Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 12, 2020 Share Posted January 12, 2020 Hello, Which error do you get? Can you make a simple testcase? Quote Link to comment Share on other sites More sharing options...
artem_niko Posted January 12, 2020 Author Share Posted January 12, 2020 9 minutes ago, Sherzod said: Which error do you get? I'm talking about this error: "FDQueryCards: Parameter 'UserName' not found." This error showing when I start enter value in UniEdit1.Text. Quote Link to comment Share on other sites More sharing options...
Freeman35 Posted January 13, 2020 Share Posted January 13, 2020 Follow your code via break point. And check "Sender.Columns.FieldName" FieldName's value and parameter name(s) in SQL text. My suggession is dont use filter, build SQL text 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.