zemorango Posted June 11, 2018 Share Posted June 11, 2018 I Unigui Developers, I Have a strange situation, I have a form with some butons and a unidbgrid. for each of the buttons I fill the grid with data from a table in sql server and aply filters to the grid according to the columns of the table i choose. the filters apears and work for the first tabble and second table, the grid is filled correctly and the filters works, but if I click on the first button again to load back the date form the first table then I get an error. Before I fill the grid I clear all the columns and set the filter component of each columns to nil; I'm sending some imagens in attachement // make sure to remove the filter components from the grid columns for i := 0 to JanListagens.GridRelatorio.Columns.Count-1 do begin JanListagens.GridRelatorio.Columns[i].Filtering.Editor:=nil; end; // clear the columns JanListagens.GridRelatorio.Columns.Clear; // load the grid with dataset the SQL is diferent with more or less colums depending of the table i'm loading GetData(self, JanListagens.Provtmp, JanListagens.CDStmp,sql, JanListagens.GridRelatorio, JanListagens.Dtstmp); // configure the filters, all uniedit simple text. for i := 0 to JanListagens.GridRelatorio.Columns.Count-1 do begin if (JanListagens.GridRelatorio.Columns[i].Field <> Nil) then begin Comp:=JanListagens.findcomponent('Edit_'+UniMainModule.listActualTabela.ToString+'_'+i.ToString) as TuniEdit ; if Comp<>nil then begin comp.EmptyText:=JanListagens.GridRelatorio.Columns[i].FieldName+'...'; JanListagens.GridRelatorio.Columns[i].Width:=200; JanListagens.GridRelatorio.Columns[i].Filtering.enabled:=true; JanListagens.GridRelatorio.Columns[i].Filtering.Editor:=comp; JanListagens.GridRelatorio.Columns[i].Title.Font.Size:=9; JanListagens.GridRelatorio.Columns[i].Sortable:=true; end; end; end; do I need to make some kind of cache operation to clean the filters in javascript? Regards zemorango Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 11, 2018 Share Posted June 11, 2018 Hi, Which build are you using, and can you make a simple testcase for this if possible ?! Quote Link to comment Share on other sites More sharing options...
zemorango Posted June 11, 2018 Author Share Posted June 11, 2018 Hi Delphi Developer, The version I'm using is 1424. And yes I'm going to make a simple sample case, I will posted as soon as possible. Regards zemorango 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.