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

Search Row searching on hidden column?

2 Answers 361 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kurt Boyer
Top achievements
Rank 1
Kurt Boyer asked on 03 Dec 2014, 01:39 PM
Is it possible to have the search row (in the GridView) also perform its search on hidden columns? If not, this would be a great feature in my opinion. When a substring matches a value in a hidden column, the entire row could be selected. Having the entire row selected (in lieu of selecting the separate values in each cell) would also be another great option to have.

Thanks for any insight you have.

2 Answers, 1 is accepted

Sort by
0
Kurt Boyer
Top achievements
Rank 1
answered on 03 Dec 2014, 05:51 PM
I've found a workaround that solves this issue. If you set the column's Width to 1, it is visibly perfect and also reacts great with the search row in the GridView. Setting the Width to 0 does not work, because the column gets resized to 20 pixels when it is shown.

radGridView1.Columns["mycolumnname"].Width = 1;
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 Dec 2014, 11:55 AM
Hello Kurt,

Thank you for writing.

RadGridView search functionality performs searching among the visible columns in the grid. As you have already found out, you can leave the column visible but set its width small enough to be like invisible. It is suitable to set the GridViewColumn.MaxWidth property to 1.

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Andrew
Top achievements
Rank 2
Iron
commented on 04 Dec 2024, 06:59 PM

This doesn't work if you have large amounts of data in those columns you want to be invisible, because even with width=0 or 1, it will make the row very tall if the column you want to be invisible has a lot of data in it.

Simply being able to search on invisible columns would be a handy flag to be able to toggle on or off, without having to add a bunch of special search and filtering code in an OnRead() event.

Andrew
Top achievements
Rank 2
Iron
commented on 04 Dec 2024, 07:13 PM

You can set the template to empty though and it'll still find the values but not display them.

<GridColumn Field="@nameof(ClientSearch.StreetAddress)" Title="Street" Width="0px"><Template></Template></GridColumn>

That will fix the overly tall rows if the data has a lot of content. just don't display the data with a blank template.

Dinko | Tech Support Engineer
Telerik team
commented on 05 Dec 2024, 10:07 AM

The forum thread is related to Telerik UI for WinForms. Looking at the shared code snippet, I think you are using a framework different from WinForms. The following link contains all the forums related to our products: https://www.telerik.com/forums. You can select the one related to the Telerik controls used in your project.  
Andrew
Top achievements
Rank 2
Iron
commented on 05 Dec 2024, 04:13 PM

Ah, you're correct, I didn't notice that at first that this was a WinForms page. I am using Telerik UI for Blazor. Either way, my google search for a solution to this problem led me directly to this page, so maybe other people using UI for Blazor will also find their way here when googling for a solution to this problem. Thanks for the correction, I'll find the proper forum next time :).
Dinko | Tech Support Engineer
Telerik team
commented on 06 Dec 2024, 08:18 AM

Here is the Telerik Forum for Blazor: https://www.telerik.com/forums/blazor. You can search for your requirement there or create a ticket and our support engineers will help in less than 24 hours. 
Tags
GridView
Asked by
Kurt Boyer
Top achievements
Rank 1
Answers by
Kurt Boyer
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or