Hi
How to hide repeater row in ItemDataBound
Thanks
Hi
How to hide repeater row in ItemDataBound
Thanks
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted Jun 5, 2023, 1:31 AM EDT
To hide a repeater row in the ItemDataBound event in ASP.NET, you can access the repeater item and set its visibility property to false.
protected void YourRepeater_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) { YourDataType item = (YourDataType)e.Item.DataItem; // Perform your logic to determine whether to hide the row bool hideRow = // your logic to determine whether to hide the row based on item data if (hideRow) { // Hide the current row e.Item.Visible = false; } } }