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

RAD Grid Iteration in Javascript not working with Firefox

3 Answers 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sanjeev
Top achievements
Rank 1
Sanjeev asked on 20 Oct 2011, 06:49 AM
Hi, 
I am trying to get cell value in javascript and is working fine with IE but not with Firefox (7.0.1).
On error console 

Error: Components.classes['@mozilla.org/extensions/manager;1'] is undefined
Source File: chrome://jqs/content/overlay.js

Error: masterTable.getCellByColumnUniqueName(masterTable.get_dataItems()[row], "Detail").all is undefined


Here is Template for Grid
       <telerik:GridTemplateColumn UniqueName="Detail" HeaderText="Detail" HeaderStyle-Width="245"
                                        ItemStyle-Width="245">
                                        <ItemTemplate>
                                            <asp:TextBox ID="txtDetail" CssClass="textfield" Width="245" Text='<%#Eval("Detail") %>'
                                                MaxLength="100" runat="server"></asp:TextBox>
                                        </ItemTemplate>
                                    </telerik:GridTemplateColumn>



My JavaScript code is:- 
 var master = $find("<%=gvCommunication.ClientID %>").get_masterTableView();
            var row = master.get_dataItems()[0];          
            alert(master.getCellByColumnUniqueName(row, "Detail").all[0].value);

Its working fine up to getting row but in getting cell value it shows error. Here I would like to mention also 'debugger;' not working while I'm working in debug mode. Is there something wrong with firefox settings.

Please help.

Thanks,
Sanjiv



3 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 1
answered on 20 Oct 2011, 07:21 AM
Hello Sanjiv,

Try the following javascript to access the TextBox in TemplateColumn.
Javascript:
<script type="text/javascript">
function OnRowSelecting(sender,args)
{
 var grid = sender;
 var masterTable = grid.get_masterTableView();
 var row = masterTable.get_dataItems();
 for (var i = 0; i < rows.length; i++)
 {
  var txtbox = rows[i].findElement('txtDetail');
   alert(txtbox.value);
 }
}
</script>

Make sure that you have enabled script debugging in browser settings for debug mode.

Thanks,
Princy.
0
Sanjeev
Top achievements
Rank 1
answered on 20 Oct 2011, 07:55 AM
Hi Princy,

Thanks a lot for your interest and reply.
Problem resolved but still 'debugger;' not working in firefox.

By the way, I'm happy n thanks once again
Thanks,
Sanjiv
0
Ravi
Top achievements
Rank 1
answered on 07 Mar 2017, 04:19 AM

Hi Sanjeev,

same prblm here. can u tell me how u resolved this prblm.

Tags
Grid
Asked by
Sanjeev
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Sanjeev
Top achievements
Rank 1
Ravi
Top achievements
Rank 1
Share this question
or