This is a migrated thread and some comments may be shown as answers.

searchbox in filter

2 Answers 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
laura
Top achievements
Rank 1
laura asked on 30 Jun 2017, 02:02 PM

I have a radgrid for which I have created a filter template that contains a radsearchbox which works as expected. 

If the column is hidden (display=false) when the grid is first rendered and then subsequently unhidden, the searchbox is not rendering correctly.  The empty message , as well as anything that is typed in the box is truncated to about a character.  It does give correct results.  

After the first refresh it is fine and remains so even when hidden/unhidden later. 

 

 

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 05 Jul 2017, 12:39 PM
Hello Laura,

To workaround this issue you should repaint the SearchBox when showing the column.

Please find attached a sample project implementing the suggested approach.

function OnColumnShown(sender, args) {
    if (args.get_gridColumn().get_uniqueName() == 'ShipName') {
        var master = sender.get_masterTableView();
        var cell = master._getFilterCellByColumnUniqueName('ShipName');
        var sb = $telerik.findControl(cell, "RadSearchBox1");
        sb.repaint();
    }
}

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
laura
Top achievements
Rank 1
answered on 05 Jul 2017, 02:45 PM

perfect.  

thank you. 

Tags
Grid
Asked by
laura
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
laura
Top achievements
Rank 1
Share this question
or