JanAntwerpen
Member
- Joined
- Nov 5, 2013
- Messages
- 8
- Programming Experience
- Beginner
Hello people!
I have a table with a lot of columns. I want to be able te let the user search on every column. Afterwards I perform a linq query and this should show all the correct data. Problem is that all empty cells return a null value. Making the Linq query not working.
I have following result:
This doesn't work, but I don't know how to fix it so it does work!
I have a table with a lot of columns. I want to be able te let the user search on every column. Afterwards I perform a linq query and this should show all the correct data. Problem is that all empty cells return a null value. Making the Linq query not working.
I have following result:
C#:
var q = from table in dataContext.table1
where table.column1.contains(dgv.currentrow.cells[0].value.tostring()) && table.column2.contains(dgv.currentrow.cells[1].value.tostring()) && ...... table.columnN.contains(dgv.currentrow.cells[N].value.tostring())
select table;
This doesn't work, but I don't know how to fix it so it does work!