V
Vijay
Hi All,
I have a data grid in my user contro, on ItemCreated event i am adding
attributes to the grid's paging navigation buttons [i.e 1 2 3 etc]. After
adding the "OnClick" attribute, if i click the navigation button the
"PageIndexChanged" event is not firing. If remove the onclick attribute, then
the "PageIndexChanged" event is firing.
private void dgAdjFactor_ItemCreated(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Pager)
{
foreach(Control NavButtons in e.Item.Cells[0].Controls)
if(NavButtons.GetType().ToString().Equals("System.Web.UI.WebControls.DataGridLinkButton"))
{
((LinkButton)NavButtons).Attributes.Add("OnClick",
"javascript:hidIsControlPostBack.value='yes';");
}
}
}
}
I have a data grid in my user contro, on ItemCreated event i am adding
attributes to the grid's paging navigation buttons [i.e 1 2 3 etc]. After
adding the "OnClick" attribute, if i click the navigation button the
"PageIndexChanged" event is not firing. If remove the onclick attribute, then
the "PageIndexChanged" event is firing.
private void dgAdjFactor_ItemCreated(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Pager)
{
foreach(Control NavButtons in e.Item.Cells[0].Controls)
if(NavButtons.GetType().ToString().Equals("System.Web.UI.WebControls.DataGridLinkButton"))
{
((LinkButton)NavButtons).Attributes.Add("OnClick",
"javascript:hidIsControlPostBack.value='yes';");
}
}
}
}