I have been searching all over for an answer but have yet to find anything.I have a repeater that I use to display a letter paging system. It looks something like this
<asp:Repeater ID="rpt_Letters" runat="server"> <ItemTemplate> <asp:LinkButton ID="lbtn_Letter" CausesValidation="false" CommandName="Filter" CommandArgument='<%# Eval("Letter") %>' runat="server" style="padding-left:7px; padding-top: 10px;" ToolTip='<%# Eval("Letter") %>'><%# Eval("Letter") %></asp:LinkButton> </ItemTemplate> </asp:Repeater>
Once a letter is clicked I want to update the information in a GridView.
I have the GridView in an update panel, but I can't find away to set my Letter Paging as a trigger.
Thank You!
Add your repeater control to an UpdatePanel as follows:<asp:UpdatePanelID="PagingPanel"UpdateMode="Conditional"runat="server"><ContentTemplate><asp:RepeaterId="">...</asp:Repeater>and put your gridview control in another UpdatePanel like this:<asp:UpdatePanelID="OrderDetailsPanel"UpdateMode="Always"runat="server"><ContentTemplate><asp:gridview/>And then add handler for OnCommand event of the linkbutton (lbtn_Letter) where you can filter rows like this:protected void Letter_OnCommand(object sender, CommandEventArguments e) { SqlDataSource2.SelectParameters["OrderID"].DefaultValue = e.CommandArgument ;SqlDataSource2.DataBind();}where SqlDataSource2 is bound to your GridView control.That's it.
Thanks!
No comments:
Post a Comment