I'm sure I'm missing something simple here! I want to load content from my database into several tabs. I have the standard RadTabStrip and RadMultiPage element set up in the aspx code.
In my backend VB code I want to add several tabs. I have this so far:
| Dim tab As RadTab = New RadTab |
| Me.TabStrip.Tabs.Add(tab) |
| tab.Text = "Tab #3" |
| ' this bit is not doing anything at present |
| Dim pageView As RadPageView = New RadPageView |
| Me.TabPages.PageViews.Add(pageView) |
The tab gets added to the tab strip, but when I click it there is no content area. I've looked through all the examples and haven't seen anything that actually adds the tab content, only the tabs. Can anyone help?
<telerik:RadGrid ID="RadGridContainers" runat="server" Skin="Office2007" AllowSorting="True"
GridLines="None" AllowMultiRowSelection="True" OnNeedDataSource="RadGridContainers_NeedDataSource"
Width="800px" Visible="False" ShowStatusBar="True" OnItemCommand="RadGridContainers_ItemCommand"
OnCancelCommand="RadGridContainers_CancelCommand"
AutoGenerateColumns="False"
onitemdatabound="RadGridContainers_ItemDataBound">
<MasterTableView AllowMultiColumnSorting="True" CommandItemDisplay="Top"
DataKeyNames="ContainerID" EditMode="InPlace">
<CommandItemSettings AddNewRecordText="Tilfj ny container" RefreshText="Opdatr" />
<Columns>
<telerik:GridEditCommandColumn CancelText="Annullr" InsertText="Indst" UpdateText="Opdatr"
EditText="Redigr">
</telerik:GridEditCommandColumn>
<telerik:GridBoundColumn DataField="ContainerID" DataType="System.Int32" HeaderText="ContainerID"
ReadOnly="True" SortExpression="ContainerID" UniqueName="ContainerID" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn DataField="ContainerIDParent" DataType="System.Int32"
HeaderText="Forldre" SortExpression="ContainerIDParent" UniqueName="ContainerIDParent"
Visible="True">
<EditItemTemplate>
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<img id="rcbContainerIDParentEditImage" src='<%= ImageController.Instance.ImagePathTreeViewRaw %><%# Eval("mapviewer_Container1.mapviewer_Icon.Icon")%>'
alt="" width="16px" height="16px" />
</td>
<td align="left">
<telerik:RadComboBox ID="rcbContainerIDParent" runat="server" Skin="Office2007" MarkFirstMatch="True"
HighlightTemplatedItems="True" DropDownWidth="500px" Height="200px" DataSourceID="LinqDataSource7"
DataTextField="Name" Width="204px" DataValueField="ContainerID"
OnClientSelectedIndexChanged="rcbContainerIDParentSelectedIndexChanged" SelectedValue='<%# Bind("mapviewer_Container1.ContainerID") %>'>
<CollapseAnimation Duration="200" Type="OutQuint" />
<HeaderTemplate>
<table cellpadding="0" cellspacing="0" style="width: 290px;">
<tr>
<td style="width: 30px;">
Id
</td>
<td style="width: 60px">
Billede
</td>
<td style="width: 200px;">
Navn
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table cellpadding="0" cellspacing="0" style="width: 290px;">
<tr>
<td style="width: 30px;">
<%# Eval("ContainerID")%>
</td>
<td style="width: 60px;">
<img src='<%= ImageController.Instance.ImagePathTreeViewRaw %><%# Eval("mapviewer_Icon.Icon")%>'
alt="" width="16px" height="16px" />
</td>
<td style="width: 200px;">
<%# Eval("Name")%>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
</td>
</tr>
</table>
</EditItemTemplate>
<ItemTemplate>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="border: 0;">
<asp:Image ID="rcbIkonEditImageContainer" ImageUrl='<%# ImageController.Instance.ImagePathTreeViewForGridView((string)Eval("mapviewer_container1.mapviewer_Icon.Icon"))%>'
runat="server" Width="16px" Height="16px" />
</td>
<td style="border: 0;">
<asp:Label ID="ContainerIDLabel" runat="server" Text='<%# Eval("mapviewer_container1.Name") %>'></asp:Label>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="Name" HeaderText="Navn" SortExpression="Name"
UniqueName="Name">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Level" DataType="System.Int32" HeaderText="Level"
SortExpression="Level" UniqueName="Level" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn DataField="IconID" DataType="System.Int32" HeaderText="Ikon"
SortExpression="IconID" UniqueName="IconID" Visible="True">
<EditItemTemplate>
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<img id="rcbIkonEditImage" src='<%= ImageController.Instance.ImagePathTreeViewRaw %><%# Eval("mapviewer_Icon.Icon")%>'
alt="" width="16px" height="16px" />
</td>
<td align="left">
<telerik:RadComboBox ID="rcbIkon" runat="server" Skin="Office2007" MarkFirstMatch="True"
HighlightTemplatedItems="True" DropDownWidth="500px" Height="200px" DataSourceID="LinqDataSource1"
DataTextField="Icon" Width="204px" DataValueField="IconID"
OnClientSelectedIndexChanged="rcbIkonSelectedIndexChanged" SelectedValue='<%# Bind("mapviewer_Icon.IconID") %>'>
<CollapseAnimation Duration="200" Type="OutQuint" />
<HeaderTemplate>
<table cellpadding="0" cellspacing="0" style="width: 190px;">
<tr>
<td style="width: 30px;">
Id
</td>
<td style="width: 60px;">
Billede
</td>
<td style="width: 100px">
Filnavn
</td>
</tr>
</table>
</HeaderTemplate>
<ItemTemplate>
<table cellpadding="0" cellspacing="0" style="width: 190px;">
<tr>
<td style="width: 30px;">
<%# Eval("IconID")%>
</td>
<td style="width: 60px;">
<img src='<%= ImageController.Instance.ImagePathTreeViewRaw %><%# Eval("Icon")%>'
alt="" width="16px" height="16px" />
</td>
<td style="width: 100px;">
<%# Eval("Icon")%>
</td>
</tr>
</table>
</ItemTemplate>
</telerik:RadComboBox>
</td>
</tr>
</table>
</EditItemTemplate>
<ItemTemplate>
<img src='<%= ImageController.Instance.ImagePathTreeViewRaw %><%# Eval("mapviewer_Icon.Icon")%>'
alt="" width="16px" height="16px" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridCheckBoxColumn DataField="Enabled" DataType="System.Boolean" HeaderText="Aktiv"
SortExpression="Enabled" UniqueName="Enabled">
</telerik:GridCheckBoxColumn>
<telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Fjern" CommandName="Delete" />
</Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
</EditFormSettings>
</MasterTableView>
<ClientSettings>
<Selecting AllowRowSelect="True" />
</ClientSettings>
</telerik:RadGrid>
protected
void RadGridContainers_ItemCommand(object source, GridCommandEventArgs e)
{
if (e.CommandName == RadGrid.InitInsertCommandName)
{
e.Canceled =
true;
System.Collections.Specialized.ListDictionary newValues = new System.Collections.Specialized.ListDictionary();
layerDataClassesDataContext =
new LayerDataClassesDataContext();
newValues[
"mapviewer_Container1.mapviewer_Icon.Icon"] = layerDataClassesDataContext.mapviewer_Icons.First(i => i.IconID.Equals(6));
newValues[
"mapviewer_Container1"] = layerDataClassesDataContext.mapviewer_Containers.First(c => c.ContainerIDParent.Equals(null));
newValues[
"mapviewer_Icon.Icon"] = layerDataClassesDataContext.mapviewer_Icons.First(i => i.IconID.Equals(6)).Icon;
newValues[
"mapviewer_Icon"] = layerDataClassesDataContext.mapviewer_Icons.First(i => i.IconID.Equals(6));
e.Item.OwnerTableView.InsertItem(newValues);
//layerDataClassesDataContext = new LayerDataClassesDataContext();
//mapviewer_Container container = new mapviewer_Container();
//container.mapviewer_Container1 = layerDataClassesDataContext.mapviewer_Containers.First(c => c.ContainerIDParent.Equals(null));
//container.mapviewer_Icon = layerDataClassesDataContext.mapviewer_Icons.First(i => i.IconID.Equals(6));
//e.Item.OwnerTableView.InsertItem(container);
}
}
MSI (s) (A4:BC) [09:43:58:033]: Executing op: ActionStart(Name=InstallSPSolution,,)
Action 9:43:58: InstallSPSolution.
MSI (s) (A4:BC) [09:43:58:096]: Executing op: CustomActionSchedule(Action=InstallSPSolution,ActionType=3073,Source=BinaryData,Target=InstallSPSolution,CustomActionData=RadControlsSP.wsp)
MSI (s) (A4:58) [09:43:58:189]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIC10B.tmp, Entrypoint: InstallSPSolution
MSI (s) (A4:F4) [09:43:58:189]: Generating random cookie.
MSI (s) (A4:F4) [09:43:58:189]: Created Custom Action Server with PID 5540 (0x15A4).
MSI (s) (A4:BC) [09:43:58:252]: Running as a service.
MSI (s) (A4:BC) [09:43:58:267]: Hello, I'm your 64bit Elevated custom action server.
SFXCA: Extracting custom action to temporary directory: C:\Windows\Installer\MSIC10B.tmp-\
SFXCA: Binding to CLR version v2.0.50727
Calling custom action DeployWspOnSharepointCustomAction!DeployWspOnSharepointCustomAction.CustomAction.InstallSPSolution
Begin installing Sharepoint solution.
Exception thrown by custom action:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Management.Automation.CmdletInvocationException: Cannot access the local farm.
Verify that the local farm is properly configured, currently available, and that you have the appropriate permissions to access the database before trying again. --->
Microsoft.SharePoint.PowerShell.SPCmdletException: Cannot access the local farm. Verify that the local farm is properly configured, currently available, and that you have the appropriate
permissions to access the database before trying again.
at Microsoft.SharePoint.PowerShell.SPCmdlet.BeginProcessing()
--- End of inner exception stack trace ---
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
at System.Management.Automation.PipelineNode.Execute(Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)
at System.Management.Automation.StatementListNode.ExecuteStatement(ParseTreeNode statement, Array input, Pipe outputPipe, ArrayList& resultList, ExecutionContext context)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture)
at Microsoft.Deployment.WindowsInstaller.CustomActionProxy.InvokeCustomAction(Int32 sessionHandle, String entryPoint, IntPtr remotingDelegatePtr)
CustomAction InstallSPSolution returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 9:44:02: InstallFinalize. Return value 3.
MSI (s) (A4:BC) [09:44:02:783]: User policy value 'DisableRollback' is 0
MSI (s) (A4:BC) [09:44:02:783]: Machine policy value 'DisableRollback' is 0
Itemselector.ascx <cc:CmsUrlWebEditor id="cmsUrlWebEditor" runat="server" />
<%@ Register TagPrefix="cc" Namespace="Telerik.Cms.Web.UI" Assembly="Telerik.Cms" %>
protected override void OnPreRenderComplete(EventArgs e) {
base.OnPreRenderComplete(e);
RadMenuItem item = RadGrid1.HeaderContextMenu.FindItemByValue("GroupBy");
RadGrid1.HeaderContextMenu.Items.RemoveAt(0); RadGrid1.HeaderContextMenu.Items.Remove(item); item = RadGrid1.HeaderContextMenu.FindItemByValue("UnGroupBy"); RadGrid1.HeaderContextMenu.Items.Remove(item); }The code translation tool is not working. Intellisence shows errors; the site won't compile.
Also, don't you need the IsReusable() property?