or
ItemDataBound
event. I get the default product group to be displayed accordingly but it creates a duplicate and I don't think this is the correct way to do this.protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
{
GridEditFormItem item = e.Item as GridEditFormItem;
RadComboBox statusComboBox = (RadComboBox)item.FindControl("RadComboBox1");
// get the parent GridDataItem for this form
// (i.e. which row this edit form is generated for)
GridDataItem parentGridItem;
parentGridItem = item.ParentItem;
// put the current product group on combobox's first entry
statusComboBox.Items.Insert(0, new RadComboBoxItem(parentGridItem["product_group"].Text, string.Empty));
}
}
<
script
type
=
"text/javascript"
language
=
"javascript"
>
function EnableControl_3() {
var combo3 = $find("<%= RadCmbxSections.ClientID %>");
var combo4 = $find("<%= RadCmbxDepartment.ClientID %>");
var combo = $find("<%= RadCmbxEmployee.ClientID %>");
var checkbox = document.getElementById('<%= chkEmployee.ClientID %>');
if (checkbox.checked) {
combo.enable();
combo3.enable();
combo4.enable();
} else {
combo.disable();
combo3.disable();
combo4.disable();
}
}
</
script
>
<
telerik:RadComboBox
runat
=
"server"
ID
=
"RadCmbxEmployee"
Height
=
"190px"
EmptyMessage
=
"Select supplier"
Width
=
"410px"
MarkFirstMatch
=
"true"
DataSourceID
=
"SqlDataSource2"
EnableLoadOnDemand
=
"true"
HighlightTemplatedItems
=
"true"
OnClientItemsRequested
=
"UpdateItemCountField"
OnDataBound
=
"RadCmbxEmployee_DataBound"
OnItemDataBound
=
"RadCmbxEmployee_ItemDataBound"
OnItemsRequested
=
"RadCmbxEmployee_ItemsRequested"
AutoPostBack
=
"True"
>
<
HeaderTemplate
>
<
ul
class
=
"rcbHovered"
>
<
li
class
=
"col1"
>Name</
li
>
<
li
class
=
"col2"
>Code</
li
>
<
li
class
=
"col3"
>ContactPerson</
li
>
</
ul
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
ul
>
<
li
class
=
"col1"
>
<%#DataBinder.Eval(Container.DataItem, "Name")%></
li
>
<
li
class
=
"col2"
>
<%#DataBinder.Eval(Container.DataItem, "Code")%></
li
>
<
li
class
=
"col3"
>
<%#DataBinder.Eval(Container.DataItem, "ContactPerson")%></
li
>
</
ul
>
</
ItemTemplate
>
<
FooterTemplate
>
A total of
<
asp:Literal
runat
=
"server"
ID
=
"RadComboItemsCount"
/>
items
</
FooterTemplate
>
</
telerik:RadComboBox
>
<
EditFormSettings
EditFormType
=
"Template"
>
<
EditColumn
ButtonType
=
"ImageButton"
/>
<
FormTemplate
>
<
table
cellpadding
=
"2"
cellspacing
=
"1"
border
=
"0"
style="font-size: small; border-collapse: collapse;
background: white;">
<
tr
valign
=
"top"
>
<
td
colspan
=
"2"
align
=
"left"
>
<
b
>Document Details</
b
>
</
td
>
</
tr
>
<
tr
valign
=
"top"
>
<
td
class
=
"ContentWhite"
>
<
span
class
=
"Error"
>*</
span
>Document Type:
</
td
>
<
td
class
=
"ContentWhite"
align
=
"left"
>
<
telerik:RadComboBox
ID
=
"rcbDocumentType"
runat
=
"server"
EnableItemCaching
=
"true"
MaxHeight
=
"300px"
OnSelectedIndexChanged
=
"rcbDocumentType_SelectedIndexChanged"
>
<
Items
>
<
telerik:RadComboBoxItem
Value
=
"-Select-"
Text
=
"-Select-"
/>
<
telerik:RadComboBoxItem
Value
=
"1"
Text
=
"W9"
/>
<
telerik:RadComboBoxItem
Value
=
"2"
Text
=
"E&O"
/>
<
telerik:RadComboBoxItem
Value
=
"3"
Text
=
"License"
/>
<
telerik:RadComboBoxItem
Value
=
"4"
Text
=
"Vendor Acknowledgement"
/>
<
telerik:RadComboBoxItem
Value
=
"5"
Text
=
"Master Listing Agreement"
/>
<
telerik:RadComboBoxItem
Value
=
"6"
Text
=
"State Registration"
/>
</
Items
>
</
telerik:RadComboBox
>
<
asp:RequiredFieldValidator
ID
=
"RequiredFieldValidator2"
runat
=
"server"
Display
=
"None"
ValidationGroup
=
"vgDocument"
ControlToValidate
=
"rcbDocumentType"
InitialValue
=
"-Select-"
ErrorMessage
=
" Document Type is required "
/>
</
td
>
</
tr
>
<
tr
valign
=
"top"
>
<
td
class
=
"ContentWhite"
>
<
asp:Label
ID
=
"lblManagingBrokerFirstName"
runat
=
"server"
Text
=
"First Name:"
Visible
=
"false"
/>
</
td
>
<
td
class
=
"ContentWhite"
align
=
"left"
>
<
telerik:RadTextBox
ID
=
"rtbManagingBrokerFirstName"
runat
=
"server"
MaxLength
=
"128"
/>
</
td
>
</
tr
>
<
tr
valign
=
"top"
>
<
td
class
=
"ContentWhite"
>
<
asp:Label
ID
=
"lblManagingBrokerLastName"
runat
=
"server"
Text
=
"Last Name:"
/>
</
td
>
<
td
class
=
"ContentWhite"
align
=
"left"
>
<
telerik:RadTextBox
ID
=
"rtbManagingBrokerLastName"
runat
=
"server"
MaxLength
=
"128"
/>
</
td
>
</
tr
>
grid1.ItemCommand += New GridCommandEventHandler(RadGridView_ItemCommand)
<
telerik:RadUpload
ID
=
"LogoFileUpload"
MaxFileInputsCount
=
"1"
ControlObjectsVisibility
=
"None"
Skin
=
"Web20"
runat
=
"server"
/>
<
telerik:RadSplitter
runat
=
"Server"
ID
=
"splMain"
Width
=
"100%"
BorderSize
=
"0"
BorderStyle
=
"None"
PanesBorderSize
=
"0"
Height
=
"100%"
Orientation
=
"Horizontal"
VisibleDuringInit
=
"false"
>
<
telerik:RadPane
ID
=
"topPane"
runat
=
"server"
Height
=
"60px"
BackColor
=
"#157164"
>
<
telerik:RadAjaxPanel
ID
=
"radAjaxPanel01"
runat
=
"server"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
telerik:RadMenu
id
=
"mnuTop01"
runat
=
"server"
EnableViewState
=
"false"
CausesValidation
=
"false"
OnClientItemClicked
=
"OnClientItemClicked"
CollapseAnimation-Type
=
"None"
EnableShadows
=
"true"
EnableRoundedCorners
=
"true"
Style
=
"float: none; position:absolute; top:20px; z-index:2000;"
Width
=
"100%"
>
</
telerik:RadMenu
>
<
div
class
=
"div02"
style
=
"float: none; position:absolute; top:45px; height:16px; text-align:center;"
>
<
asp:Label
ID
=
"lblApp"
runat
=
"server"
cssclass
=
"tb2"
Text
=
"Inicio"
/>
</
div
>
</
telerik:RadAjaxPanel
>
</
telerik:RadPane
>
<
telerik:RadPane
runat
=
"server"
ID
=
"pnlContenido"
Scrolling
=
"Both"
ContentUrl
=
"ePageEmpty00.aspx?a=some"
ShowContentDuringLoad
=
"false"
>
</
telerik:RadPane
>
</
telerik:RadSplitter
>
function
fnT(a) {
var
l = document.getElementById(
"lblApp"
);
l.innerHTML = a;
}
window.onload =
function
() {
window.parent.fnT(
'Some Info'
);
}