I take this opportunity to request the insertion of multiple persistent filter fields in the column headers, in order to directly type the searched text (it should also be used for the search and not just for the filter, optionally), without opening a combobox with the mouse on a single column, really cumbersome.
A great convenience already in use by Devexpress, JqxGrid, and other competitors.
(I use the new grid in Tms WebCore)
Thank you!
Hi,
Right now, this feature is not built-in, but nothing prevents you from adding your own filter/search edit capabilities in the header of a column in order to filter/search inside the grid. It's quite easy to setup:
procedure TForm4.DoEditChange(Sender: TObject);
var
e: TWebEdit;
begin
e := (Sender as TWebEdit);
TMSFNCDataGrid1.ClearFilter;
TMSFNCDataGrid1.Filter.Clear;
TMSFNCDataGrid1.Filter.Add(e.Tag, e.Text);
TMSFNCDataGrid1.ApplyFilter;
e.SetFocus;
e.SelStart := e.Text.Length;
end;
procedure TForm4.WebFormCreate(Sender: TObject);
var
I: Integer;
ed: TWebEdit;
begin
TMSFNCDataGrid1.BeginUpdate;
for I := 0 to TMSFNCDataGrid1.Columns.Count - 1 do
begin
ed := TWebEdit.Create(Self);
ed.Tag := I;
ed.OnChange := DoEditChange;
TMSFNCDataGrid1.Controls[I, 0] := ed;
end;
TMSFNCDataGrid1.LoadSampleData;
TMSFNCDataGrid1.AutoSizeColumns;
TMSFNCDataGrid1.EndUpdate;
end;
HI Pieter,
thank for you code.
But in TMS Web Core this code don't work. :-)
Apart from the fact that I often don't know the columns in advance (ok, I'll solve it another way), but the editors disappear after the first key pressed.
Definitely a problem due to the Web Core version, which still seems a little behind to me.
However, I think that these features should be native by default, considering the high number of grids used in the accounting applications we intend to port.
Thank you.
Thanks, we aren't able to reproduce disappearing editors, but we'll release an update of TMS WEB Core (2.6) soon. I agree that this is a feature that will be helpful, we'll investigate as soon as possible.
Ok Pieter,
I wait for the update.
A native grid in TMS Web Core, which has both advanced and simplified features for "everyday" use is truly strategic for us. Basically we have to replace JqxGrid or Devextreme which we are testing, but certainly better with direct access to the datasets via adapters, and in rad way. So I'm expecting a lot :-)
Thanks!
TMS Web Core 2.6 is available, let me know with the above code snippet if you can get it working. If not, report back here