Monday, August 17, 2009

how to open new window using GridButtonColumn?

how to open new window using GridButtonColumn?

THis is on telerik controls. I need this on C# and asp.net. I am trying to use gridbuttoncolumn when image is clicked new window will open up.. target= _new is not supported how can I do that? I tried this below code but it is saying are you missing assemblies it is not found for underlined words, TableCell and ImageButton

<radG:GridButtonColumn ButtonType="ImageButton" ..

protected void RadGrid_OnDataBound(object sender, EventArgs e)
{
foreach (GridDataItem item in rgManageEvents.Items)
{
if (item.ItemType == GridItemType.Item
|| item.ItemType == GridItemType.AlternatingItem)
{
TableCell cell = item.Cells[2];
Control ctl = cell.Controls[0];
if (ctl is ImageButton)
{
(ctl as ImageButton).Attributes.Add("onclick", "document.forms[0].target= '_new';return true;");
}
}
}
}


View Full Details...............................

No comments:

Post a Comment