Class HeaderTemplate
Implements ITemplate
Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn
Dim table As New HtmlTable()
Dim row As New HtmlTableRow()
Dim cell As New HtmlTableCell()
table.Width = "100%"
cell.InnerHtml = "<font size='1pt'><b>Projekt Nr.</b></font>"
cell.Width = "30%"
row.Controls.Add(cell)
Dim cell1 As New HtmlTableCell()
cell1.InnerHtml = "<font size='1pt'><b>Projekt Name</b></font>"
cell1.Width = "70%"
row.Controls.Add(cell1)
table.Controls.Add(row)
container.Controls.Add(table)
End Sub
End Class
And here I bind data:
Dim ds As New SPDataSource
ds.DataSourceMode = SPDataSourceMode.List
ds.List = web.Lists("Projekte")
ds.UseInternalName = True
projekt = New RadComboBox
projekt.ID = "cmb_projekt"
projekt.Width = 300
projekt.Skin = "WebBlue"
projekt.HeaderTemplate = New HeaderTemplate()
projekt.DataSource = ds
projekt.DataTextField = "Nr"
projekt.DataBind()
Thanks for all replies.
Best regards,
Mark
| <telerik:RadCaptcha ID="RadCaptcha1" Runat="server" EnableRefreshImage="true" |
| CaptchaTextBoxLabel="<br />neem de code over." |
| CaptchaLinkButtonText="Genereer nieuwe code" |
| CaptchaImage-TextChars="CustomCharSet" |
| CaptchaImage-CharSet="ABCDEFGHIJKLMNPQRSTUVWXY@#%&" |
| Display="Dynamic" |
| ProtectionMode="Captcha" |
| RegisterWithScriptManager="true" |
| ErrorMessage="Foute code" |
| ValidationGroup="submitGroup" > |
| </telerik:RadCaptcha> |
Server Error in '/PWeb' Application.
--------------------------------------------------------------------------------
A potentially dangerous Request.Form value was detected from the client (RadCaptcha1$CaptchaTextBox="JP&#D").
Description: Request Validation has detected a potentially dangerous client input value, and processing of the request has been aborted. This value may indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. You can disable request validation by setting validateRequest=false in the Page directive or in the configuration section. However, it is strongly recommended that your application explicitly check all inputs in this case.
Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (RadCaptcha1$CaptchaTextBox="JP&#D").

