Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
87 views
I have a grid with a master - detail relationship;
     Master is company information    
     Detail is facility Information

I can edit the Company informaiton in a popup form and I can edit Plant information in a popup form, except when there are multiple detail records.

When there are multiple detail records the edit command may or may not fire. It is sporadic and I cannont find the reason why.
I have included 2 images; The first iamge both edit buttons work flawless, the second image the 'edit comapnay' button works fine but neither 'edit plant' buttons fire the itemcommand event.

Here is my code: (no Code behind used)
 
<form id="form1" runat="server">
 <telerik:RadScriptManager ID="RadScriptManager1" runat="server" CdnSettings-TelerikCdn="Enabled">
   <Scripts>
     <%--Needed for JavaScript IntelliSense in VS2010--%>
     <%--For VS2008 replace RadScriptManager with ScriptManager--%>
     <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
     <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
     <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
   </Scripts>
 </telerik:RadScriptManager>
 <script type="text/javascript">
   var popUp;
   function PopUpShowing(sender, eventArgs) {
     popUp = eventArgs.get_popUp();
     var gridWidth = sender.get_element().offsetWidth;
     var gridHeight = sender.get_element().offsetHeight;
     var popUpWidth = popUp.style.width.substr(0, popUp.style.width.indexOf("px"));
     var popUpHeight = popUp.style.height.substr(0, popUp.style.height.indexOf("px"));
     popUp.style.left = ((gridWidth - popUpWidth) / 2 + sender.get_element().offsetLeft).toString() + "px";
   }
 
 </script>
  
 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
   <AjaxSettings>
     <telerik:AjaxSetting AjaxControlID="Panel1">
       <UpdatedControls>
         <telerik:AjaxUpdatedControl ControlID="Panel1" />
       </UpdatedControls>
     </telerik:AjaxSetting>
   </AjaxSettings>
 </telerik:RadAjaxManager>
 <div>
   <br />
   Not dolled up yet to fit into the site but here is the preliminary edit form for
   companies to update thier information.<br />
   <a href="Default.aspx">Select another company</a>
   <br />
   <span class="style1"><strong>CAUTION: This data is LIVE!! </strong></span>
   <asp:Panel ID="Panel1" runat="server">
     <p id="divMsgs" runat="server">
       <asp:Label ID="Label1" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#FF8080"></asp:Label>
       <asp:Label ID="Label2" runat="server" EnableViewState="False" Font-Bold="True" ForeColor="#00C000"></asp:Label>
     </p>
     <telerik:RadGrid ID="RadGrid1" runat="server" AllowAutomaticUpdates="True" AutoGenerateColumns="False"
       CellSpacing="0" DataSourceID="SqlDataSource1" GridLines="None" Skin="Vista" Culture="en-ZW"
       EnableEmbeddedBaseStylesheet="False" EnableTheming="False" BorderStyle="None">
       <MasterTableView DataKeyNames="CompanyID" DataSourceID="SqlDataSource1" CommandItemDisplay="None"
         AllowAutomaticUpdates="true" ShowHeader="False" HierarchyDefaultExpanded="true"
         EditMode="PopUp">
         <DetailTables>
           <telerik:GridTableView runat="server" DataKeyNames="FacilityID" DataSourceID="SqlDataSource2"
             ShowHeader="False" AllowAutomaticUpdates="true" EditMode="PopUp">
             <ParentTableRelation>
               <telerik:GridRelationFields DetailKeyField="CompanyID" MasterKeyField="CompanyID" />
             </ParentTableRelation>
             <Columns>
               <telerik:GridBoundColumn DataField="FacilityID" DataType="System.Int32" ReadOnly="True"
                 UniqueName="FacilityID" Visible="false">
               </telerik:GridBoundColumn>
               <telerik:GridTemplateColumn UniqueName="TemplateColumn">
                 <ItemTemplate>
                   <div id="content" class="divTable">
                     <div id="divHeader" class="divHeaderTable">
                       Facility information for
                       <asp:Label ID="Name" runat="server" Text=' <%# Eval("FacilityName") %>'></asp:Label>
                     </div>
                     <div class="divRow">
                       <div class="divColumn" style="text-align: left; width: 300px;">
                         <div>
                           <asp:Label ID="Address1" runat="server" Text='<%# Eval("Address") %>'></asp:Label><br />
                           <asp:Label ID="Label5" runat="server" Text='<%# Eval("City") %>'></asp:Label>, 
                           <asp:Label ID="Label6" runat="server" Text='<%# Eval("State") %>'></asp:Label
                           <asp:Label ID="Label7" runat="server" Text='<%# Eval("Zip") %>'></asp:Label><br />
                           <strong>PH:</strong>
                           <asp:Label ID="Label15" runat="server" Text='<%# Eval("Phone") %>'></asp:Label><br />
                           <asp:Label ID="Label17" runat="server" Text='<%# Eval("Website") %>'></asp:Label><br />
                           <br />
                           <br />
                           <telerik:RadButton ID="RadButton2d" runat="server" Text="Edit this plant's Information"
                             CommandName="Edit">
                           </telerik:RadButton>
                         </div>
                       </div>
                       <div class="divColumn" style="text-align: left; width: 400px;">
                         <div>
                           <strong>Contact: </strong>
                           <asp:Label ID="Label16" runat="server" Text='<%# Eval("Contact_First") %>'></asp:Label
                           <asp:Label ID="Label30" runat="server" Text='<%# Eval("Contact_Last") %>'></asp:Label><br />
                           <strong>Contact Email: </strong><asp:Label ID="Label18" runat="server" Text='<%# Eval("Email") %>'></asp:Label><br />
                           <strong>Capacity: </strong><asp:Label ID="Label31" runat="server" Text='<%# Format(Eval("NamePlateCapacity"),"##,###,###,###") %>'></asp:Label>
                           <asp:Label ID="Label33" runat="server" Text='<%# IIF(eval("CapacityInfoPublic"),"(Capacity info is Public)","(Capacity info is not Public)") %>'></asp:Label><br />
                           <strong>Feedstock</strong> <asp:Label ID="Label32" runat="server" Text='<%#Eval("Feedstock") %>'>
                           </asp:Label>
                           <asp:Label ID="Label3a4" runat="server" Text='<%# IIF(eval("CapacityInfoPublic"),"(Feedstock info is Public)","(Feedstock info is not Public)") %>'></asp:Label>
                           <br />
                           <br />
                         </div>
                       </div>
                     </div>
                   </div>
                   </div>
                 </ItemTemplate>
               </telerik:GridTemplateColumn>
             </Columns>
             <EditFormSettings EditFormType="Template" FormTableStyle-Width="400px">
               <EditColumn FilterControlAltText="Filter EditCommandColumn column">
               </EditColumn>
               <FormTableStyle Width="400px" />
               <FormTemplate>
                 <div id="content" class="divTable">
                   <div id="divHeader" class="divHeaderTable">
                     <asp:Label ID="lblName" runat="server" Text='<%# Bind("FacilityName") %>'></asp:Label>
                   </div>
                   <div class="divRow">
                     <div class="divColumn" style="text-align: left; width: 400px;">
                       <div>
                         Address:<br />
                         <telerik:RadTextBox ID="RadTextBox1" runat="server" Text='<%# Bind("Address") %>'
                           Width=" 225px">
                         </telerik:RadTextBox>
                         <br />
                         City:<br />
                         <telerik:RadTextBox ID="RadTextBox4" runat="server" Text='<%# Bind("City") %>' Width=" 225px">
                         </telerik:RadTextBox>
                         <br />
                         State:<br />
                         <telerik:RadComboBox ID="State" runat="server" SelectedValue='<%# bind("State") %>'
                           Skin="Windows7">
                           <Items>
                             <telerik:RadComboBoxItem runat="server" Text="Alabama" Value="AL" />
                             <telerik:RadComboBoxItem runat="server" Text="Alaska" Value="AK" />
                             <telerik:RadComboBoxItem runat="server" Text="Arizona" Value="AZ" />
                             <telerik:RadComboBoxItem runat="server" Text="Arkansas" Value="AR" />
                             <telerik:RadComboBoxItem runat="server" Text="California" Value="CA" />
                             <telerik:RadComboBoxItem runat="server" Text="Colorado" Value="CO" />
                             <telerik:RadComboBoxItem runat="server" Text="Connecticut" Value="CT" />
                             <telerik:RadComboBoxItem runat="server" Text="District of Columbia" Value="DC" />
                             <telerik:RadComboBoxItem runat="server" Text="Delaware" Value="DE" />
                             <telerik:RadComboBoxItem runat="server" Text="Florida" Value="FL" />
                             <telerik:RadComboBoxItem runat="server" Text="Georgia" Value="GA" />
                             <telerik:RadComboBoxItem runat="server" Text="Hawaii" Value="HI" />
                             <telerik:RadComboBoxItem runat="server" Text="Idaho" Value="ID" />
                             <telerik:RadComboBoxItem runat="server" Text="Illinois" Value="IL" />
                             <telerik:RadComboBoxItem runat="server" Text="Indiana" Value="IN" />
                             <telerik:RadComboBoxItem runat="server" Text="Iowa" Value="IA" />
                             <telerik:RadComboBoxItem runat="server" Text="Kansas" Value="KS" />
                             <telerik:RadComboBoxItem runat="server" Text="Kentucky" Value="KY" />
                             <telerik:RadComboBoxItem runat="server" Text="Louisiana" Value="LA" />
                             <telerik:RadComboBoxItem runat="server" Text="Maine" Value="ME" />
                             <telerik:RadComboBoxItem runat="server" Text="Maryland" Value="MD" />
                             <telerik:RadComboBoxItem runat="server" Text="Massachusetts" Value="MA" />
                             <telerik:RadComboBoxItem runat="server" Text="Michigan" Value="MI" />
                             <telerik:RadComboBoxItem runat="server" Text="Minnesota" Value="MN" />
                             <telerik:RadComboBoxItem runat="server" Text="Mississippi" Value="MS" />
                             <telerik:RadComboBoxItem runat="server" Text="Missouri" Value="MO" />
                             <telerik:RadComboBoxItem runat="server" Text="Montana" Value="MT" />
                             <telerik:RadComboBoxItem runat="server" Text="Nebraska" Value="NE" />
                             <telerik:RadComboBoxItem runat="server" Text="Nevada" Value="NV" />
                             <telerik:RadComboBoxItem runat="server" Text="New Hampshire" Value="NH" />
                             <telerik:RadComboBoxItem runat="server" Text="New Jersey" Value="NJ" />
                             <telerik:RadComboBoxItem runat="server" Text="New Mexico" Value="NM" />
                             <telerik:RadComboBoxItem runat="server" Text="New York" Value="NY" />
                             <telerik:RadComboBoxItem runat="server" Text="North Carolina" Value="NC" />
                             <telerik:RadComboBoxItem runat="server" Text="North Dakota" Value="ND" />
                             <telerik:RadComboBoxItem runat="server" Text="Ohio" Value="OH" />
                             <telerik:RadComboBoxItem runat="server" Text="Oklahoma" Value="OK" />
                             <telerik:RadComboBoxItem runat="server" Text="Oregon" Value="OR" />
                             <telerik:RadComboBoxItem runat="server" Text="Pennsylvania" Value="PA" />
                             <telerik:RadComboBoxItem runat="server" Text="Rhode Island" Value="RI" />
                             <telerik:RadComboBoxItem runat="server" Text="South Carolina" Value="SC" />
                             <telerik:RadComboBoxItem runat="server" Text="South Dakota" Value="SD" />
                             <telerik:RadComboBoxItem runat="server" Text="Tennessee" Value="TN" />
                             <telerik:RadComboBoxItem runat="server" Text="Texas" Value="TX" />
                             <telerik:RadComboBoxItem runat="server" Text="Utah" Value="UT" />
                             <telerik:RadComboBoxItem runat="server" Text="Vermont" Value="VT" />
                             <telerik:RadComboBoxItem runat="server" Text="Virginia" Value="VA" />
                             <telerik:RadComboBoxItem runat="server" Text="Washington" Value="WA" />
                             <telerik:RadComboBoxItem runat="server" Text="West Virginia" Value="WV" />
                             <telerik:RadComboBoxItem runat="server" Text="Wisconsin" Value="WI" />
                             <telerik:RadComboBoxItem runat="server" Text="Wyoming" Value="WY" />
                           </Items>
                         </telerik:RadComboBox>
                         <br />
                         Zip:<br />
                         <telerik:RadTextBox ID="RadTextBox2" runat="server" Text='<%# Bind("Zip") %>' Width=" 75px">
                         </telerik:RadTextBox>
                         <br />
                         Phone:<br />
                         <telerik:RadTextBox ID="RadTextBox5" runat="server" Text='<%# Bind("Phone") %>' Width=" 125px">
                         </telerik:RadTextBox>
                         <br />
                         Website:<br />
                         <telerik:RadTextBox ID="RadTextBox7" runat="server" Text='<%# Bind("Website") %>'
                           Width=" 225px">
                         </telerik:RadTextBox>
                         <br />
                         Contact Email:<br />
                         <telerik:RadTextBox ID="RadTextBox9" runat="server" Text='<%# Bind("Email") %>' Width=" 225px">
                         </telerik:RadTextBox>
                       </div>
                     </div>
                     <div class="divColumn" style="text-align: left; width: 400px;">
                       <div>
                         Current Plant Status:<br />
                         <telerik:RadComboBox ID="RadComboBox1" runat="server" SelectedValue='<%# bind("Status") %>'
                           Skin="Windows7">
                           <Items>
                             <telerik:RadComboBoxItem runat="server" Text="Active" Value="Active" />
                             <telerik:RadComboBoxItem runat="server" Text="Idled" Value="Idled" />
                             <telerik:RadComboBoxItem runat="server" Text="Closed" Value="Closed" />
                             <telerik:RadComboBoxItem runat="server" Text="Sold" Value="Sold" />
                           </Items>
                         </telerik:RadComboBox>
                         <br />
                         Name Plate Capacity:<br />
                         <telerik:RadNumericTextBox ID="RadTextBox8" runat="server" Text='<%# bind("NamePlateCapacity") %>'
                           NumberFormat-DecimalDigits="0">
                         </telerik:RadNumericTextBox>
                         <br />
                         <asp:CheckBox ID="cbCapacity" runat="server" Checked='<%# Bind("CapacityInfoPublic") %>' />
                         Check to make Capacity info public.
                         <br />
                         Feedstock:<br />
                         <telerik:RadTextBox ID="RadTextBox10" runat="server" Text='<%#Bind("Feedstock" )%>'>
                         </telerik:RadTextBox>
                         <br />
                         <asp:CheckBox ID="cbFeedstock" runat="server" Checked='<%# Bind("FeedstockInfoPublic") %>' />
                         Check to make Feedstock info public.
                       </div>
                     </div>
                   </div>
                 </div>
                 <telerik:RadButton ID="RadButton1" runat="server" CommandName="Update" Text="Save Changes">
                 </telerik:RadButton>
                 <telerik:RadButton ID="RadButton2" runat="server" CommandName="Cancel" Text="Cancel Changes">
                 </telerik:RadButton>
               </FormTemplate>
             </EditFormSettings>
           </telerik:GridTableView>
         </DetailTables>
         <CommandItemSettings ExportToPdfText="Export to PDF" ShowAddNewRecordButton="False"
           ShowExportToPdfButton="True" />
         <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
         </RowIndicatorColumn>
         <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="False">
         </ExpandCollapseColumn>
         <Columns>
           <telerik:GridBoundColumn DataField="CompanyID" DataType="System.Guid" FilterControlAltText="Filter CompanyID column"
             HeaderText="CompanyID" ReadOnly="True" SortExpression="CompanyID" UniqueName="CompanyID"
             Visible="false">
           </telerik:GridBoundColumn>
           <telerik:GridTemplateColumn DataField="Address1" FilterControlAltText="Filter Address1 column"
             HeaderText="Address1" SortExpression="Address1" UniqueName="Address1">
             <ItemTemplate>
               <div id="content" class="divTable">
                 <div id="divHeader" class="divHeaderTable">
                   <asp:Label ID="MlblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                 </div>
                 <div class="divRow">
                   <div class="divColumn" style="text-align: left;">
                     <div>
                       <strong>Company Information:</strong><br />
                       <asp:Label ID="Address1" runat="server" Text='<%# Eval("Address1") %>'></asp:Label><br />
                       <%# IfAddress2(Eval("Address2"))%>
                       <asp:Label ID="Label5" runat="server" Text='<%# Eval("City") %>'></asp:Label>, 
                       <asp:Label ID="Label6" runat="server" Text='<%# Eval("State") %>'></asp:Label
                       <asp:Label ID="Label7" runat="server" Text='<%# Eval("PostalCode") %>'></asp:Label><br />
                       <strong>PH:</strong>
                       <asp:Label ID="Label15" runat="server" Text='<%# Eval("Phone") %>'></asp:Label>
                          <strong>FX:</strong>
                       <asp:Label ID="Label16" runat="server" Text='<%# Eval("Fax") %>'></asp:Label><br />
                       <asp:Label ID="Label17" runat="server" Text='<%# Eval("Website") %>'></asp:Label>
                       <br />
                       <strong>Contact Email: </strong><asp:Label ID="Label18" runat="server" Text='<%# Eval("Email") %>'></asp:Label>
                       <br />
                       <br />
                       <telerik:RadButton ID="RadButton2" runat="server" Text="Edit Your Company Information"
                         CommandName="Edit">
                       </telerik:RadButton>
                     </div>
                   </div>
                   <div class="divColumn">
                     <div>
                       <strong>Primary Information:</strong><br />
                       <asp:Label ID="Label10" runat="server" Text='<%# Eval("Salutation") %>'></asp:Label
                       <asp:Label ID="Label12" runat="server" Text='<%# Eval("FirstName") %>'></asp:Label
                       <asp:Label ID="Label13" runat="server" Text='<%# Eval("LastName") %>'></asp:Label><br />
                       <asp:Label ID="Label14" runat="server" Text='<%# Eval("Title") %>'></asp:Label><br />
                       <asp:Label ID="Label3" runat="server" Text='<%# Eval("Pri_Address") %>'></asp:Label><br />
                       <asp:Label ID="Label4" runat="server" Text='<%# Eval("Pri_City") %>'></asp:Label>, 
                       <asp:Label ID="Label8" runat="server" Text='<%# Eval("Pri_State") %>'></asp:Label
                       <asp:Label ID="Label9" runat="server" Text='<%# Eval("Pri_Zip") %>'></asp:Label><br />
                       <asp:Label ID="Label11" runat="server" Text='<%# Eval("Pri_Phone") %>'></asp:Label><br />
                       <asp:Label ID="Label19" runat="server" Text='<%# Eval("Pri_Email") %>'></asp:Label><br />
                       <em>You must contact NBB to change Primary Information</em>
                     </div>
                   </div>
                   <div class="divColumn">
                     <div>
                       <strong>Alternate Information:</strong><br />
                       <asp:Label ID="Label20" runat="server" Text='<%# Eval("Alt_Salutation") %>'></asp:Label
                       <asp:Label ID="Label21" runat="server" Text='<%# Eval("Alt_First_Name") %>'></asp:Label
                       <asp:Label ID="Label22" runat="server" Text='<%# Eval("Alt_Last_Name") %>'></asp:Label><br />
                       <asp:Label ID="Label23" runat="server" Text='<%# Eval("Alt_Title") %>'></asp:Label><br />
                       <asp:Label ID="Label24" runat="server" Text='<%# Eval("Alt_Address") %>'></asp:Label><br />
                       <asp:Label ID="Label25" runat="server" Text='<%# Eval("Alt_City") %>'></asp:Label>, 
                       <asp:Label ID="Label26" runat="server" Text='<%# Eval("Alt_State") %>'></asp:Label
                       <asp:Label ID="Label27" runat="server" Text='<%# Eval("Alt_Zip") %>'></asp:Label><br />
                       <asp:Label ID="Label28" runat="server" Text='<%# Eval("Alt_Phone") %>'></asp:Label><br />
                       <asp:Label ID="Label29" runat="server" Text='<%# Eval("Alt_Email") %>'></asp:Label><br />
                       <em>You must contact NBB to change Alternate Information</em>
                     </div>
                   </div>
                 </div>
               </div>
               </div>
             </ItemTemplate>
           </telerik:GridTemplateColumn>
         </Columns>
         <EditFormSettings EditFormType="Template" EditColumn-Display="False">
           <EditColumn Display="False" FilterControlAltText="Filter EditCommandColumn column">
           </EditColumn>
           <FormTemplate>
             <div id="content" class="divTable">
               <div id="divHeader" class="divHeaderTable">
                 <asp:Label ID="Name" runat="server" Text='<%# Bind("Name") %>'></asp:Label>
               </div>
               <div class="divRow">
                 <div class="divColumn" style="text-align: left;">
                   <div>
                     Address:<br />
                     <telerik:RadTextBox ID="RadTextBox1" runat="server" Text='<%# Bind("Address1") %>'
                       Width=" 325px">
                     </telerik:RadTextBox>
                     Address:<br />
                     <telerik:RadTextBox ID="RadTextBox3" runat="server" Text='<%# Bind("Address2") %>'
                       Width=" 325px">
                     </telerik:RadTextBox>
                     Phone:
                     <telerik:RadTextBox ID="RadTextBox5" runat="server" Text='<%# Bind("Phone") %>' Width=" 125px">
                     </telerik:RadTextBox>
                       Fax: <br />
                     <telerik:RadTextBox ID="RadTextBox6" runat="server" Text='<%# Bind("Fax") %>' Width=" 125px">
                     </telerik:RadTextBox>
                     City:
                     <telerik:RadTextBox ID="RadTextBox4" runat="server" Text='<%# Bind("City") %>' Width=" 325px">
                     </telerik:RadTextBox>
                     State:
                     <telerik:RadComboBox ID="State" runat="server" SelectedValue='<%# bind("State")  %>'
                       Skin="Windows7">
                       <Items>
                         <telerik:RadComboBoxItem runat="server" Text="Alabama" Value="AL" />
                         <telerik:RadComboBoxItem runat="server" Text="Alaska" Value="AK" />
                         <telerik:RadComboBoxItem runat="server" Text="Arizona" Value="AZ" />
                         <telerik:RadComboBoxItem runat="server" Text="Arkansas" Value="AR" />
                         <telerik:RadComboBoxItem runat="server" Text="California" Value="CA" />
                         <telerik:RadComboBoxItem runat="server" Text="Colorado" Value="CO" />
                         <telerik:RadComboBoxItem runat="server" Text="Connecticut" Value="CT" />
                         <telerik:RadComboBoxItem runat="server" Text="District of Columbia" Value="DC" />
                         <telerik:RadComboBoxItem runat="server" Text="Delaware" Value="DE" />
                         <telerik:RadComboBoxItem runat="server" Text="Florida" Value="FL" />
                         <telerik:RadComboBoxItem runat="server" Text="Georgia" Value="GA" />
                         <telerik:RadComboBoxItem runat="server" Text="Hawaii" Value="HI" />
                         <telerik:RadComboBoxItem runat="server" Text="Idaho" Value="ID" />
                         <telerik:RadComboBoxItem runat="server" Text="Illinois" Value="IL" />
                         <telerik:RadComboBoxItem runat="server" Text="Indiana" Value="IN" />
                         <telerik:RadComboBoxItem runat="server" Text="Iowa" Value="IA" />
                         <telerik:RadComboBoxItem runat="server" Text="Kansas" Value="KS" />
                         <telerik:RadComboBoxItem runat="server" Text="Kentucky" Value="KY" />
                         <telerik:RadComboBoxItem runat="server" Text="Louisiana" Value="LA" />
                         <telerik:RadComboBoxItem runat="server" Text="Maine" Value="ME" />
                         <telerik:RadComboBoxItem runat="server" Text="Maryland" Value="MD" />
                         <telerik:RadComboBoxItem runat="server" Text="Massachusetts" Value="MA" />
                         <telerik:RadComboBoxItem runat="server" Text="Michigan" Value="MI" />
                         <telerik:RadComboBoxItem runat="server" Text="Minnesota" Value="MN" />
                         <telerik:RadComboBoxItem runat="server" Text="Mississippi" Value="MS" />
                         <telerik:RadComboBoxItem runat="server" Text="Missouri" Value="MO" />
                         <telerik:RadComboBoxItem runat="server" Text="Montana" Value="MT" />
                         <telerik:RadComboBoxItem runat="server" Text="Nebraska" Value="NE" />
                         <telerik:RadComboBoxItem runat="server" Text="Nevada" Value="NV" />
                         <telerik:RadComboBoxItem runat="server" Text="New Hampshire" Value="NH" />
                         <telerik:RadComboBoxItem runat="server" Text="New Jersey" Value="NJ" />
                         <telerik:RadComboBoxItem runat="server" Text="New Mexico" Value="NM" />
                         <telerik:RadComboBoxItem runat="server" Text="New York" Value="NY" />
                         <telerik:RadComboBoxItem runat="server" Text="North Carolina" Value="NC" />
                         <telerik:RadComboBoxItem runat="server" Text="North Dakota" Value="ND" />
                         <telerik:RadComboBoxItem runat="server" Text="Ohio" Value="OH" />
                         <telerik:RadComboBoxItem runat="server" Text="Oklahoma" Value="OK" />
                         <telerik:RadComboBoxItem runat="server" Text="Oregon" Value="OR" />
                         <telerik:RadComboBoxItem runat="server" Text="Pennsylvania" Value="PA" />
                         <telerik:RadComboBoxItem runat="server" Text="Rhode Island" Value="RI" />
                         <telerik:RadComboBoxItem runat="server" Text="South Carolina" Value="SC" />
                         <telerik:RadComboBoxItem runat="server" Text="South Dakota" Value="SD" />
                         <telerik:RadComboBoxItem runat="server" Text="Tennessee" Value="TN" />
                         <telerik:RadComboBoxItem runat="server" Text="Texas" Value="TX" />
                         <telerik:RadComboBoxItem runat="server" Text="Utah" Value="UT" />
                         <telerik:RadComboBoxItem runat="server" Text="Vermont" Value="VT" />
                         <telerik:RadComboBoxItem runat="server" Text="Virginia" Value="VA" />
                         <telerik:RadComboBoxItem runat="server" Text="Washington" Value="WA" />
                         <telerik:RadComboBoxItem runat="server" Text="West Virginia" Value="WV" />
                         <telerik:RadComboBoxItem runat="server" Text="Wisconsin" Value="WI" />
                         <telerik:RadComboBoxItem runat="server" Text="Wyoming" Value="WY" />
                       </Items>
                     </telerik:RadComboBox>
                     <br />
                     Zip:<br />
                     <telerik:RadTextBox ID="RadTextBox2" runat="server" Text='<%# Bind("PostalCode") %>'
                       Width=" 75px">
                     </telerik:RadTextBox><br />
                     Website:
                     <telerik:RadTextBox ID="RadTextBox7" runat="server" Text='<%# Bind("Website") %>'
                       Width=" 325px">
                     </telerik:RadTextBox>
                     Contact Email:
                     <telerik:RadTextBox ID="RadTextBox9" runat="server" Text='<%# Bind("Email") %>' Width=" 325px">
                     </telerik:RadTextBox>
                   </div>
                 </div>
               </div>
             </div>
             </div>
             <telerik:RadButton ID="RadButton1" runat="server" CommandName="Update" Text="Save Changes">
             </telerik:RadButton>
             <telerik:RadButton ID="RadButton3" runat="server" CommandName="Cancel" Text="Cancel Changes">
             </telerik:RadButton>
           </FormTemplate>
         </EditFormSettings>
       </MasterTableView>
       <ClientSettings>
         <ClientEvents OnPopUpShowing="PopUpShowing" />
       </ClientSettings>
       <FilterMenu EnableEmbeddedBaseStylesheet="False" EnableImageSprites="False">
       </FilterMenu>
       <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Vista" EnableEmbeddedBaseStylesheet="False">
       </HeaderContextMenu>
     </telerik:RadGrid>
   </asp:Panel>
 </div>
 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:nbbmembersConnectionString %>"
   SelectCommand="SELECT [Name], [Address1], ISNULL([Address2],' ') AS Address2, [City], [State], [PostalCode], [Phone], [Fax], [Website], [Email], [Salutation], [FirstName], [LastName], [Title], [Pri Address] AS Pri_Address, [Pri City] AS Pri_City, [Pri State] AS Pri_State, [Pri Zip] AS Pri_Zip, [Pri Phone] AS Pri_Phone, [Pri Email] AS Pri_Email, [Alt Salutation] AS Alt_Salutation, [Alt First Name] AS Alt_First_Name, [Alt Last Name] AS Alt_Last_Name, [Alt title] AS Alt_title, [Alt Address] AS Alt_Address, [Alt City] AS Alt_City, [Alt State] AS Alt_State, [Alt Zip] AS Alt_Zip, [Alt Phone] AS Alt_Phone, [Alt Email] AS Alt_Email, [CompanyID] FROM [COMP-PRI-ALT for export] WHERE ([CompanyID] = @CompanyID)"
   UpdateCommand="UPDATE [Company] SET [Name] = @Name, [Address1] = @Address1, [Address2] = @Address2, [City] = @City, [State] = @State, [Country] = @Country, [PostalCode] = @PostalCode, [Phone] = @Phone, [Fax] = @Fax, [Website] = @Website, [Email] = @Email, [Contact] = @Contact, [Descript] = @Descript WHERE [CompanyID] = @CompanyID"
   ProviderName="System.Data.SqlClient">
   <SelectParameters>
     <asp:SessionParameter Name="CompanyID" SessionField="CompanyID" Type="String" />
   </SelectParameters>
   <UpdateParameters>
     <asp:Parameter Name="Name" Type="String" />
     <asp:Parameter Name="Address1" Type="String" />
     <asp:Parameter Name="Address2" Type="String" />
     <asp:Parameter Name="City" Type="String" />
     <asp:Parameter Name="State" Type="String" />
     <asp:Parameter Name="Country" Type="String" />
     <asp:Parameter Name="PostalCode" Type="String" />
     <asp:Parameter Name="Phone" Type="String" />
     <asp:Parameter Name="Fax" Type="String" />
     <asp:Parameter Name="Website" Type="String" />
     <asp:Parameter Name="Email" Type="String" />
     <asp:Parameter Name="Contact" Type="String" />
     <asp:Parameter Name="Descript" Type="String" />
     <asp:Parameter Name="CompanyID" Type="Object" />
   </UpdateParameters>
 </asp:SqlDataSource>
 <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:nbbmembersConnectionString %>"
   SelectCommand="SELECT [FacilityID], [CompanyID], [Status], [FacilityName], [Address], [City], [State], [Zip], [Phone], [Contact_First], [Contact_Last], [Email], [NamePlateCapacity], [CapacityInfoPublic], [Feedstock], [FeedstockInfoPublic], [Website] FROM [facilities] WHERE ([CompanyID] = @CompanyID)"
   UpdateCommand="UPDATE [facilities] SET [Status] = @Status, [FacilityName] = @FacilityName, [Address] = @Address, [City] = @City, [State] = @State, [Zip] = @Zip, [Phone] = @Phone, [Contact_First] = @Contact_First, [Contact_Last] = @Contact_Last, [Email] = @Email, [NamePlateCapacity] = @NamePlateCapacity, [CapacityInfoPublic] = @CapacityInfoPublic, [Feedstock] = @Feedstock, [FeedstockInfoPublic] = @FeedstockInfoPublic, [Website] = @Website WHERE [FacilityID] = @FacilityID"
   ProviderName="System.Data.SqlClient">
    
   <SelectParameters>
     <asp:SessionParameter Name="CompanyID" SessionField="CompanyID" Type="String" />
   </SelectParameters>
   <UpdateParameters>
     <asp:Parameter Name="CompanyID" Type="String" />
     <asp:Parameter Name="Status" Type="String" />
     <asp:Parameter Name="FacilityName" Type="String" />
     <asp:Parameter Name="Address" Type="String" />
     <asp:Parameter Name="City" Type="String" />
     <asp:Parameter Name="State" Type="String" />
     <asp:Parameter Name="Zip" Type="String" />
     <asp:Parameter Name="Phone" Type="String" />
     <asp:Parameter Name="Contact_First" Type="String" />
     <asp:Parameter Name="Contact_Last" Type="String" />
     <asp:Parameter Name="Email" Type="String" />
     <asp:Parameter Name="NamePlateCapacity" Type="Double" />
     <asp:Parameter Name="CapacityInfoPublic" Type="Boolean" />
     <asp:Parameter Name="Feedstock" Type="String" />
     <asp:Parameter Name="FeedstockInfoPublic" Type="Boolean" />
     <asp:Parameter Name="Website" Type="String" />
     <asp:Parameter Name="FacilityID" Type="Int32" />
   </UpdateParameters>
 </asp:SqlDataSource>
 </form>
