This is a migrated thread and some comments may be shown as answers.

[Solved] javascript issue

1 Answer 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
naveen veda
Top achievements
Rank 1
naveen veda asked on 12 May 2009, 10:45 AM
in my apllication i am using RadGrid control
 
after adding this code

 

<ClientSettings >

 

 

<Scrolling AllowScroll="True" ScrollHeight="250px"  UseStaticHeaders="True" />

 

 

<Selecting AllowRowSelect="True" />
</ClientSettings>

 


with in the RadGrid template textbox  javascript select();  is not working in mozilla firefox browser ,but  it is working in IE browser

but it is working in outside RadGrid control whether it is browser issue or not?

 <radG:RadGrid ID="ManagerRadGrid" runat="server" AllowPaging="true" PageSize="50"
                                         GridLines="None" AutoGenerateColumns="False" MasterTableView-EditMode="EditForms"
                                         Skin="WebGrid20" AllowCustomPaging="false" EnableViewState="true" HeaderStyle-Wrap="true"
                                         OnItemCreated="ManagerRadGrid_ItemCreated" EnableAJAX="true" OnUpdateCommand="ManagerRadGrid_UpdateCommand"
                                         OnNeedDataSource="ManagerRadGrid_NeedDataSource" OnItemDataBound="ManagerRadGrid_ItemDataBound"
                                         OnPreRender="ManagerRadGrid_PreRender"  OnPageIndexChanged="ManagerRadGrid_PageIndexChanged" >
                                         <%--<SelectedItemStyle BackColor="#999999"  AlternatingItemStyle-BackColor="AliceBlue"  />--%>
                                         <MasterTableView ShowFooter="True" DataKeyNames="KeyNum">
                                        
                                             <Columns>
                                            
                                                 <radG:GridTemplateColumn HeaderText="xmlnum" Visible="False" UniqueName="TemplateColumn1">
                                                     <ItemTemplate>
                                                         <asp:TextBox ID="lblpxmlnum" runat="server" Text='<%# Eval("KeyNum")%>'></asp:TextBox>
                                                     </ItemTemplate>
                                                 </radG:GridTemplateColumn>                                              
                                       
            <radG:GridTemplateColumn DataType="System.Decimal"  Visible ="false"   UniqueName="SP_MostRecentTemplateColumns">
                                                     <HeaderTemplate>
                                                         <table id="tblperfratings1" runat="server" cellpadding="0" cellspacing="0">
                                                             <tr>                                                            
                                                               
                                                                <%-- <td id="Td3" align="Center" style="background-color: #92B4E1; color: White; width :70px;" runat="server"
                                                                     visible="True">
                                                                     <asp:Label ID="lblguideline" style="text-align:center" runat="server" Text="Max Salary Guideline" Width="70px"
                                                                         SkinID="ModelGridHeadLabel"></asp:Label></td>--%>
                                                             </tr>
                                                             <tr>                                                              
                                                              
                                                            
                                                             </tr>
                                                         </table>
                                                     </HeaderTemplate>
                                                     <ItemTemplate>
                                                         <table id="tbltratings1" runat="server" cellpadding="0" cellspacing="0">
                                                             <tr>
                                                                
                                                                <%-- <td id="tdguideline" runat="server" align="left" style="width: 70px; border-width: 0px;
                                                                     text-align: center;">
                                                                     <asp:Label ID="txtguideline"  runat="server" Text='<%# Eval("MeritGuideline") %>'  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Width="50px"></asp:Label></td>--%>
                                                             </tr>
                                                         </table>
                                                     </ItemTemplate>
                                                  
                                                     <HeaderStyle BackColor="#92B4E1" HorizontalAlign="Center" ForeColor="White"  Width ="70px"/>
                                                                <ItemStyle Width ="70px"  />
                                                 </radG:GridTemplateColumn>
            
                                         
                                                <radG:GridTemplateColumn DataType="System.Decimal" UniqueName="RecommendationTemplateColumn">
                                                     <HeaderTemplate>
                                                         <table id="tblManagerDiscretion" runat="server" cellpadding="0" cellspacing="0">
                                                             <tr>
                                                             <td id="tdManager" runat="server" colspan="2" align="center" style ="width:130px;">
                                                                     <asp:Label ID="lblpctincrease" runat="server" Text="Merit Increase" Style="text-align: center;"
                                                                         SkinID="ModelGridHeadLabel"></asp:Label></td>
                                                                 <td id="Td8" align="Center" runat="server" visible="true" style =" width :80px;">
                                                                     <asp:Label ID="lblbonusguideline" runat="server" Visible="true" Text="Bonus Guideline"
                                                                         Style="text-align: center;" SkinID="ModelGridHeadLabel"></asp:Label></td>
                                                                 <td id="tdbonus" runat="server" colspan="2" align="center" style ="width:140px;" >
                                                                     <asp:Label ID="lblpctbonus" runat="server" Text="Bonus Discretion" Style="text-align: center;"
                                                                         SkinID="ModelGridHeadLabel"></asp:Label></td>
                                                             </tr>
                                                             <tr>
                                                                 <td id="Td7" align="center" style="width: 50px;" runat="server" visible="true">
                                                                     <font color="white"><b>%</b></font></td>
                                                                 <td id="Td4" align="center" style="width: 80px;" runat="server" visible="true">
                                                                     <asp:Label runat="server" ID="lblUSD2" Text="$" ForeColor="white"></asp:Label></td>
                                                                 <td id="tdbonguid" runat="server" align="center" style="width: 50px;">
                                                                     <font color="white"><b>%</b></font>
                                                                 </td>
                                                                 <td id="Td9" align="center" runat="server" visible="true" style="width: 50px;">
                                                                     <font color="white"><b>%</b></font></td>
                                                                 <td id="Td10" align="center" runat="server" visible="true" style="width: 80px;">
                                                                     <asp:Label runat="server" ID="lblUSDBonus" Text="$" ForeColor="white"></asp:Label></td>
                                                                 <%-- <td id="Td5" align="center"  runat="server"  visible="True"><asp:Label runat="server" ID="lblUSD1" Text="USD" ForeColor="white"></asp:Label></td>--%>
                                                             </tr>
                                                         </table>
                                                     </HeaderTemplate>
                                                     <ItemTemplate>
                                                         <table id="tblitem" runat="server" cellpadding="0" cellspacing="0">
                                                             <tr>
                                                                                                                 
                                                               <td align="center" style="width: 50px; border-width: 0px;">
                                                                     <asp:TextBox TabIndex="1" AutoPostBack="false" ID="txtpctincrease" runat="server"
                                                                         Text='<%# Eval("Incr_PCT") %>' Width="40px" Height="13px" Font-Size="11px" Font-Names="Ariel"  ToolTip='<%# Eval("EmployeeName") %>'
                                                                          Visible="True" Font-Bold="true" Style="border-style: groove;" ></asp:TextBox>
                                                                     <asp:Label ID="lblpctincrease" runat="server" Width="50px" Text='<%# Eval("Incr_PCT")%>'  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Height="13px" Font-Size="11px" Font-Names="Ariel" Wrap="True" Visible="True"
                                                                         Font-Bold="true"></asp:Label>
                                                                     <asp:TextBox AutoPostBack="false" TabIndex="1" ID="txtpctincreaselocal" runat="server"
                                                                         Text='<%# Eval("Incr_PCT") %>' Width="40px" Height="13px" Font-Size="11px" Font-Names="Ariel"  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Wrap="True" Visible="false" Font-Bold="true" Style="border-style: groove;"></asp:TextBox>
                                                                </td>
                                                                 <td align="center" style="width: 80px; border-width: 0px;">
                                                                     <asp:TextBox AutoPostBack="false" TabIndex="2" ID="txtincrease" runat="server" Text='<%# Eval("Incr_Amt_USD") %>'  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Width="60px" Height="13px" Font-Size="11px" Font-Names="Ariel" Wrap="True" Visible="True"
                                                                         Font-Bold="true" Style="border-style: groove;" ></asp:TextBox>
                                                                     <asp:Label ID="lblincrease" runat="server" Width="60px" Text='<%# Eval("Incr_Amt_USD","{0: #,##}")%>'  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Height="13px" Font-Size="11px" Font-Names="Ariel" Wrap="True" Visible="True"
                                                                         Font-Bold="true"></asp:Label>
                                                                     <asp:TextBox AutoPostBack="false" TabIndex="2" ID="txtincreaselocal" Visible="false"
                                                                         runat="server" Text='<%# Eval("Incr_Amt_LOCAL","{0: #,##}") %>' Width="60px"  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Height="13px" Font-Size="11px" Font-Names="Ariel" Wrap="True" Font-Bold="true"
                                                                         Style="border-style: groove;"></asp:TextBox>
                                                                     <asp:Label ID="lblincreaselocal" runat="server" Width="60px" Text='<%# Eval("Incr_Amt_LOCAL","{0: #,##}")%>'  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Height="13px" Font-Size="11px" Font-Names="Ariel" Wrap="True" Visible="false"
                                                                         Font-Bold="true"></asp:Label>
                                                              </td>
                                                          
                                                                 <td id="tdbonusguideline" runat="server" align="left" style="width: 80px; border-width: 0px;
                                                                     text-align: center;">
                                                                     <asp:Label ID="txtbonusguideline" runat="server" Text='<%# Eval("BonusGuideline") %>'  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Width="80px" ></asp:Label>
                                                                 </td>
                                                                 <td id="tdpctbonus" runat="server" align="center" style="width: 50px; border-width: 0px;">
                                                                     <asp:TextBox AutoPostBack="false" TabIndex="1" ID="txtpctBonus" runat="server" Text='<%# Eval("Bonus_PCT")%>'  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Width="40px" Height="13px" Font-Size="11px" Font-Names="Ariel" Wrap="True" Font-Bold="true"
                                                                         Style="border-style: groove;"></asp:TextBox>
                                                                     <asp:TextBox AutoPostBack="false" TabIndex="1" ID="txtpctBonuslocal" Visible="false"
                                                                         runat="server" Text='<%# Eval("Bonus_PCT") %>' Width="40px" Height="13px" Font-Size="11px"  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Font-Names="Ariel" Wrap="True" Font-Bold="true" Style="border-style: groove;"></asp:TextBox>
                                                                 </td>
                                                                 <td id="tdbonus" runat="server" align="center" style="width: 90px; border-width: 0px;">
                                                                     <asp:TextBox AutoPostBack="false" TabIndex="2" ID="txtbonus" runat="server" Text='<%# Eval("Bonus_Amt_USD","{0: #,##}")%>'  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Width="40px" Height="13px" Font-Size="11px" Font-Names="Ariel" Wrap="True" Font-Bold="true"
                                                                         Style="border-style: groove;"></asp:TextBox>
                                                                     <asp:TextBox AutoPostBack="false" TabIndex="2" ID="txtbonuslocal" runat="server"
                                                                         Visible="false" Text='<%# Eval("Bonus_Amt_LOCAL","{0: #,##}")%>' Width="40px"  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Height="13px" Font-Size="11px" Font-Names="Ariel" Wrap="True" Font-Bold="true"
                                                                         Style="border-style: groove;"></asp:TextBox>
                                                                 </td>
                                                             </tr>
                                                         </table>
                                                     </ItemTemplate>
                                                     <FooterTemplate>
                                                         <table id="tblfootincrease" runat="server" cellpadding="0" cellspacing="0">
                                                             <tr>
                                                                 <td align="left" style="width: 80px; border-width: 0px;">
                                                                     <asp:Label runat="server" Visible="false" ID="foopctincrease" Style="text-align: right;" Text="0"></asp:Label>
                                                                    
                                                                 </td>
                                                                 <td align="left" style="width: 80px; border-width: 0px;">
                                                                     <asp:Label runat="server" Visible="false"  ID="fooincrease" Text="0" Style="text-align: center;"></asp:Label>
                                                                    
                                                                 </td>
                                                                 <td id="tdftrguideline" runat="server" align="left" style="width: 50px; border-width: 0px;">
                                                                     <asp:Label ID="foobonusguideline" Visible="false"  runat="server" Text="0" Style="text-align: center;"></asp:Label></td>
                                                                 <td id="tdftrpctbonus" runat="server" align="left" style="border-width: 0px; width: 50px;">
                                                                     <asp:Label runat="server" ID="foopctbonus" Visible="false"  Text="0" Style="text-align: center;"></asp:Label>
                                                                 </td>
                                                                 <td id="tdftrbonus" runat="server" align="left" style="border-width: 0px; width: 80px;">
                                                                     <asp:Label runat="server" ID="foobonus" Visible="false"  Text="0" Style="text-align: center;"></asp:Label>
                                                                 </td>
                                                             </tr>
                                                         </table>
                                                     </FooterTemplate>
                                                     <HeaderStyle BackColor="#829FC9"  />
                                                     <FooterStyle BackColor="#E8E8E8" />
                                                  
                                                 </radG:GridTemplateColumn>
                                              
                                             
                                                 <radG:GridTemplateColumn UniqueName="MemoTemplateColumn" Groupable="False" Visible="false">
                                                     <ItemTemplate>
                                                         <table visible="false">
                                                             <tr>
                                                                 <td align="center">
                                                                     <asp:Label ID="lblxchange" runat="server" Visible="false" Text='<%# Eval("salaryrate") %>'  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Style="text-align: center;"></asp:Label>
                                                                          <asp:Label ID="lblbonusrate" runat="server" Visible="false" Text='<%# Eval("bonusrate") %>'  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Style="text-align: center;"></asp:Label>
                                                            
                                                                 </td>
                                                                 <td align="center">
                                                                     <asp:Label ID="lblcurrencycode" runat="server" Visible="false" Text='<%# Eval("location") %>'  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Style="text-align: center;"></asp:Label>
                                                                     <asp:Label ID="lblcountry" runat="server" Visible="false" Text='<%# Eval("Location") %>'  ToolTip='<%# Eval("EmployeeName") %>'
                                                                         Style="text-align: center;"></asp:Label>
                                                                 </td>
                                                             </tr>
                                                         </table>
                                                     </ItemTemplate>
                                                 </radG:GridTemplateColumn>
                                                                                            
                                                
                                                    <radG:GridTemplateColumn UniqueName="HistoryTemplateColumn" Groupable="False">
                                                     <HeaderTemplate>
                                                      <table>
                                                       <tr>
                                                       <td style ="width :100px;border-width: 0px;">
                                                         <asp:Label ID="lblhistory" Text="History " SkinID="ModelGridHeadLabel" runat="server"></asp:Label>
                                                         </td>
                                                         </tr>
                                                         </table>
                                                     </HeaderTemplate>
                                                     <ItemTemplate>
                                                     <table>
                                                       <tr>
                                                       <td style ="width :100px;border-width: 0px;">
                                                      <asp:Label ID="Historylabel" Visible="false" runat="server" Text='<%# Eval("comment") %>' 
                                                             Style="border-width: 0px; border: 0px;"></asp:Label>
                                                        
                                                         <asp:Label ID="label4" runat="server" Text="" Visible="true" Style="border: 0px;"></asp:Label>
                                                         <asp:HyperLink ID="HistoryLink"  Height="22" runat="server" ToolTip='<%# Eval("EmployeeName") %>'  Text="History"></asp:HyperLink>
                                                 </td>
                                                  </tr>
                                                  </table>
                                                     </ItemTemplate>   
                                                     <EditItemTemplate>
                                                     <table>
                                                       <tr>
                                                       <td style ="width :100px;border-width: 0px;">
                                                          <radE:RadEditor ID="REditornotes" TabIndex="0" ToolsFile="~/RadControls/Editor/AjaxSpell.xml"
                                                                 ShowSubmitCancelButtons="False" runat="server" Height="100px" Html='<%# Eval("locationcode") %>'>
                                                             </radE:RadEditor>
                                                             </td>
                                                             </tr>
                                                             </table>
                                                         </EditItemTemplate>
                                                         <HeaderStyle BackColor="#829FC9" Width="100px" />
                                                       
                                                         <ItemStyle BorderWidth="0px" Width ="100px" />
                                                   
                                                     </radG:GridTemplateColumn>
                                             </Columns>
                                             <ExpandCollapseColumn Visible="False">
                                                 <HeaderStyle Width="19px" />
                                             </ExpandCollapseColumn>
                                             <RowIndicatorColumn Visible="False">
                                                 <HeaderStyle Width="20px" />
                                             </RowIndicatorColumn>
                                             <EditFormSettings>
                                                 <EditColumn UniqueName="EditCommandColumn1">
                                                 </EditColumn>
                                             </EditFormSettings>
                                         </MasterTableView>
                                       
                                      <ClientSettings >
                                              <Scrolling AllowScroll="True" ScrollHeight="250px" SaveScrollPosition ="true" UseStaticHeaders="True" />
                                              <Selecting AllowRowSelect="True"  />
                                            <%--  <ClientEvents OnGridCreated="fn_GridCreated"/>--%>

                                         </ClientSettings>
                              
           
<PagerStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                                             Font-Underline="False" HorizontalAlign="Left" Mode="NextPrevAndNumeric" Wrap="True"
                                             AlwaysVisible="True" />
                                         <HeaderStyle Wrap="True" />
                                     </radG:RadGrid>
                             


1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 15 May 2009, 06:37 AM
Hello naveen,

From the code snippets you provided I suppose that you are using the ASP.NET version of the grid - is this information correct? If so, can you please verify that you are using the latest version 5.16 of the product in your project? There was similar issue reported before which should be addressed in the latest version.

Additionally, I see that you applied a custom skin for the grid (named "WebGrid20") - is it possible that this is related somehow to the issue as well? Can you please check whether using the Default or one of the other grid skins shipped with the installation eliminates the issue? Let me know what your findings are.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
naveen veda
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or