In the Grid it does not filter when the data type in SQL is text

1 Answer 61 Views
Grid
onivia
Top achievements
Rank 1
onivia asked on 22 Sep 2022, 05:40 PM

Hello,

I am using TelerikGrid with the FilterMode and OnRead property, but when I try to filter by a column that the data type in SQL is Text, it does not bring me results.

1 Answer, 1 is accepted

Sort by
0
Timothy J
Top achievements
Rank 2
Bronze
Iron
Iron
answered on 22 Sep 2022, 05:49 PM
I believe this is more of a SQL Server issue and not a Telerik issue.  See stackoverflow issue
onivia
Top achievements
Rank 1
commented on 29 Sep 2022, 02:02 PM

Not quite because it means that the ToDataSourceResultAsync() method of telerik where I query, is not optimized for the text data type.

// code
  DataSourceResult result = await _db.Products.Where(p => p.CodigoEstado == 1)
                                                .Include(p => p.CodigoEstadoNavigation)
                                                .Include(p => p.IdCategoriaProductoNavigation)
                                                .ToDataSourceResultAsync(request);
Timothy J
Top achievements
Rank 2
Bronze
Iron
Iron
commented on 29 Sep 2022, 04:22 PM

Let me make sure I understand:

 

You are attempting to filter the results on a SQL Server 'text' based column using a DataSourceRequest, correct?

You want the method ToDataSourceResultAsync to generate the correct SQL code (eventually) to filter as described above, correct?

It looks like you are also using EF, correct? 

Tags
Grid
Asked by
onivia
Top achievements
Rank 1
Answers by
Timothy J
Top achievements
Rank 2
Bronze
Iron
Iron
Share this question
or