Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
56 views
... now you don't.

I can't believe I am having this problem. I can make the rad window appear via a client side call to open it, but after postback the very same javascript will not open it.

I have created a small test project  to demonstrate the issue. I don't mind if this my own dumb fault, I just need to know why this is happening. :)

The form has a RadWindow inside a RadWindowManager and two buttons.

The first button is a regular html input type button that's 'onclick' calls the showWindow()  JS function.

The 2nd button is an asp:Button that on click postback to its own event handler. This method simply sets a value on the textbox that is in the window, then it registers some javascript that will call the ShowWindow function. It is on this 2nd call the ShowWindow fails to find the Window.

Here is the relevant part of the aspx code.

<head>
    <title>Now you see it...</title>
</head>
<body>
    <form id="form1" runat="server">
      
    <script type="text/javascript" language="javascript">
 
            function showWindow() {
                var win = $find("<%= RadWindow1.ClientID %>");
                alert(win); // Is NULL after post back
                win.show();
                win.center();
            }
 
    </script>  
 
    
   <asp:ScriptManager ID="ScriptManager1" runat="server">
   </asp:ScriptManager>
               
               <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
                <Windows>
                    <telerik:RadWindow ID="RadWindow1" runat="server">
                        <ContentTemplate>
                            <asp:TextBox ID="tbTest" runat="server" />
                        </ContentTemplate>
                    </telerik:RadWindow>
                </Windows>
            </telerik:RadWindowManager>
    
    
           <input type="button" onclick="showWindow()" value="Client Side" />
                 
           <asp:Button ID="btnShowWindow"  runat="server" OnClick="btnShowWindow_Click" Text="Postback"/>
          
    </form>
</body>
</html>

The button event btnShowWindow_Click looks like this.

protected void btnShowWindow_Click(object sender, EventArgs e)
{
    tbTest.Text = "The window will not appear";
    string jScript = "showWindow();";
    ScriptManager.RegisterStartupScript(Page, Page.GetType(), "", jScript, true);
}

showWindow gets called just fine. However this time  does not work as the window is not found. (the Alert shows NULL)

This has to be simple. What am I missing here?


Brad
Top achievements
Rank 1
 answered on 25 Jul 2011
1 answer
1.4K+ views
How to remove the Alternative Row color in RadGrid?.

I have used the following two properties

ItemStyle-BackColor

 

="White" AlternatingItemStyle-BackColor="White"

 


When I use the above property the grid visibility having some patches. The attached image having the sample.

Princy
Top achievements
Rank 2
 answered on 25 Jul 2011
0 answers
62 views
Hi,
 I am new for this product. I have sharepoint 2007 and vs 2008. i would like to use RADGRID to display multiple sharepoint list with add and edit feature and also want to use master child feature. i would like to make custom web part only in C#. So can you please help me to create this web part.  I am looking for any example in C# so i can start.


Thank You So much in advance !!!
Dipesh
Top achievements
Rank 1
 asked on 25 Jul 2011
23 answers
330 views
I am using RADcontrols for ASP.NET version 2008.2.804.20

The documentation at http://www.telerik.com/help/aspnet-ajax/onpopupshowing.html has the following example:

ascx/aspx

<ClientEvents OnPopUpShowing ="PopUpShowing" />

JavaScript

   <script type="text/javascript">
        function PopUpShowing(sender, eventArgs)
        {
                var  popUp = eventArgs.get_popUp();
        }

        or

        function PopUpShowing(sender, eventArgs)
        {
               eventArgs.set_cancel(true);
        }

  </script>

Which by the way does not work for my version of the controls.

I figured out I need to change

 <ClientEvents OnPopUpShowing ="PopUpShowing" />
  to
<ClientSettings  ClientEvents-OnPopUpShowing="PopUpShowing()" >

My javascript function that is called when the popup shows is

     function PopUpShowing(sender, eventArgs) {
         $('.GridEditForm_Custom').height($('#AnswerOptionsGrid').height() + 230);
     }

which uses jQuery to change the height of the grid edit form based on the height of a sub grid on the form.

The height does get adjusted, however a "sys.InvalidOperationException: handler must be a function" error is also thrown.

If I replace the $('.GridEditForm_Custom').height($('#AnswerOptionsGrid').height() + 230);
with a simple alert('test'); the same error is produced.

Any help will be appreciated,

Keith E.


cory
Top achievements
Rank 1
 answered on 25 Jul 2011
5 answers
110 views
Hi,

this is my scenario