<
telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticInserts="false" AllowAutomaticUpdates="false"
AllowMultiRowEdit="false" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
EnableEmbeddedSkins="false" GridLines="None" MasterTableView-EditMode="InPlace"
OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound"
OnNeedDataSource="RadGrid1_NeedDataSource" OnPreRender="RadGrid1_PreRender" OnUpdateCommand="RadGrid1_UpdateCommand"
PageSize="20" ShowStatusBar="True" Skin="Custom">
<MasterTableView AutoGenerateColumns="false" ClientDataKeyNames="PROPID" CommandItemDisplay="TopAndBottom" NoMasterRecordsText="No Data Available"
CommandItemStyle-HorizontalAlign="Right" DataKeyNames="PROPID" EditMode="InPlace"
ItemStyle-Height="20px" >
<Columns>
<telerik:GridTemplateColumn DataField="AppId" Display="false" HeaderText="AppId"
UniqueName="AppId">
<ItemTemplate>
<asp:Label ID="lblAppId" runat="server" Text='<%# Bind( "AppId" ) %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblAppIdEdit" runat="server" Text='<%# Bind( "AppId" ) %>'></asp:Label>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn DataField="PROPID" Display="false" HeaderText="PROPID"
UniqueName="PROPID">
<ItemTemplate>
<asp:Label ID="lblPROPID" runat="server" Text='<%# Bind( "PROPID" ) %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:Label ID="lblPROPIDEdit" runat="server" Text='<%# Bind( "PROPID" ) %>'></asp:Label>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="PropertyType" HeaderText="Category" ReadOnly="true"
UniqueName="PropertyType">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="PropertyName" HeaderText="Property Name" ReadOnly="true"
UniqueName="PropertyName">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn DataField="PropertyValue" HeaderText="Property Value"
UniqueName="PropertyValue">
<ItemTemplate>
<asp:Label ID="lblPropertyValue" runat="server" Text='<%# Bind( "PropertyValue" ) %>'>
</asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:DropDownList ID="ddlList" runat="server">
</asp:DropDownList>
<asp:TextBox ID="txtPropertyValue" runat="server" CssClass="adminUser_textInput1" Text='<%# Bind( "PropertyValue" ) %>' MaxLength='<%# Bind( "PropertyMax" ) %>' ></asp:TextBox>
<telerik:RadColorPicker ID="cpColorProperty" runat="server" ShowIcon="true" ShowEmptyColor="false" OnClientColorChange="HandleColorChange" Height="350" Width="350"></telerik:RadColorPicker>
<span id = "SpanMandatory" runat="server" style="color: Red"> *</span>
<br/>
</EditItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn DataField="PropertyDefaultValue" HeaderText="Default Value"
ReadOnly="true" UniqueName="PropertyDefaultValue">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn HeaderText="Property Description" UniqueName="PropertyDescription">
<ItemTemplate>
<asp:Label ID="lblPropertyDescription" runat="server" Text='<%# Bind( "PropertyDescription" ) %>'/>
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridEditCommandColumn ButtonType="ImageButton" CancelImageUrl="../../Skins/Custom/Grid/Cancel.gif"
EditImageUrl="../../Skins/Custom/Grid/Edit.gif" HeaderStyle-CssClass="header_grid"
HeaderText="Action" InsertImageUrl="../../Skins/Custom/Grid/AddRecord.gif" UniqueName="EditCommandColumn"
UpdateImageUrl="../../Skins/Custom/Grid/Update.gif">
<ItemStyle CssClass="grid" Width="3%" />
</telerik:GridEditCommandColumn>
</Columns>
<PagerTemplate>
<div>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td>
<asp:Panel ID="PagerPanel" runat="server" BorderStyle="None" BorderWidth="0">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="30%">
<img alt="" src="/images/spacer.gif" width="12" /></td>
<td width="70%">
<table border="0" cellpadding="0" cellspacing="6" class="site_setting_table">
<tr>
<td height="20" width="20">
<asp:Button ID="btnChangeToFirst" runat="server" CommandArgument="First" CommandName="Page"
CssClass="data_preView_but3" Height="20" OnClientClick="changePage('first'); return false;"
ToolTip="First" Width="20" />
</td>
<td height="20" width="20">
<asp:Button ID="btnChangeToPrev" runat="server" CssClass="data_preView_but1" Height="20"
OnClientClick="changePage('prev'); return false;" ToolTip="Previous" Width="20" />
</td>
<td>
<table border="1" cellpadding="0" cellspacing="0" class="site_setting_table">
<tr>
<td class="admin_label4">
Page:
</td>
<td class="admin_label4">
<telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" Height="19" Skin="Office2007"
Value='<%# (int)DataBinder.Eval(Container, "Paging.CurrentPageIndex") + 1 %>'
Width="25px">
<NumberFormat DecimalDigits="0" />
</telerik:RadNumericTextBox></td>
<td class="admin_label4">
of
<%
# DataBinder.Eval(Container, "Paging.PageCount")%>
<!-- Cybage- -->
<!-- Cybage- -->
</td>
</tr>
</table>
</td>
<td height="20" width="20">
<asp:Button ID="btnChangetoNext" runat="server" CommandArgument="Next" CommandName="Page"
CssClass="data_preView_but2" Height="20" OnClientClick="changePage('next'); return false;"
ToolTip="Next" Width="20" />
</td>
<td height="20" width="20">
<asp:Button ID="btnChangeToLast" runat="server" CommandArgument="Last" CommandName="Page"
CssClass="data_preView_but4" Height="20" OnClientClick="changePage('last'); return false;"
ToolTip="Last" Width="20" />
<asp:Panel ID="NumericPagerPlaceHolder" runat="server">
</asp:Panel>
</td>
<!-- Cybage- -->
<td class="admin_label4">
<table>
<tr>
<td class="admin_label4">
Records per page:
</td>
<td>
<asp:DropDownList ID="ddlpagesize" runat="server" AutoPostBack="true" CssClass="admin_list2"
OnSelectedIndexChanged="ddlpagesize_OnSelectedIndexChange">
<asp:ListItem Text="15" Value="15"></asp:ListItem>
<asp:ListItem Text="20" Value="20"></asp:ListItem>
<asp:ListItem Text="25" Value="25"></asp:ListItem>
<asp:ListItem Text="30" Value="30"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
</td>
<!-- Cybage- -->
</tr>
</table>
</td>
</tr>
</table>
</asp:Panel>
</td>
</tr>
</table>
</div>
</PagerTemplate>
<PagerStyle Mode="NumericPages" PageButtonCount="10" />
<CommandItemTemplate>
<%
--<asp:Button ID="UpdateBtn" runat="server" CausesValidation="False" CommandName="UpdateAll"
CssClass="button" Text="Update" ToolTip="Update" />--
%>
</CommandItemTemplate>
</MasterTableView>
<%
--------Cybage-04-Feb-2009----------------------------------------------------------------------------------------%>
<ClientSettings>
<ClientEvents OnGridCreated="GridCreated" OnRowClick="RowClick" OnRowDblClick="RowDblClick" />
</ClientSettings>
<%
--------Cybage-04-Feb-2009----------------------------------------------------------------------------------------%>
<EditItemStyle CssClass="EditRow_WinXP" />
</telerik:RadGrid>
