Timothy lam Posted May 7, 2021 Share Posted May 7, 2021 Hi, I googled the information and using the following code. It can't generate the filter function in the DBGrid. Am I missing something else? while not ds_fields.Eof do begin with dbg_list.Columns.Add do begin FieldName := ds_fields.FieldByName('COLUMN_NAME').AsWideString; Title.Caption := ds_fields.FieldByName('COLUMN_NAME').AsWideString; Width := ds_fields.FieldByName('GRID_WIDTH').AsInteger; Font.Charset := ANSI_CHARSET; Font.Name := 'Verdana'; DisplayMemo := True; Sortable := True; with TUniEdit.Create(Self) as TUniEdit do begin Left := 10; Top := 10; Parent := UniHiddenPanel1; Text := ''; Width := 30; Name := 'Edit'+ds_fields.FieldByName('COLUMN_NAME').AsWideString; end; Filtering.Enabled := True; Filtering.editor := TUniEdit(Self.FindComponent('Edit' + ds_fields.FieldByName('COLUMN_NAME').AsWideString)); end; ds_fields.Next; end; Quote Link to comment Share on other sites More sharing options...
Timothy lam Posted May 7, 2021 Author Share Posted May 7, 2021 Please ignore this. I found the problem is missing Columns.BeignUpdate and EndUpdate 1 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.