i use radrotator to make an image gallery like this one on your demo
http://demos.telerik.com/aspnet-ajax/rotator/examples/gallery/defaultcs.aspx

in the thumbnail in the bottom, i add radtooltips for some action like delete the photo

when i pass over the photo, the tooltip show and if i click on the linkbutton (delete this photo) i want to show a radconfirm dialog (do you realy want to delete this photo ?)

if yes then i delete the photo.

all of this is working good but the rotator not refresh. i try databind and its not working

i put un refresh button in that page but not ajaxified, the only thing this button do is in the code behin, rotator.databind.

how can i refresh the rotator like the refresh button ?

thanks !

Eric
Sergei
Top achievements
Rank 1
 answered on 25 Jul 2011
3 answers
86 views
Hi,

I'm relatively new to RadControls, and have a couple of questions about using DetailTables inside RadGrid.

1. My detail GridTableView has a delete button that uses the Delete Command, and that works fine, but I want another detail grid on the page to be updated (via ajax) when that happens. I added the master RadGrid as a control to initiate an update, and the other grid as the AjaxUpdatedControl, but deleting a detail record does not seem to cause an update in the other detail table. Do I need to do something else to achieve this?

1a. I acheved the result I want using a nested RadGrid in an edit form on the master, and trapping the OnItemDeleted event, but that seems like the long way round, and the UI is more cumbersome, I'd really rather use the DetailTables if I can.

Thanks for any help,

ROSCO
Lucania
Top achievements
Rank 1
 answered on 25 Jul 2011
11 answers
311 views
Is it possible to enable horizontal scrolling of the RadScheduler in TimelineView. For example, I would like to setup the TimelineView with 24 slots each with a 1 hour duration and then be able to set the width property on the RadScheduler such that the first 10 hours appear and the user would need to scroll to see the remaining 14 hours in the day.

I tried to put the RadScheduler inside of a parent div with a specified width (900px) and set the width of the RadScheduler wider (1400px) , but the Timeline table was not contained within the parent div. Is it possible to do this?

Thanks.
Peter
Telerik team
 answered on 24 Jul 2011
3 answers
136 views
Is there anything in the works to add an Agenda View to the Scheduler control?  My definition of an Agenda View is essentially a datagrid of entries by date & time.  It would be very similar to the calendar display that is available in Outlook when you go to your Outlook Today view.

In addition to an actual agenda view, is there anyway to display the scheduler data in a relational format (i.e. the ability to see the top level appointments and when an entry is recurring, a plus sign shows up that the user could click to display all the recurring entries below it.)?

Thanks,
Josh

Peter
Telerik team
 answered on 24 Jul 2011
3 answers
113 views
Hi,

In page, Appointments are dispayed in radcheduler control and It's working correctly when I am changing moth view to week view and binding appointments then it is also working fine. But when changing the view multiple time then after page load appoinments not getting dispalyed but when on mouse over on particular date then it is getting displayed.The issue is coming in IE browser only.

