Hi all, I’m trying to filter a datatable dynamically and each time I use DefaultView.ToTable it tells me “Value of type ‘DataTable’ cannot be converted to ‘DataTable()’”
What am I doing wrong?
Sorry if this is a dumb question.
Hi all, I’m trying to filter a datatable dynamically and each time I use DefaultView.ToTable it tells me “Value of type ‘DataTable’ cannot be converted to ‘DataTable()’”
What am I doing wrong?
Sorry if this is a dumb question.
Hi @fustian,
Good day!
And No question is a dumb question
I think below post would help you with filtering your datatable.
It defines all the possible ways to filter a datatable, hope this helps.
Regards
Sonali
Can you share what you are using now and what logic you are trying to implement.
Generally we use like this to remove all duplicate data rows
dt_DatatableName.DefaultView.ToTable(True)
Hello @fustian
Are you able to share your .xaml-file here for better understanding of your scenario?
Perhaps you can use the .Select function for your filtering.
DTemployee.Select("[ACC.ACCOUNT Name] = '"+str_Name+"'").CopyToDatatable
Regards
Soren
Looks like your filteredemployeelist variable type is not datatable…can you please check the same…
may be it is array of datatable…change that to datatable and it should fix the error
cheers