or
Hi,
I need to get the value of column, and was trying to get it as in the following thread:
http://www.telerik.com/community/forums/aspnet-ajax/grid/how-fetch-column-value-from-detailtables.aspx
protected
void
RG_SearchResult_ItemCommand(
object
source, Telerik.Web.UI.GridCommandEventArgs e)
{
...
if
(e.CommandName ==
"History"
)
{
if
(e.Item.OwnerTableView.Name ==
"Level2"
)
//check with name of DetailTableView <br>
{
GridDataItem item = (GridDataItem)e.Item;
foreach
(GridDataItem childItem
in
item.ChildItem.NestedTableViews[0].Items)
{
string
value= childItem[
"PropCode"
].Text;
}
}
...
But I here - item.ChildItem.NestedTableViews[0].Items get error - Object reference not set to an instance of an object.
What I am doing wrong ?
<
telerik:RadScheduler
runat
=
"server"
ID
=
"RadScheduler1"
Width
=
"1000px"
SelectedDate
=
"01-01-2011"
TimeZoneOffset
=
"03:00:00"
DayStartTime
=
"08:00:00"
DayEndTime
=
"18:00:00"
StartEditingInAdvancedForm
=
"false"
DataKeyField
=
"ID"
DataSubjectField
=
"Subject"
DataStartField
=
"Start"
DataEndField
=
"End"
DataRecurrenceField
=
"RecurrenceRule"
OnFormCreating
=
"RadScheduler1_FormCreating"
DataRecurrenceParentKeyField
=
"RecurrenceParentID"
Skin
=
"WebBlue"
Culture
=
"it-IT"
FirstDayOfWeek
=
"Monday"
LastDayOfWeek
=
"Friday"
SelectedView
=
"WeekView"
OnAppointmentDelete
=
"RadScheduler1_OnAppointmentDelete"
AppointmentStyleMode
=
"Simple"
OnAppointmentDataBound
=
"RadScheduler1_AppointmentDataBound"
AllowDelete
=
"true"
OnClientAppointmentDeleting
=
"onAppointmentDeleting"
>
protected void RadScheduler1_OnAppointmentDelete(object sender, SchedulerCancelEventArgs e)
{
// I never go in this function
}
AllowDelete
=
"true"
function
GetRadComboBoxFromRadTreeViewElement(treeViewElement) {
var
htmlRoot = $(treeViewElement).closest(
'div.MyCustomControl'
); // walk up to control container
var
comboBoxDiv = $(htmlRoot).find(
'div.SearchableTreeCombo'
); // find ComboBox container
return
$find($(comboBoxDiv).attr(
'id'
)); // look up ComboBox object from containing div id
}
<
html
>
<
body
>
<
form
>
<
div
class
=
"rcbSlide"
>
<
div
id
=
"RadComboBox1_DropDown"
class
=
"RadComboBoxDropDown"
></
div
>
</
div
>
<
div
class
=
"MyCustomControl"
>
<
label
for
=
"RadComboBox1"
id
=
"treeListLabel"
>Field Label: </
label
>
<
div
id
=
"RadComboBox1"
class
=
"RadComboBox RadComboBox_Default SearchableTreeCombo"
>
<
input
id
=
"RadComboBox1_ClientState"
name
=
"RadComboBox1_ClientState"
type
=
"hidden"
>
</
div
>
</
div
>
</
form
>
</
body
>
</
html
>
<ConfirmTemplate>And I call my window from code behind like this:
<div class="rwDialogPopup radconfirm">
<div class="rwDialogText">
{1}
</div>
<div>
<a onclick="$find('{0}').close(true);" class="rwPopupButton" href="javascript:void(0);">
<span class="rwOuterSpan"><span class="rwInnerSpan">EWKA</span></span></a>
<a onclick="$find('{0}').close(false);" class="rwPopupButton" href="javascript:void(0);">
<span class="rwOuterSpan"><span class="rwInnerSpan">RECZNY</span></span></a>
</div>
</div>
</ConfirmTemplate>
ScriptManager.RegisterClientScriptBlock(Page, Me.GetType(), "NOSOURCE", "radconfirm('text for user?',confirmCallBackFnGoToHandMode)", True)Now the problem is that I need two different confirms on the same page one with 'EWKA' and 'RECZNY' and one with 'OK' and 'CANCEL' buttons