Code sample:
<telerik:RadScriptManager runat="Server" ID="objScriptManager" AsyncPostBackTimeout="600">
        <Scripts>
            <asp:ScriptReference Path="../common/js/BusyBox.js" />
        </Scripts>
    </telerik:RadScriptManager>
 <telerik:RadAjaxManager runat="Server" ID="RadAjaxManager1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnCalendarDateChanged">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadCalendar2" />
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                    <telerik:AjaxUpdatedControl ControlID="pnlList" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                    <telerik:AjaxUpdatedControl ControlID="imgNewActivity" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadCalendar1" />
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                    <telerik:AjaxUpdatedControl ControlID="imgNewActivity" />
                    <telerik:AjaxUpdatedControl ControlID="pnlPaging" />
                    <telerik:AjaxUpdatedControl ControlID="btnDayView" />
                    <telerik:AjaxUpdatedControl ControlID="btnWeekView" />
                    <telerik:AjaxUpdatedControl ControlID="btnMonthView" />
                    <telerik:AjaxUpdatedControl ControlID="btnListView" />
                    <telerik:AjaxUpdatedControl ControlID="lnkGroupBy" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="PanelBar">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="pnlList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnDayView">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="pnlPaging" />
                    <telerik:AjaxUpdatedControl ControlID="pnlList" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                    <telerik:AjaxUpdatedControl ControlID="btnWeekView" />
                    <telerik:AjaxUpdatedControl ControlID="btnMonthView" />
                    <telerik:AjaxUpdatedControl ControlID="btnListView" />
                    <telerik:AjaxUpdatedControl ControlID="lnkGroupBy" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnWeekView">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="pnlPaging" />
                    <telerik:AjaxUpdatedControl ControlID="pnlList" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                    <telerik:AjaxUpdatedControl ControlID="btnDayView" />
                    <telerik:AjaxUpdatedControl ControlID="btnMonthView" />
                    <telerik:AjaxUpdatedControl ControlID="btnListView" />
                    <telerik:AjaxUpdatedControl ControlID="lnkGroupBy" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnMonthView">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="pnlPaging" />
                    <telerik:AjaxUpdatedControl ControlID="pnlList" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                    <telerik:AjaxUpdatedControl ControlID="btnDayView" />
                    <telerik:AjaxUpdatedControl ControlID="btnWeekView" />
                    <telerik:AjaxUpdatedControl ControlID="btnListView" />
                    <telerik:AjaxUpdatedControl ControlID="lnkGroupBy" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnListView">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="pnlPaging" />
                    <telerik:AjaxUpdatedControl ControlID="pnlList" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                    <telerik:AjaxUpdatedControl ControlID="btnDayView" />
                    <telerik:AjaxUpdatedControl ControlID="btnWeekView" />
                    <telerik:AjaxUpdatedControl ControlID="btnMonthView" />
                    <telerik:AjaxUpdatedControl ControlID="lnkGroupBy" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="lnkGroupBy">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="pnlPaging" />
                    <telerik:AjaxUpdatedControl ControlID="pnlList" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                    <telerik:AjaxUpdatedControl ControlID="lnkGroupBy" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="chkActivites">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rtvResource" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="pnlPaging" />
                    <telerik:AjaxUpdatedControl ControlID="lnkGroupBy" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rtvResource">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rtvResource" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="pnlPaging" />
                    <telerik:AjaxUpdatedControl ControlID="lnkGroupBy" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rtvLocation">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rtvLocation" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rtvCategory">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rtvCategory" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="radtooltipmgr">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlScheduler" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="RadTaskToolTipMgr">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlTasksList" />
                    <telerik:AjaxUpdatedControl ControlID="RadTaskToolTipMgr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="pnlPaging">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlPaging" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ddMonth">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadCalendar1" />
                    <telerik:AjaxUpdatedControl ControlID="btnTodayDate" />
                    <telerik:AjaxUpdatedControl ControlID="imgNewActivity" />
                    <telerik:AjaxUpdatedControl ControlID="pnlList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ddyear">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadCalendar1" />
                    <telerik:AjaxUpdatedControl ControlID="btnTodayDate" />
                    <telerik:AjaxUpdatedControl ControlID="imgNewActivity" />
                    <telerik:AjaxUpdatedControl ControlID="pnlList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnTodayDate">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadCalendar1" />
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                    <telerik:AjaxUpdatedControl ControlID="ddyear" />
                    <telerik:AjaxUpdatedControl ControlID="ddMonth" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                    <telerik:AjaxUpdatedControl ControlID="imgNewActivity" />
                    <telerik:AjaxUpdatedControl ControlID="pnlList" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="lnkbtnPrevPage">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="lnkbtnNextPage">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rgTasks">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgTasks" />
                    <telerik:AjaxUpdatedControl ControlID="RadTaskToolTipMgr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnRefreshView">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadCalendar1" />
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                    <telerik:AjaxUpdatedControl ControlID="pnlList" />
                    <telerik:AjaxUpdatedControl ControlID="ddMonth" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnCancelActivity">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnDeleteActivity">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadScheduler1" />
                    <telerik:AjaxUpdatedControl ControlID="radtooltipmgr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnDeleteTask">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgTasks" />
                    <telerik:AjaxUpdatedControl ControlID="RadTaskToolTipMgr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnCompleteTask">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgTasks" />
                    <telerik:AjaxUpdatedControl ControlID="RadTaskToolTipMgr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnRefreshTaskList">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgTasks" />
                    <telerik:AjaxUpdatedControl ControlID="RadTaskToolTipMgr" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
   
    <div id="main">
        <div id="Content">
            <table cellspacing="0" id="MainTable" cellpadding="0" border="0" width="100%">
                <tr>
                    <td class="MainPanel" valign="top" style="width: 100%;">
                        <div style="width: 100%; " id="divRadSplitter">
                               Unwated code has been removed
                                <telerik:RadSplitBar runat="server" ID="RadSplitBar2" CollapseMode="Both" />
                                <telerik:RadPane runat="Server" ID="rightPane" Scrolling="both">
                                    <table cellpadding="5" cellspacing="0" border="0" width="100%">
                                        <tr style="height: 25px;">
                                            <td align="center" style="width: 75%; height: 25px; padding: 0px 5px 0px 5px;">
                                                <table cellspacing="3" cellpadding="0" id="tblButtons1" border="0">
                                                    <tr>
                                                        <td>
                                                            <asp:ImageButton ID="btnDayView" runat="server" AlternateText="Day" ImageUrl="../images/button_day_view_Off.gif" />
                                                        </td>
                                                        <td>
                                                            <asp:ImageButton ID="btnWeekView" runat="server" AlternateText="Week" ImageUrl="../images/button_week_view_Off.gif" />
                                                        </td>
                                                        <td>
                                                            <asp:ImageButton ID="btnMonthView" runat="server" AlternateText="Month" ImageUrl="../images/button_month_view_Off.gif" />
                                                        </td>
                                                        <td>
                                                            <asp:ImageButton ID="btnListView" runat="server" AlternateText="List" ImageUrl="../images/button_list_view_Off.gif" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td align="right" style="height: 25px; padding: 0px 5px 0px 5px;">
                                                <!-- added for allignment of all icons - new activity has a div wrapped around it by radajax -->
                                                <table cellspacing="3" cellpadding="0" border="0" id="tblButtons2">
                                                    <tr valign="top">
                                                        <td>
                                                            <asp:ImageButton ID="imgNewActivity" runat="server" AlternateText="New Activity"
                                                                ImageUrl="~/images/New_Activity_Icon.png" />
                                                        </td>
                                                        <td>
                                                            <asp:ImageButton ID="imgPrint" runat="server" AlternateText="Print" ImageUrl="~/images/Printer_Icon.png" />
                                                            <asp:ImageButton ID="imgSynchronize" runat="server" AlternateText="Export" ImageUrl="~/images/Sync_to_Outlook_Icon.png" />
                                                            <asp:ImageButton ID="imgHelp" runat="server" AlternateText="Help" ImageUrl="~/images/Question-Mark_Icon.png" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                        <tr valign="top">
                                            <td colspan="2" style="vertical-align: top; padding-top: 0px;">
                                                <telerik:RadContextMenu runat="server" ID="TaskContextMenu" OnClientItemClicked="contextTaskClicked">
                                                </telerik:RadContextMenu>
                                                <input type="hidden" id="radTaskClickedRowIndex" name="radTaskClickedRowIndex" />
                                                <telerik:RadContextMenu runat="server" ID="SchedulerAppointmentContextMenu" OnClientItemClicked="contextAppointmentsClicked">
                                                </telerik:RadContextMenu>
                                                <telerik:RadContextMenu runat="server" ID="SchedulerTimeSlotContextMenu" OnClientItemClicked="timeslotClicked">
                                                </telerik:RadContextMenu>
                                                <div id="dvMMSCalendar">
                                                    <asp:Panel ID="pnlList" runat="server">
                                                        <uc:ListView ID="ucListView" runat="server" />
                                                    </asp:Panel>
                                                    <asp:UpdatePanel ID="pnlScheduler" runat="server" UpdateMode="Conditional">
                                                        <ContentTemplate>
                                                            <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                                                <tr>
                                                                    <td style="text-align: right; vertical-align: middle;" class="NewPlainText">
                                                                        <asp:LinkButton runat="server" ID="lnkGroupBy" Text="Group by Date" />
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                            <%--Removed TimeZoneOffset="00:00:00" from below --%>
                                                            <telerik:RadScheduler runat="server" EnableViewState="false" ID="RadScheduler1" ShowFullTime="true"
                                                                Width="100%" AllowEdit="false" OverflowBehavior="Expand" ShowViewTabs="false"
                                                                ShowNavigationPane="true" EnableRecurrenceSupport="true" OnClientAppointmentContextMenu="appointmentContextMenu"
                                                                DataSubjectField="Subject" OnClientTimeSlotContextMenu="timeSlotContextMenu"
                                                                EnableEmbeddedSkins="true" OnClientAppointmentClick="ShowToolTipForCalendar"
                                                                OnClientAppointmentDoubleClick="OnClientAppointmentDoubleClick" DisplayDeleteConfirmation="false"
                                                                MonthView-VisibleAppointmentsPerDay="5" AllowDelete="false" AllowInsert="false"
                                                                NumberOfHoveredRows="1">
                                                                <TimelineView UserSelectable="true" />
                                                                <AppointmentTemplate>
                                                                    <%--2010.12.27 Scott Marshall: The RadScheduler control does not report back the proper Start time due to the offset being used.  To overcome this we'll
                                                                     use our own custom attribute to reflect the start time.--%>
                                                                    <p title="<%#Eval("subject")%>">
                                                                        <%#Eval("subject") & " " & CType(Eval("attributes('start_timezone_adjusted')"), Date).ToShortTimeString%></p>
                                                                </AppointmentTemplate>
                                                            </telerik:RadScheduler>
                                                            <input type="hidden" id="hdnSchedulerRefresh" runat="server" name="hdnSchedulerRefresh"
                                                                value="0" />
                                                            <asp:Panel ID="pnlPaging" runat="Server">
                                                                <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                                                    <tr>
                                                                        <td style="text-align: left; vertical-align: middle;" class="NewPlainText">
                                                                            <asp:Label runat="server" ID="lblPagingStatus" />
                                                                        </td>
                                                                        <td style="text-align: right; vertical-align: middle;" class="NewPlainText">
                                                                            <asp:LinkButton runat="server" ID="lnkbtnPrevPage" Text="<< Previous" />&nbsp;&nbsp;&nbsp;
                                                                            <asp:LinkButton runat="server" ID="lnkbtnNextPage" Text="Next >>" />
                                                                        </td>
                                                                    </tr>
                                                                </table>
                                                            </asp:Panel>
                                                        </ContentTemplate>
                                                    </asp:UpdatePanel>
                                                </div>
                                                <%-- <telerik:RadToolTipManager runat="server" ID="radtooltipmgr" Width="280" Height="80" Animation="None" HideEvent="LeaveToolTip"
                                              Text="Loading..." ShowEvent="OnClick"  ShowCallout="false" OnClientBeforeShow="ToolTipBeforeShow" OnClientResponseEnd="ToolTipHide"  />--%>
                                                <telerik:RadToolTipManager ID="RadToolTipManager1" Width="280" Height="80" ShowEvent="OnClick"
                                                    ShowCallout="false" Position="BottomCenter" RelativeTo="Element" HideEvent="LeaveToolTip"
                                                    Animation="None" runat="server" Text="Loading...">
                                                </telerik:RadToolTipManager>
                                                <%--<telerik:RadToolTipManager runat="server" ID="RadTaskToolTipMgr" Width="280" Height="80" OnClientBeforeShow="TaskToolTipBeforeShow" OnClientResponseEnd="ToolTipHide"
                                            Animation="None" HideEvent="LeaveToolTip"  Text="Loading..." ShowEvent="OnClick" ShowCallout="false" />--%>
                                                <telerik:RadToolTipManager runat="server" ID="RadTaskToolTipMgr" Width="280" Height="80"
                                                    Position="BottomCenter" RelativeTo="Element" Animation="None" HideEvent="LeaveToolTip"
                                                    Text="Loading..." ShowCallout="false" ShowEvent="OnClick" />
                                            </td>
                                        </tr>
                                    </table>
                                </telerik:RadPane>
                            </telerik:RadSplitter>

   Unwated code has been removed
