Hi, I have a page (SiteScheduler.aspx) with a RadGrid and a RadScheduler on it and I followed the online examples of how to drag and drop rows from the RadGrid to the RadScheduler - and it works perfectly. I wired up a RadWindow to open from a ContextMenu - and the RadWindow, which is modal and appears over SiteScheduler.aspx, allows the user to change the assigned staff person to the appointment in the scheduler. Here again, that functionality works great. My staff person reassignment correction is made. When the RadWindow closes, it executes document.location.reload() to refresh SiteScheduler.aspx.
My problem I ran into yesterday and still today is that if I had dragged a row from the RadGrid to the Scheduler prior to right clicking and open the RadWindow to reassign the staff person, the RadGrid1_RowDrop event is executed again on the document.location.reload() (or F5 for that matter). This causes an incorrectly scheduled staff person. It's like the RowDrop is still 'remembering' the prior drop action and even the same row that was dragged before to the RadWindow opening.
If I do not drag a row from the grid to the scheduler before right clicking to open the RadWindow to reassign the staff person, the RadGrid1_RowDrop event is not executed and it works as required.
Here are a couple of things I tried:
1. Thought it might be cache related so I turned off client side caching by placing this in Page_load
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now);
Response.Cache.SetNoServerCaching();
Response.Cache.SetNoStore();
2. Because of the way the page works , I had to set EnableAJAX="False" in the RadAjaxManager. I would love to be able refresh just the scheduler but don't know how to do this with EnableAJAX="False" being set.
3. I tried to simulate the click event of a button that refreshes and rebinds the scheduler however the button does not exist in the RadWindow close event (as the form's controls are not present yet) so it does not work.
Is there something I am missing or do you have any suggestions? Is there a way to 'Cancel' or dispose of the prior RadGrid RowDrop event once it is complete so it is not executed again?
Here is my RadGrid definition if it helps:
<telerik:RadGrid runat="server" ID="RadGrid1" Skin="Metro" Style="border: none; outline: 0;"
AllowAutomaticInserts="True" AllowAutomaticUpdates="True" Height="800px"
AllowAutomaticDeletes="True" MasterTableView-DataKeyNames="StaffId" OnItemCommand="RadGrid1_ItemCommand"
OnItemCreated="RadGrid1_ItemCreated" OnRowDrop="RadGrid1_RowDrop" OnRowDropped="RadGrid1_RowDropped" AutoGenerateColumns="False" PageSize="30" RenderMode="Lightweight" Width="100%"
RetainExpandStateOnRebind="True" ClientSettings-AllowAutoScrollOnDragDrop="False">
<ClientSettings AllowRowsDragDrop="True">
<Selecting AllowRowSelect="True"></Selecting>
<ClientEvents OnRowDropping="rowDropping" OnRowDblClick="onRowDoubleClick"></ClientEvents>
<Scrolling AllowScroll="True" ScrollHeight="800px" UseStaticHeaders="True" />
</ClientSettings>
<MasterTableView DataKeyNames="StaffId" RetainExpandStateOnRebind="True">
<RowIndicatorColumn Visible="False">
</RowIndicatorColumn>
<Columns>
<telerik:GridBoundColumn DataField="StaffFullName" FilterControlAltText="Filter colStaffname column" Groupable="False" HeaderText="Staff Name" ReadOnly="True" Reorderable="False" UniqueName="colStaffname" HeaderTooltip="skdj">
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<FilterMenu RenderMode="Lightweight"></FilterMenu>
<HeaderContextMenu RenderMode="Lightweight"></HeaderContextMenu>
</telerik:RadGrid>
Thanks for any help you can provide.
Shawn