Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Repeater ReloadData() on Button Click View modes: 
User avatar
Member
Member
AlgarveWeb - 6/7/2011 3:11:44 AM
   
Repeater ReloadData() on Button Click
Hi

I am trying to reload a Repeater with a Custom Filter String (CMSWebPart) using:

Protected Sub btn_search_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_search.Click
With rpt_prop_apartment '=Repeater
.WhereCondition = my_search '=Custom Filter String
.ReloadData(True) 'Does not do anything!
End With
End Sub

But it does not work.

If I put the same code in Page_Init it works!

Please advice, thanks, Mike.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 6/7/2011 5:29:20 AM
   
RE:Repeater ReloadData() on Button Click
Hello,

That's odd. I've set up the same scenario and it works ok. here is my code:

protected void Button1_click(object sender, EventArgs e)
{

repeater.WhereCondition = "DocumentName like '%Samsung%'";
repeater.ReloadData();

}


Have you tried to debug your code? Is it called correctly when the button is pressed?

Best regards,
Boris Pocatko

User avatar
Member
Member
AlgarveWeb - 6/8/2011 1:13:15 AM
   
RE:Repeater ReloadData() on Button Click
Hi

many thanks, got it working fine.

Was using an AjaxPanel and the Repeater was outside and not getting updated.

One of those little things which are quickly overseen :)

Cheers

Mike