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

[Solved] Microsoft JScript runtime error: Object doesn't support this property or method

1 Answer 136 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vinix
Top achievements
Rank 1
Vinix asked on 29 Apr 2008, 03:47 AM

I have a GridTemplateColumn like following.

When I click the first edit image button, it work fine, but when I click the second one, it alert an error message,” Microsoft JScript runtime error: Object doesn't support this property or method.”

How to solve this problem?

Many thanks for your helping.

function EditCategory()
{
 var grid = $find("<%=RadGrid_Category.ClientID %>");
 var MasterTable = grid.get_masterTableView();

 var selectedRows = MasterTable.get_selectedItems();
 for (var i = 0; i < selectedRows.length; i++)
 {
  var row = selectedRows[i];
  var cell = MasterTable.getCellByColumnUniqueName(row, "CategoryID");
  var CategoryID= cell.innerHTML; //holds the value of the cell
 }

 window.radopen("EditCategory.aspx?
 CategoryId="+CategoryID, "EditCategory");   
}

<telerik:GridTemplateColumn HeaderText="Edit"  
 UniqueName="TemplateColumn">
 <ItemTemplate>
  <asp:ImageButton ID="ImageButton_Edit" runat="server"
  OnClientClick="EditCategory(); return false;"
  ImageUrl="/EditorPr.gif" />
 </ItemTemplate>
</telerik:GridTemplateColumn>

1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 29 Apr 2008, 02:13 PM
Hello Liu Pei-Sen,

Based on the information supplied, it is hard to determine the cause of the problem. I would suggest that you open a formal support ticket, and send us a small working project, which would allow us to trace the problem locally. As soon as we do, we will get back to you with our findings.

Best wishes,
Yavor
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Vinix
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or