K
Kalpesh
Hello,
I have a WebUserControl in which there are Link Button and
Buttons, I have made public properties for this button.
now this control i am using it inside a datagrid
and then in datagrid's ItemDataBound event i am writing
following code.
private void DataGrid1_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
VBAccomSearchResultsProductView ctrl =
(VBAccomSearchResultsProductView) e.Item.FindControl
("ProductListView");
if(ctrl!=null)
{
DataRowView drv = (DataRowView) e.Item.DataItem;
ctrl.ProductID=int.Parse(drv[0].ToString());
ctrl.LBtnProductName.Text=drv[0].ToString();
ctrl.BtnAddToItinerary.Click+=new EventHandler
(BtnAddToItinerary_Click);
}
}
the problem is Click Event of BtnAddToItinerary is not
firing.
pls tell me what am i doing wrong.
thanx,
Kalpesh
I have a WebUserControl in which there are Link Button and
Buttons, I have made public properties for this button.
now this control i am using it inside a datagrid
and then in datagrid's ItemDataBound event i am writing
following code.
private void DataGrid1_ItemDataBound(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
VBAccomSearchResultsProductView ctrl =
(VBAccomSearchResultsProductView) e.Item.FindControl
("ProductListView");
if(ctrl!=null)
{
DataRowView drv = (DataRowView) e.Item.DataItem;
ctrl.ProductID=int.Parse(drv[0].ToString());
ctrl.LBtnProductName.Text=drv[0].ToString();
ctrl.BtnAddToItinerary.Click+=new EventHandler
(BtnAddToItinerary_Click);
}
}
the problem is Click Event of BtnAddToItinerary is not
firing.
pls tell me what am i doing wrong.
thanx,
Kalpesh