or
ContentPlaceHolder cph = this.FindControl("ContentPlaceHolder1") as ContentPlaceHolder;
UserControl uc = this.LoadControl("~/UserControls/" + strName + ".ascx") as UserControl;
if ((cph != null) && (uc != null))
{
uc.ID = strName;
cph.Controls.Clear();
cph.Controls.Add(uc);
IsControlAdded = true;
ViewState[IDS_USERCONTROL] = strName;
}
switch
(index) {
case
0:
//Person
var
arr = GetSelectedPerson();
args.set_cancel(
true
);
break
;
case
1:
//Company
break
;
case
2:
//Group
var
arr = GetSelectedGroups();
break
;
GetSelectedPerson
and GetSelectedGroups
are two js methods that exist in different usercontrols.Validation-IsRequired
"
property of the RadInputManager control?filterItem.FireCommandEvent("Filter", new Pair("NoFilter", "Country")); |
filterItem.FireCommandEvent("Filter", new Pair("NoFilter", "Country")); |
filterItem.FireCommandEvent("Filter", new Pair("NoFilter", "City")); |
I appreciate anyone to clarify those doubts to me.
Regards,
Marcio Nascimento
HttpException was unhandled by user code
DataBinding: 'System.String' does not contain a property with the name 'ReportName'
Protected
Sub
RadGrid1_ItemDataBound(
ByVal
sender
As
Object
,
ByVal
e
As
GridItemEventArgs)
Handles
RadGrid1.ItemDataBound
If
(
TypeOf
e.Item
Is
GridEditableItem
AndAlso
CType
(e.Item, GridEditableItem).IsInEditMode)
Then
Dim
GridRow
As
GridEditableItem = e.Item
Dim
editedItem
As
GridEditableItem =
CType
(e.Item, GridEditableItem)
Dim
editMan
As
GridEditManager = editedItem.EditManager
' this covers the report format field priming
Dim
editor
As
GridDropDownListColumnEditor =
CType
(editMan.GetColumnEditor(
"ddReportFormat"
), GridDropDownListColumnEditor)
Dim
ReportFormatddList
As
DropDownList = editor.DropDownListControl
ReportFormatddList.Items.Insert(0,
New
ListItem(
"Excel"
,
"Excel"
))
ReportFormatddList.Items.Insert(1,
New
ListItem(
"PDF"
,
"PDF"
))
ReportFormatddList.Items.Insert(2,
New
ListItem(
"HTML4.0"
,
"HTML4.0"
))
ReportFormatddList.DataBind()
'select the correct record
Dim
ReportFormatString
As
String
= GridRow.GetDataKeyValue(
"ReportFormat"
).ToString()
ReportFormatddList.Items.FindByValue(ReportFormatString).Selected =
True
'this covers the report name field priming
editor =
CType
(editMan.GetColumnEditor(
"ddReportName"
), GridDropDownListColumnEditor)
Dim
ReportNameddList
As
DropDownList = editor.DropDownListControl
ReportNameddList.DataSource = (From r
In
DbContext.SubscriptionReportNames
Select
r.ReportName).ToList()
ReportNameddList.DataBind() '<-- this is the error line, but only when second row is being edited.
'select the correct record
Dim
ReportNameString
As
String
= GridRow.GetDataKeyValue(
"ReportName"
).ToString()
ReportNameddList.Items.FindByValue(ReportNameString).Selected =
True
End
If
End
Sub
<
telerik:RadGrid
runat
=
"server"
ID
=
"RadGrid1"
AutoGenerateColumns
=
"False"
AllowPaging
=
"True"
AllowSorting
=
"True"
CellSpacing
=
"0"
GridLines
=
"None"
ShowGroupPanel
=
"True"
Skin
=
"Web20"
>
<
MasterTableView
DataKeyNames
=
"ReportFormat,ReportName,FranchiseSubscriptionEmailID"
CommandItemDisplay
=
"Top"
InsertItemPageIndexAction
=
"ShowItemOnCurrentPage"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
></
CommandItemSettings
>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
></
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
></
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridEditCommandColumn
ButtonType
=
"ImageButton"
/>
<
telerik:GridBoundColumn
DataField
=
"FranchiseSubscriptionEmailID"
HeaderText
=
"Record ID"
ReadOnly
=
"true"
ForceExtractValue
=
"Always"
ConvertEmptyStringToNull
=
"true"
Visible
=
"False"
/>
<
telerik:GridBoundColumn
DataField
=
"FranchiseeID"
HeaderText
=
"Franchisee ID"
Visible
=
"False"
/>
<
telerik:GridDropDownColumn
DataSourceID
=
"ReportNameddlist"
ListTextField
=
"ReportName"
ListValueField
=
"ReportName"
UniqueName
=
"ddReportName"
SortExpression
=
"ReportName"
HeaderText
=
"Report Name"
DropDownControlType
=
"DropDownList"
ListDataMember
=
"ReportName"
DataField
=
"ReportName"
>
</
telerik:GridDropDownColumn
>
<
telerik:GridBoundColumn
DataField
=
"EmailAddress"
HeaderText
=
"Email Address"
/>
<
telerik:GridBoundColumn
DataField
=
"Name"
HeaderText
=
"Franchisee Name"
/>
<
telerik:GridDropDownColumn
DataSourceID
=
"ReportFormatddlist"
ListTextField
=
"ReportFormat"
ListValueField
=
"ReportFormat"
UniqueName
=
"ddReportFormat"
SortExpression
=
"ReportFormat"
HeaderText
=
"Report Format"
DropDownControlType
=
"DropDownList"
DataField
=
"ReportFormat"
ListDataMember
=
"ReportFormat"
>
</
telerik:GridDropDownColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"Delete this record?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
/>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
ButtonType
=
"ImageButton"
/>
</
EditFormSettings
>
</
MasterTableView
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
/>
<
ClientSettings
AllowDragToGroup
=
"True"
>
<
ClientEvents
OnRowDblClick
=
"rowDblClick"
/>
</
ClientSettings
>
<
FilterMenu
EnableImageSprites
=
"False"
></
FilterMenu
>
<
HeaderContextMenu
CssClass
=
"GridContextMenu GridContextMenu_Default"
></
HeaderContextMenu
>
</
telerik:RadGrid
>