Peter
Telerik team
 answered on 24 Jul 2011
2 answers
88 views
I currently have a radGrid which opens an asp FormView in the NestedViewTemplate like so:

<NestedViewTemplate>
         <asp:Label ID="CurrentUser" runat="server" Text='<%# Bind("user_id") %>' Visible="false"></asp:Label>
        <asp:SqlDataSource ID="sqlds_SelectedUser" runat="server"
            ConnectionString="<%$ ConnectionStrings:M_ConnectionString %>"
            SelectCommand="SELECT * FROM [d_users] WHERE ([user_id] = @user_id)">
            <SelectParameters>
                <asp:ControlParameter Name="user_id" Type="Int32" ControlID="CurrentUser" PropertyName="Text" />
            </SelectParameters>
        </asp:SqlDataSource>
            <asp:FormView ID="form_DUser" runat="server" DataKeyNames="user_id"
                DataSourceID="sqlds_SelectedUser" Width="100%">
....

This is perfect for viewing and editing the record, however, how do I open the FormView in InsertMode when a user clicks the Grid's command item "Add New Record" link?

I want the grids add new record command to display the form that is in the NestedViewTemplate, and change its mode to form_DUser.ChangeMode(FormViewMode.Insert)

Is this possible?
Alon
Top achievements
Rank 1
 answered on 24 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?