Hi
I want to check condition in repeater itemdatabound. If condition is not met then record should not be displayed.
Thanks
Hi
I want to check condition in repeater itemdatabound. If condition is not met then record should not be displayed.
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Naimish MakwanaPosted Apr 18, 2023, 9:18 AM
To display or not to display a record in a Repeater control's ItemDataBound event based on a condition, you can simply manipulate the Visible property of the RepeaterItem object that represents the current data item being bound.
Here's a sample code that demonstrates how to achieve this:
Thanks
Amit MohantyPosted Apr 18, 2023, 8:50 AM
You can use the ItemDataBound event of the Repeater control to check your condition and hide the item if the condition is not met. Here's an example code snippet in C#: