Hi All
I have a grid view. I added a drop down list on top of page to select number of records in grid view. Somehow I am unable to do that ...
Here is my code... Could some one please help me out?
Thanks in advance
[code=asp]
<asp:DropDownLi st ID="ddlSize" runat="server" OnSelectedIndex Changed="ddl_Se lectedIndexChan ged">
<asp:ListItem Value="10">10</asp:ListItem>
<asp:ListItem Value="20">20</asp:ListItem>
<asp:ListItem Value="30">30</asp:ListItem>
</asp:DropDownLis t>
[/code]
[code=cpp]
protected void ddl_SelectedInd exChanged(objec t sender, EventArgs e)
{
gv.PageSize = ddlPageSize.Sel ectedValue;
gv.DataBind();
}[/code]
I have a grid view. I added a drop down list on top of page to select number of records in grid view. Somehow I am unable to do that ...
Here is my code... Could some one please help me out?
Thanks in advance
[code=asp]
<asp:DropDownLi st ID="ddlSize" runat="server" OnSelectedIndex Changed="ddl_Se lectedIndexChan ged">
<asp:ListItem Value="10">10</asp:ListItem>
<asp:ListItem Value="20">20</asp:ListItem>
<asp:ListItem Value="30">30</asp:ListItem>
</asp:DropDownLis t>
[/code]
[code=cpp]
protected void ddl_SelectedInd exChanged(objec t sender, EventArgs e)
{
gv.PageSize = ddlPageSize.Sel ectedValue;
gv.DataBind();
}[/code]
Comment