Filter Checkbox List databounded to database

Posted by Raj.Trivedi under ASP.NET on 10/18/2015 | Points: 10 | Views : 1088 | Status : [Member] [MVP] | Replies : 1
Hello Team,

I have a checkbox list and want to filter the checkbox list as the user types in the textbox. The checkboxlist is databounded and the data is coming from database.

Eg : if the user types 101 in textbox and if the checkbox list has 101 bounded then it should filter and show it on top.

"Sharing is Caring"
Please mark as answer if your Query is resolved


Posted by: Rajnilari2015 on: 10/18/2015 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

It can be performed in two ways
a)On lost focus of text box, you can filter your database record as

select * from tablename where columnname= @value

b) Before binding to the ComboBox, filter the DataRecord by using LINQ / Lambda . Or if you are using datatable as dataSource, then you are left with the options like DataView / LINQ/LAMBDA/ DataRow's Select query for filtering purpose.

Hope this helps

Thanks & Regards,
RNA Team

Raj.Trivedi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response