Hello, I am using the RadGrid from the Prometheus release, version 2007.3.1425.20 in a .Net 2.0 application. We are trying to raise an event up from a user control to it's parent container. The set up is a RadGrid control is contained within a user control placed in a parent aspx page that uses a master page. The user control's parent aspx page's OnBubbleEvent never gets control. The code used for this follows. Any help would be appreciated. All I can think of is that the RadGrid has an OnBubbleEvent and returns false so it never bubbles, but I am not sure.
The following code is called form the linkbutton and contains the RaiseBubbleEvent:
protected void getSelectedItems(object sender, EventArgs e)
{
//iterate through selection and add selected items to collection
foreach (GridDataItem item in grdBlocklist.MasterTableView.Items)
{
if (((CheckBox)item.FindControl("chkDisable")).Checked)
{
_items.Add(new BlockList(0, item["BillTo"].Text, item["ShipTo"].Text, item["SoldTo"].Text,
null, null, DateTime.Now.ToString(), item["BrandDesc"].Text, _type));
}
}
//...then raise event to parent
RaiseBubbleEvent(sender, e);
}
The linkbutton that start this train was added by this code:
protected void grdBlocklist_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item is GridHeaderItem)
{
GridHeaderItem header = (GridHeaderItem)e.Item;
LinkButton btn = new LinkButton();
btn.Text = (_editMode ? "[block]" : "[unblock]");
btn.Command += new CommandEventHandler(getSelectedItems);
header["disable"].Controls.AddAt(0, btn);
}
}
However the parent container's following code block is not hit:
protected void OnBubbleEvent(object sender, EventArgs e)
{
try
{
foreach (BlockList item in this.ctlBlocklistTelerik1.Items)
{
//check if this is a block or unblock
if (this.ctlBlocklistTelerik1.EditMode)
item.Block();
else
item.UnBlock();
}
//rebuild list
rebindBlocklist();
}
catch (Exception oEX)
{
throw;
}
}
Thanks