Jump to content

UniDBGrid without filter function in Runtime


Timothy lam

Recommended Posts

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;
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...