I'm stumbling once again. This time, I'm trying to dynamically add tabs and an associated pageview to when an item from a RadGrid is selected.
The tab is created and selected, however the text does not get set, nor does it appear that the pageview is created. I've verified with a radalert that the e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["queueid"].ToString() does return a valid string.
What am I missing here?
The tab is created and selected, however the text does not get set, nor does it appear that the pageview is created. I've verified with a radalert that the e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["queueid"].ToString() does return a valid string.
What am I missing here?
protected void QueueGrid_ItemCommand(object source, GridCommandEventArgs e) |
{ |
if (e.CommandName == "RowClick" && e.Item is GridDataItem) |
{ |
if (RadTabStrip1.FindTabByText(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["queueid"].ToString()) == null) |
{ |
RadTab tab1 = new RadTab(); |
RadTabStrip1.Tabs.Add(tab1); |
RadPageView newpage = new RadPageView(); |
RadMultiPage1.PageViews.Add(newpage); |
newpage.ID = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["queueid"].ToString(); |
tab1.Text = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["queueid"].ToString(); |
tab1.Value = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["queueid"].ToString(); |
tab1.PageViewID = newpage.ID; |
RadTabStrip1.SelectedIndex = RadTabStrip1.SelectedIndex + 1; |
RadMultiPage1.SelectedIndex = RadMultiPage1.SelectedIndex + 1; |
} |
} |
} |