Scott Tremain
Top achievements
Rank 1
 answered on 25 Aug 2011
2 answers
152 views
Hi,

I am getting the following error

Type 'Telerik.Web.UI.Common.TelerikRandom' in Assembly 'Telerik.Web.UI, Version=2011.2.712.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' is not marked as serializable.

This only happends with the latest controls. I believe this to be bug as it appears something needs to be marked as serializable.

Is there a fix or possible work around or will I need to revert back to the old version of the controls??

Many Thanks

Mark
Slav
Telerik team
 answered on 25 Aug 2011
2 answers
314 views
I noticed that telerik textboxes render as three seperate input controls (two of which are hidden) with variations on the name of the original control.  Given the name "yourtextbox", the three resulting controls will be:

yourtextbox
yourtextbox_text
yourtextbox_ClientState

This looks like it is used by Telerik to hold original and new values on the client side to detect whether the contents of a control were changed from their original value by a user, before a postback to the server happens.  I suspect that the contents of these various input controls are compared, and when they hold different values it is deemed the contents of a control were indeed changed.

Is there a Telerik JQuery method I can call in javascript on the client side that uses these fields to determine whether a control was actually changed by a user BEFORE a postback is done?  I want to display a confirm save dialog to the user should they try to move away from a page that they changed prior to saving it.  To do this, I currently pass an attribute on each control that has the original loaded value, so I can compare it to what the control holds at the time the user moves off the page.  But, I would prefer to use a native Telerik method that does this should one exist.

