CSS in WebResource.axd file is adding undesirable behavior at runtime

6 posts, 0 answers
  1. Doug
    Doug avatar
    14 posts
    Member since:
    Apr 2013

    Posted 20 Apr 2015 Link to this post

    Ok so I have an webpage, that has two combo boxes and a button.  One combo box is for Purchase Orders and the other for Lot numbers.  When you select a PO from combo box, details of all items on that PO are shown in a radgrid.  Next to each row is an arrow that when clicked opens up a web control view, where you can add a new receiving lot.  When you add a new receiving lot, it displays an .ascx within the radgrid.  See attached picture for to better understand...

     Problem I am running into, is that there are two comb box controls on this .ascx page; received by and Country of Origin ( COO ).  These both have sql db as their data source and are running a stored proc to return results.  The user should have the ability to select anything returned by database.  However, at runtime, I am noticing that there is some CSS within the WebResource.axd file that is being applied to these controls, that is setting them to read only and to text.  The result is that the user cannot select anything in the dropdown, in fact drop down does not even work, and the controls show the first result returned by database and it is simply being shown as text.

     How can I prevent the WebResource.axd from applying these CSS attributes to my combo boxes?

     Please help, this is very strange and very undesirable.

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 23 Apr 2015 Link to this post

    Hello,

    Thank you for contacting Telerik Support.

    The "readonly" attribute is applied when the RadComboBox Filter property is not set or is set to "None". Enabling filtering removes this attribute and allows the user to type in the RadComboBox's input field. It has no effect on the user's ability to select an Item from the control's drop-down.

    If the drop-down is not opening the reason behind that would not be the "readonly" attribute. Have you checked for js errors in the browser's developer tools? When you click on the control does the RadComboBox OnClientDropDownOpening event fire?

    Looking forward to your reply.

    Regards,
    Ivan Danchev
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Doug
    Doug avatar
    14 posts
    Member since:
    Apr 2013

    Posted 23 Apr 2015 in reply to Ivan Danchev Link to this post

    No it does appear that the OnClientDropDownOpening event is firing.  There are javascript errors but not sure how to resolve them since they are in the embedded javascript; ones that I did not write.
  5. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 27 Apr 2015 Link to this post

    Hello,

    I am attaching a sample project to this reply, which follows your scenario: a user control with two RadComboBox controls in RadGrid. In order to determine what the reason behind the js error could be, we need to test it locally.

    Could you please make the necessary modifications to the project replicating the issue, open a ticket and attach the project to it so we can further review it? Or, if it is more convenient for you, you can send us another runnable project.

    The Telerik .dll files are omitted from the Bin folder in order not to exceed the maximum allowed attachment size.

    Regards,
    Ivan Danchev
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  6. Doug
    Doug avatar
    14 posts
    Member since:
    Apr 2013

    Posted 27 Apr 2015 in reply to Ivan Danchev Link to this post

    Ivan I have opened a ticket but that has got me no where.  You example looks a little different than mine.  Below is the code for my radgrid... I am using my control inside an Edit Form, as you can see below..

     

     <telerik:radgrid ID="RadGrid2" runat="server" CellSpacing="0" DataSourceID="dsDetail" GridLines="None" AutoGenerateColumns="False" Width="900px" Visible="False">
       <MasterTableView DataSourceID="dsDetail" DataKeyNames="SAPItemCode,PurchaseOrderNumber" AllowAutomaticUpdates="true" EditMode="EditForms">
            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
               <Columns>
                            <telerik:gridboundcolumn DataField="PurchaseOrderNumber" 
                                FilterControlAltText="Filter ponumber column" 
                                HeaderText="po #" SortExpression="PurchaseOrderNumber" 
                                UniqueName="PurchaseOrderNumber" ReadOnly="true">
                            </telerik:gridboundcolumn>
                            <telerik:gridboundcolumn DataField="SAPItemCode" 
                                FilterControlAltText="Filter SAPItemCode column" HeaderText="SAPItemCode"  DataType="System.Decimal" 
                                SortExpression="SAPItemCode" UniqueName="SAPItemCode" ReadOnly="true">
                            </telerik:gridboundcolumn>
                            <telerik:gridboundcolumn DataField="Description" 
                                FilterControlAltText="Filter Description column" HeaderText="Description" 
                                SortExpression="Description" UniqueName="Description" ReadOnly="true">
                            </telerik:gridboundcolumn>
                            <telerik:gridboundcolumn DataField="QtyOrdered" DataType="System.Decimal" 
                                FilterControlAltText="Filter QtyOrdered column" HeaderText="QtyOrdered" 
                                SortExpression="QtyOrdered" UniqueName="QtyOrdered" ReadOnly="true">
                            </telerik:gridboundcolumn>
                           <telerik:GridTemplateColumn DataField="QtyReceived" DataType="System.Decimal" 
                                FilterControlAltText="Filter QtyReceived column" HeaderText="QtyReceived" 
                                SortExpression="QtyReceived" UniqueName="QtyReceived">
                                <EditItemTemplate>
                                    <telerik:RadNumericTextBox ID="QtyReceivedTextBox" Runat="server" Text='<%# Bind("QtyReceived") %>'>
                                    </telerik:RadNumericTextBox>
                                </EditItemTemplate>
                                <FooterTemplate>
                                    <asp:Label ID="lblFSum" runat="server" Text="Sum:"></asp:Label>
                                </FooterTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="QtyReceivedLabel" runat="server" 
                                        Text='<%# Eval("QtyReceived") %>'></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle Width="100px" />
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn DataField="imageSpecs"
                                            FilterControlAltText="Filter imagefile column" HeaderText="View Specs" 
                                            SortExpression="imageSpecs" UniqueName="imageSpecs">
                                            <EditItemTemplate>
                                               Hi
                                             </EditItemTemplate>
                                             <ItemTemplate>
                                                 <asp:ImageButton ID="btnSpecs" runat="server" ImageUrl='<%# Eval("imageSpecs") %>' Height="50px" UniqueName="btnSpecs2" DataTextField="SAPItemCode" CommandName="viewSpec" />
                                             </ItemTemplate>
                                             <HeaderStyle Width="100px" />
                            </telerik:GridTemplateColumn>
                             <telerik:gridbuttoncolumn ButtonType="ImageButton" UniqueName="btnSpecs2" HeaderText="View Specs" 
                                           ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                                            CommandName="viewSpec" DataTextField="SAPItemCode" ImageUrl="~/Images/qc.gif" 
                                           Visible="false">
                                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="Center">
                                        </ItemStyle>
                                        </telerik:gridbuttoncolumn>
                          <telerik:GridBoundColumn DataField="CofA" DataType="System.Decimal" 
                                FilterControlAltText="Filter CofA column" HeaderText="CofA" 
                                SortExpression="CofA" UniqueName="CofA" ReadOnly="true" Visible="false">
                                <HeaderStyle/>
                            </telerik:GridBoundColumn>
                              </Columns>
                            <DetailTables>
                                <telerik:gridtableview runat="server" DataSourceID="dsLotInfo" 
                                    DataKeyNames="SAPItemCode,PurchaseOrderNumber,rec_id" 
                                    HierarchyDefaultExpanded="True" CommandItemDisplay="Top" Width="500px" 
                                    ShowFooter="true">
                                <ParentTableRelation>
                                        <telerik:gridrelationfields DetailKeyField="SAPItemCode" 
                                            MasterKeyField="SAPItemCode" />
                                        <telerik:gridrelationfields DetailKeyField="PurchaseOrderNumber" 
                                            MasterKeyField="PurchaseOrderNumber" />
                                    </ParentTableRelation>
                                   <Columns>
                                        <telerik:gridboundcolumn DataField="PurchaseOrderNumber" 
                                            FilterControlAltText="Filter PurchaseOrderNumber column" 
                                            HeaderText="PO#" SortExpression="PurchaseOrderNumber"  
                                            UniqueName="PurchaseOrderNumber" ReadOnly="true" Visible="True">
                                            <HeaderStyle Width="100px" />
                                        </telerik:gridboundcolumn>
                                        <telerik:gridboundcolumn DataField="SAPItemCode" 
                                            FilterControlAltText="Filter SAPItemCode column" HeaderText="SAPItemCode" 
                                            SortExpression="SAPItemCode" UniqueName="SAPItemCode" ReadOnly="true" 
                                           Visible="false">
                                            <HeaderStyle Width="100px" />
                                            <ItemStyle Width="100px" />
                                        </telerik:gridboundcolumn>
                                        <telerik:gridbuttoncolumn ButtonType="ImageButton" 
                                           ImageUrl="~/Images/Cancel.gif" CommandName="deletethislot"
                                          HeaderText="DeleteLot" UniqueName="btnDeleteLot" >
                                        </telerik:gridbuttoncolumn>
                                         <telerik:gridboundcolumn DataField="rec_id" 
                                            FilterControlAltText="Filter rec_id column" HeaderText="Lot Number" 
                                            SortExpression="rec_id" UniqueName="rec_id" ReadOnly="true">
                                            <HeaderStyle Width="100px" />
                                            <ItemStyle Width="100px" />
                                        </telerik:gridboundcolumn>
                                        <telerik:gridboundcolumn DataField="vendor_lot" 
                                            FilterControlAltText="Filter vendor_lot column" HeaderText="vendor_lot" 
                                            SortExpression="vendor_lot" UniqueName="vendor_lot" >
                                            <HeaderStyle Width="100px" />
                                            <ItemStyle Width="100px" />
                                        </telerik:gridboundcolumn>
                                     
                                         <telerik:gridtemplatecolumn DataField="qty_rec" Aggregate="Sum"
                                            FilterControlAltText="Filter qty_rec column" HeaderText="qty_rec" 
                                            SortExpression="qty_rec" UniqueName="qty_rec">
                                             <EditItemTemplate>
                                                 <asp:TextBox ID="qty_recTextBox" runat="server" Text='<%# Bind("qty_rec") %>'></asp:TextBox>
                                             </EditItemTemplate>
                                             <ItemTemplate>
                                                 <asp:Label ID="qty_recLabel" runat="server" Text='<%# Eval("qty_rec") %>'></asp:Label>
                                             </ItemTemplate>
                                              
                                        </telerik:gridtemplatecolumn>
                                        <telerik:gridboundcolumn DataField="rec_by" 
                                            FilterControlAltText="Filter rec_by column" HeaderText="rec_by" 
                                            SortExpression="rec_by" UniqueName="rec_by">
                                            <HeaderStyle Width="50px" />
                                            <ItemStyle Width="50px" />
                                        </telerik:gridboundcolumn >
                                        <telerik:gridtemplatecolumn DataField="imagefile" 
                                            FilterControlAltText="Filter imagefile column" HeaderText="QC Tests" 
                                            SortExpression="imagefile" UniqueName="imagefile">
                                             <EditItemTemplate>
                                               Hi
                                             </EditItemTemplate>
                                             <ItemTemplate>
                                                 <asp:ImageButton ID="ImageButton2" runat="server" ImageUrl='<%# Eval("imagefile") %>' Height="50px" UniqueName="btnSpecs" DataTextField="rec_id" DataTextFormatString="QC Tests {0}" CommandName="qcspec" />
                                             </ItemTemplate>
                                        </telerik:gridtemplatecolumn>
                                        <telerik:gridbuttoncolumn DataTextFormatString="QC Tests {0}"
                                            ButtonType="ImageButton" UniqueName="btnSpecs" HeaderText="QC Tests" 
                                           ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"
                                            CommandName="qcspec" DataTextField="rec_id" ImageUrl="~/Images/qc.gif" 
                                           Visible="false">
                                        <HeaderStyle HorizontalAlign="Center"></HeaderStyle>
                                        <ItemStyle HorizontalAlign="Center">
                                        </ItemStyle>
                                        </telerik:gridbuttoncolumn>
                                         <telerik:gridtemplatecolumn DataField="imagePrinter" 
                                            FilterControlAltText="Filter imagePrinter column" HeaderText="Print Lot" 
                                            SortExpression="imagePrinter" UniqueName="imagePrinter">
                                             <EditItemTemplate>
                                               Hi
                                             </EditItemTemplate>
                                             <ItemTemplate>
                                                 <asp:ImageButton ID="imagePrinter" runat="server" ImageUrl='<%# Eval("imagePrinter") %>' Height="50px" UniqueName="btnPrint" DataTextField="rec_id" DataTextFormatString="QC Tests {0}" CommandName="printlot" />
                                             </ItemTemplate>
                                        </telerik:gridtemplatecolumn>
                                         <telerik:gridtemplatecolumn DataField="CofAfile" 
                                            FilterControlAltText="Filter CofAfile column" HeaderText="CofA status" 
                                            SortExpression="CofAfile" UniqueName="CofAfile">
                                             <EditItemTemplate>
                                               Hi
                                             </EditItemTemplate>
                                             <ItemTemplate>
                                                 <asp:ImageButton ID="CofAfile" runat="server" ImageUrl='<%# Eval("CofAfile") %>' Height="50px" UniqueName="btnCofA" DataTextField="rec_id" CommandName="openCofA" />
                                             </ItemTemplate>
                                        </telerik:gridtemplatecolumn>
                                   </Columns>
                                    <CommandItemSettings ExportToPdfText="Export to PDF" />
                                    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                    </ExpandCollapseColumn>
                                    <EditFormSettings UserControlName="AddRecLot.ascx" EditFormType="WebUserControl">
                                          <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                        </EditColumn>
                                    </EditFormSettings>

                                <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
                                </telerik:gridtableview>
                            </DetailTables>

    <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
    </RowIndicatorColumn>

    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" 
            Visible="True">
    </ExpandCollapseColumn>

    <EditFormSettings>
    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
    </EditFormSettings>

    <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>
    </MasterTableView>

    <PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>

    <FilterMenu EnableImageSprites="False"></FilterMenu>

    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
                    </telerik:radgrid>

  7. Ivan Danchev
    Admin
    Ivan Danchev avatar
    829 posts

    Posted 28 Apr 2015 Link to this post

    Hello,

    I am afraid the RadGrid you posted has too many dependencies, which do not allow it to be run/debugged. I suggest you to use the project I attached and try to reproduce the issue in it as it includes a sample database. Simplifying the scenario and striping the irrelevant code can help us locate where the issue originates. The guidelines in the following blog post would help you do that and isolate the issue in a sample project.

    Regards,
    Ivan Danchev
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017