sinanaydin Posted June 2, 2016 Posted June 2, 2016 UniDbGrid filter kullanmak istiyorum. Bunun için form yada frame in create inde nesneleri otomatik oluşturuyorum. if xgrid.Columns.Count>0 then begin xhidpanel:= TUniHiddenPanel(UniApplication.FindComponent(xgrid.Name+'filter') as TUniHiddenPanel ); if xhidpanel=nil then begin xhidpanel:=TUniHiddenPanel.Create(xgrid); xhidpanel.Name :=xgrid.Name+'filter'; xgrid.LoadMask.Target :=xhidpanel; end; end; for i:=0 to xgrid.Columns.Count-1 do begin xedit:= Tuniedit(UniApplication.FindComponent(xgrid.Name+'filter'+inttostr(i)) as Tuniedit ); if xedit=nil then begin xedit:=TUniEdit.Create(xhidpanel); xedit.Name:= xgrid.Name+'filtertext'+inttostr(i); xedit.Parent :=xhidpanel; xedit.EmptyText :=xgrid.Columns.Title.Caption; xgrid.Columns.Filtering.Editor :=xedit; xgrid.Columns.Filtering.Enabled :=True; end; end; gridde filter kısmında gözüküyor fakat grpinfoColumnFilter event i çalışmıyor nesneleri elle forma eklediğimde çalışıyor neden olabilir ? Quote
Administrators Farshad Mohajeri Posted June 2, 2016 Administrators Posted June 2, 2016 Merhaba, Obje yaratırken Owner olarak mutlaka ilgili form nesnesini kullanın. Quote
Administrators Farshad Mohajeri Posted June 2, 2016 Administrators Posted June 2, 2016 UniApplication.FindComponent) FindComponent her zaman objenin beklenen Owner'i üzerinden yapılmalı. Yani eğer Form1'a eklenecekse o zaman Form1.FindComponent yapmanız lazım. Quote
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.