Andy
Andy
Top achievements
Rank 1
 answered on 25 Aug 2011
11 answers
118 views
Hello

Having an issue using IE8 with my Grid.   I have placed a "Confirm" button in the footer of the details view in my grid, the button is moving up and down the bages, and dissappear/reappearing , not stating  in the grid footer.  I have not seen this issue in Chrome / Firefox but IE8 is the default browser needed for this app. ANy Suggestion greatly appreciated

Thanks
Stuart
Iana Tsolova
Telerik team
 answered on 25 Aug 2011
3 answers
68 views
Hi,

My RibbonBarGroup code is:
<telerik:RibbonBarGroup Text="Sayfa düzenleme">
    <Items>
        <telerik:RibbonBarButtonStrip>
            <Buttons>
                <telerik:RibbonBarButton Size="Small" Text="Sola çevir" ImageUrl="images/rotate_left.png" />
                <telerik:RibbonBarButton Size="Small" Text="SaÄŸa çevir" ImageUrl="images/rotate_right.png" />
                <telerik:RibbonBarButton Size="Small" Text="Aynala" ImageUrl="images/mirror.png" />
                <telerik:RibbonBarButton Size="Small" Text="Yatır" ImageUrl="images/flip.png" />
            </Buttons>
        </telerik:RibbonBarButtonStrip>
        <telerik:RibbonBarButtonStrip>
            <Buttons>
                <telerik:RibbonBarButton Size="Small" Text="YakınlaÅŸ" ImageUrl="images/zoom_in.png" />
                <telerik:RibbonBarButton Size="Small" Text="UzaklaÅŸ" ImageUrl="images/zoom_out.png" />
                <telerik:RibbonBarButton Size="Small" Text="Alanı doldur" ImageUrl="images/fit.png" />
                <telerik:RibbonBarButton Size="Small" Text="1:1 görünüm" ImageUrl="images/view_1_1.png" />
            </Buttons>
        </telerik:RibbonBarButtonStrip>
        <telerik:RibbonBarToggleList>
            <ToggleButtons>
                <telerik:RibbonBarToggleButton Size="Small" Text="El" ImageUrl="images/cursor_hand.png" Toggled="true"/>
                <telerik:RibbonBarToggleButton Size="Small" Text="İşaret" ImageUrl="images/cursor_plus.png" />
            </ToggleButtons>
        </telerik:RibbonBarToggleList>
        <telerik:RibbonBarButton Size="Small" Text="Seçili alanı ayır" ImageUrl="images/cut.png" />
    </Items>
