| if (e.CommandArgument.ToString() == "Edit") |
| { |
| UserControl userControl = (UserControl)e.Item.FindControl(GridEditFormItem.EditFormUserControlID); |
| RadTextBox txtOrderValue = userControl.FindControl("txtOrderValue") as RadTextBox; |
| RadTextBox txtCostOfSale = userControl.FindControl("txtCostOfSale") as RadTextBox; |
| RadComboBox ddlCurrency = userControl.FindControl("ddlCurrency") as RadComboBox; |
| RadComboBox ddlReason = userControl.FindControl("ddlForReason") as RadComboBox; |
| //Prepare new row to add it into DataSource |
| DataSet dsValidate = new DataSet(); |
| int userID = Convert.ToInt16(hidUserId.Value); |
| Convert.ToSingle(txtOrderValue.Text); |
| _Order.CostOfSale = Convert.ToSingle(txtCostOfSale.Text); |
| _Order.Creator = Convert.ToInt16(hidUserId.Value); |
| _Order.CurrencyCode = ddlCurrency.SelectedValue.ToString(); |
| _Order.Reason = ddlReason.SelectedValue.ToString(); |
<%
@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShipmentForwardingVendorCrews.aspx.cs"
Inherits="Graebel.RITS.Web.Relocations.ShipmentForwardingVendorCrews" %>
<%
@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%
@ Register Assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
Namespace="System.Web.UI.WebControls" TagPrefix="asp" %>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head runat="server">
<title>Shipment Forwarding Vendor Crews</title>
<link href="../Graebel.css" rel="stylesheet" />
</
head>
<
body>
<form id="ShipmentForwardingVendorCrews" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Panel ID="PageContent" runat="server">
<h1>
Shipment Forwarding Vendor Crews
</h1>
<br />
<asp:DropDownList ID="ddlODAgent" runat="server" OnSelectedIndexChanged="ddlODAgent_SelectedIndexChanged"
AutoPostBack="True">
</asp:DropDownList>
<br />
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
<telerik:RadListBox ID="rlbIsNotCrewLeads" runat="server" Width="200px" Height="200px"
SelectionMode="Single" AllowTransfer="True" TransferToID="rlbAssignCrewLeads" AutoPostBackOnReorder="True"
EnableDragAndDrop="True" DataSourceID="UnassignedCrewLeadsDataSource" DataKeyField="VendorCrewId"
DataTextField="FirstName" DataValueField="VendorCrewId" Skin="Telerik" BorderColor="Black"
BorderStyle="Solid" BorderWidth="2px">
</telerik:RadListBox>
<telerik:RadListBox ID="rlbAssignCrewLeads" runat="server"
DataSourceID="AssignedCrewLeads" DataKeyField="VendorCrewId" DataTextField="FirstName"
DataValueField="VendorCrewId" Skin="Telerik" AllowAutomaticUpdates="True" Width="200px" Height="200px"
BorderColor="Black" BorderStyle="Solid" BorderWidth="2px">
</telerik:RadListBox>
<br />
</telerik:RadAjaxPanel>
<asp:EntityDataSource ID="UnassignedCrewLeadsDataSource" runat="server" AutoGenerateWhereClause="True"
CommandText="SELECT value crew
FROM VendorCrew AS crew
WHERE NOT EXISTS(SELECT sfvc.VendorCrew.VendorCrewId
FROM ShipmentForwardingVendorCrew AS sfvc
WHERE sfvc.Shipments.ShipmentId = @ShipmentId)
AND crew.CompanyEntities.CompanyEntityId = @VendorId
AND crew.IsActive = true
AND crew.IsCrewLead = true"
ConnectionString="name=RITSNetEntities"
DefaultContainerName="RITSNetEntities" Include="ShipmentForwardingVendorCrew,CompanyEntities">
<CommandParameters>
<asp:QueryStringParameter Name="ShipmentId" QueryStringField="10" Type="Int32" />
<asp:ControlParameter ControlID="ddlODAgent" Name="VendorId" PropertyName="SelectedValue"
Type="Int32" />
</CommandParameters>
</asp:EntityDataSource>
<asp:EntityDataSource ID="AssignedCrewLeads" runat="server" ConnectionString="name=RITSNetEntities"
DefaultContainerName="RITSNetEntities" EnableDelete="True" EnableInsert="True"
EnableUpdate="True" Include="VendorCrew" AutoGenerateWhereClause="True" EntitySetName="ShipmentForwardingVendorCrew"
Where="">
<InsertParameters>
<asp:SessionParameter Name="shipmentId" SessionField="10" DbType="Int32" />
<asp:SessionParameter DbType="Boolean" Name="IsOriginServicesVendor" SessionField="IsOrigin" />
<asp:ControlParameter ControlID="rlbAssignCrewLeads" DefaultValue="true" Name="IsCrewLead"
PropertyName="SelectedValue" DbType="Boolean" />
</InsertParameters>
<UpdateParameters>
<asp:SessionParameter Name="shipmentId" SessionField="10" DbType="Int32" />
<asp:SessionParameter DbType="Boolean" Name="IsOriginServicesVendor" SessionField="IsOrigin" />
<asp:ControlParameter ControlID="rlbAssignCrewLeads" DefaultValue="true" Name="IsCrewLead"
PropertyName="SelectedValue" DbType="Boolean" />
</UpdateParameters>
<WhereParameters>
<asp:SessionParameter Name="shipmentId" SessionField="10" DbType="Int32" />
<asp:SessionParameter DbType="Boolean" Name="IsOriginServicesVendor" SessionField="IsOrigin" />
</WhereParameters>
</asp:EntityDataSource>
<%
--<asp:EntityDataSource ID="UnassignedCrewDataSource" runat="server" AutoGenerateWhereClause="True"
CommandText="SELECT value crew
FROM VendorCrew AS crew
WHERE NOT EXISTS(SELECT sfvc.VendorCrew.VendorCrewId
FROM ShipmentForwardingVendorCrew AS sfvc
WHERE sfvc.Shipments.ShipmentId = @ShipmentId)
AND crew.CompanyEntities.CompanyEntityId = @VendorId
AND crew.IsActive = true" ConnectionString="name=RITSNetEntities"
DefaultContainerName="RITSNetEntities" Include="ShipmentForwardingVendorCrew,CompanyEntities">
<CommandParameters>
<asp:QueryStringParameter Name="ShipmentId" QueryStringField="10" Type="Int32" />
<asp:ControlParameter ControlID="ddlODAgent" Name="VendorId" PropertyName="SelectedValue"
Type="Int32" />
</CommandParameters>
</asp:EntityDataSource>--
%>
<%
-- <asp:EntityDataSource ID="AssignedCrewDataSource" runat="server"
AutoGenerateWhereClause="True"
CommandText="SELECT value crew
FROM VendorCrew AS crew
WHERE EXISTS(SELECT sfvc.VendorCrew.VendorCrewId
FROM ShipmentForwardingVendorCrew AS sfvc
WHERE sfvc.Shipments.ShipmentId = @ShipmentId)
AND crew.CompanyEntities.CompanyEntityId = @VendorId
AND crew.IsActive = true"
ConnectionString="name=RITSNetEntities"
DefaultContainerName="RITSNetEntities"
Include="ShipmentForwardingVendorCrew,CompanyEntities">
<CommandParameters>
<asp:QueryStringParameter Name="ShipmentId" QueryStringField="10" Type="Int32" />
<asp:ControlParameter ControlID="ddlODAgent" Name="VendorId"
PropertyName="SelectedValue" Type="Int32" />
</CommandParameters>
</asp:EntityDataSource>--
%>
</asp:Panel>
</form>
</
body>
</
html>
| a.RadSplitter._preInitialize=function(b){a.RadSplitterController.getInstance()._addSplitter(b); |
| … |
| }},_ensureItemsOrder:function(g,t){this._fixItemsIndeces(g); |
| if(t){var o=this._splitters[g]; |
| var l=this._panes; |
| var q=o.panes; |
| var e=q?q.length:0; |
| var r=o.splitbars; |
| var p=r?r.length:0; |
| var c=e+p; |
| var f=[]; |
| for(var h=e-1; |
| h>=0; |
| h--){var d=q[h]; |
| f[f.length]=d; |
| var n=l[d]; |
| n.indexInPanes=e-1-n.indexInPanes; |
| n.index=(c-1-n.index); |
| n.isLastPane=false; |
| var j=n.prevSplitBarId; |
| n.prevSplitBarId=n.nextSplitBarId; |
| n.nextSplitBarId=j; |
| }o.panes=f; |
| var m=this._splitBars; //_splitBars is null, but _splitbars in not null |
| var k=[]; |
| for(var h=p-1; |
| h>=0; |
| h--){var s=r[h]; |
| k[k.length]=s; |
| var b=m[s]; //since m is null, m[s] is a problem |
| … |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td style="padding-right:10px;"> |
| Date of diagnosis for this condition? |
| </td> |
| <td> |
| <telerik:RadDatePicker ID="txtDiagnosisDate" runat="server" SelectedDate='<%# Bind("DiagnosisDate") %>'> |
| <DateInput ID="DateInput1" DateFormat="MMMM yyyy" runat="server"> |
| </DateInput> |
| <Calendar ID="Calendar1" runat="server"> |
| <FastNavigationSettings TodayButtonCaption="current date" /> |
| </Calendar> |
| </telerik:RadDatePicker> |
| </td> |
| </tr> |
| </table> |
Hello All,
We have a ASP.NET AJAX based application which uses Modal RadWindow Popups.
Same application will run in different organizations and some organizations have small resolution monitors.
First I would asked that if Popup Window is quite big in small resolution monitor ant Window's caption is now shown, how can I move Window with using mouse? Are there any key combinations which would move Modal RadWindow?
Second question is that have any of you made scalable Popup Windows? Can it be done using Telerik's RadWindow?
Thanks,
Michael

| catch (Exception ex) |
| { |
| changedRows[0].CancelEdit(); |
| Label lc = new Label(); |
| lc.Text="ERROR: "+ex.Message; |
| lc.ForeColor=Color.Red; |
| userControl.Controls.AddAt(0,lc); |
| e.Canceled=true; |
| e.Item.Edit = true; |
| } |
The problem: After this takes place, it seems that while the popup remains on the screen, the page has lost track of it. If I click my save button again then the updatecommand event is never called and the popup simply disappears. Other events defined in the user control also no longer take place.
It is probably something with radgrid not saving the usercontrol to viewstate. Any ideas how I can fix that?
-=-
On a somewhat related subject, while I'd very much like to find a solution to the above, I am also considering moving the editform to its own page. This is because when I double click on a row to open up the popup edit box with user control, radgrid implements that by a full postback that resends the whole grid (and page), this time including the popup right in the middle of the grid's generated html. The same thing takes place when I hit save or cancel in the edit popup. It has been suggested here that I should look at client-side databinding and editing but I'd like to avoid doing that. For now I see two options: 1) double-clicking on rows openup a new browser window with a new page or 2) I put my editform below the grid and load it and make it visible and jump to it when I double click on a row and put all of that in a radpanel so that this can be handled by an ajax request instead of a full post back.
Any thoughts on this and links to examples?
Regards,
Sylvain