Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear all rows from Repeater Vb.net

Tags:

asp.net

vb.net

How to clear all rows from a Repeater?

I've tried:

RptSeatOrLap.DataSource=Nothing

But it's not working.

like image 721
Harshit Tailor Avatar asked Oct 15 '13 06:10

Harshit Tailor


2 Answers

You need to call DataBind() in order to see the effect of new data source being assigned.

RptSeatOrLap.DataSource=dtEmptyDataTable;
RptSeatOrLap.DataBind();
like image 166
Adil Avatar answered Nov 12 '22 13:11

Adil


rpt.DataSource = null;
rpt.DataBind();
like image 41
lanshare Avatar answered Nov 12 '22 12:11

lanshare