</telerik:RibbonBarGroup>

RibbonBarToggleList breaks the design as seen at the attachment.

Any thoughts?
TIA
Ivan Zhekov
Telerik team
 answered on 25 Aug 2011
5 answers
202 views
Hi,

I'm using the OnItemDataBound to split my code into methods as follows....during the update statement, it gave an error of Unable to cast object of type 'GHG_MCA.WellVentEvents' to type 'System.Data.DataRowView'. I think it is because while calling the update method the grid was unable to locate the datasource?

protected

 

 

void OnItemDataBoundHandler(object sender, GridItemEventArgs e)

 

{

 

 

    if (e.Item is GridDataItem)

 

    {

 

 

    GridDataItem dataItem = e.Item as GridDataItem;

 

 

 

    string CreateDate = dataItem["CreationDate"].Text;

 

    }

 

 

    if (e.Item.IsInEditMode)

 

    {

 

 

 

 

 

        //This area is for Update existing rows

 

 

 

        if (!(e.Item is IGridInsertItem))

 

        {

        Update(sender, e);

        }

 

 

        //This area is for inserting new rows

 

 

 

        else

 

        {

        NewInsert(sender, e);

 

        }

    }

}

 

 

 

private void Update(object sender, GridItemEventArgs e)

 

{

 

 

    if (e.Item.IsInEditMode)

 

    {

 

 

        GridEditableItem item = (GridEditableItem)e.Item;

 

 

 

        //This area is for update existing rows

 

 

 

        if (!(e.Item is IGridInsertItem))

 

    {

 

 

        //For the Area section

 

 

 

        RadComboBox combo = (RadComboBox)item.FindControl("RadComboBoxArea");

 

 

 

        RadComboBoxItem selectedItem = new RadComboBoxItem();

 

        selectedItem.Text = ((

 

DataRowView)e.Item.DataItem)["AreaName"].ToString();

 

        combo.Items.Add(selectedItem);

        selectedItem.DataBind();
    }
}

Iana Tsolova
Telerik team
 answered on 25 Aug 2011
3 answers
104 views
I have created a custom skin for my radgrid and have a number of datetime columns with filters.

Is there any way that I can apply my skin to the DatePicker controls that are automatically inserted as the filtering items?

I have tried assigning a SkinID to the filteringitem during the ItemCreated event and get an error telling me that I must make skin assignments during the Page.PreInit event.

Any ideas?

Thanks.

Mike
Iana Tsolova
Telerik team
 answered on 25 Aug 2011
1 answer
144 views
Hi,

I have a RadListBox embedded into a RadDock. When the RadDock is opened (MyRadDock.Closed = false), I want to clear
the RadListBox.
At the moment, when the RadDock is closed and opened again, the ListBox still contains the items from the previous command call.

Unfortunately I don't find an event which is fired when the RadDock is opened. The client-side event "OnClientInitialize" is also called on PostBack but I want to preserve the ListBox content during a PostBack (which currently works fine) when the RadDock is opened.

Do you have any idea how I can clear the RadListBox every time the RadDock is opened but not on a PostBack?

Thanks!

Slav
Telerik team
 answered on 25 Aug 2011
1 answer
120 views
Hi,

I have inserted SPradgrid in one of my sharepoint 2010 page.
After that I integrated sharepoint list with SPradgrid to display list data.

I want to know how should I handle client and server side events in SPRadgrid.

Please share you information.

Thanks,
Nirav.
Maria Ilieva
Telerik team
 answered on 25 Aug 2011
3 answers
744 views
I have a telerik grid with masterdetail view which works fine on dev machine, but on the produciton server gives the following error when trying to click on the + to expand the detail view
Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.
Line: 868
Char: 13
Code: 0
URI: http://stg/ScriptResource.axd?d=WPWgUqfqWNOKwEIK623Rj1atHxx0muHp2TuYIOyTDuZq4iZdR4d8M3a94sBKs28ffLNvQd0IhbwuKOECVhpyU_sPvVPXMieAwhP9vcB-7gyWfNLudOBik1XZsFAl_Mv1J0KWTyMBwF3XMNtAuY91y0fExR5oYve9HYEYEtzdevEvZXV6AydUtwWdBzwQDWCgBPrZ9Q2&t=2610f696


On the source at Line 868,, it is the javascript postback code.

I have noticed that the error is not occuring if I do an enableAjax = "false" on the radajaxmanager.

 IIS runs on the Classic AppPool.

Is there any other place I should be checking on?
Iana Tsolova
Telerik team
 answered on 25 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?