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

Bug with the script

4 Answers 90 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Pradeep
Top achievements
Rank 1
Pradeep asked on 21 Oct 2008, 05:40 AM
Hi,

I'm using an ImageButton to traverse to other pages using a RadGrid. Here is the aspx code.

<

asp:ImageButton ID="Button1" runat="server" ImageUrl="~/images/first.gif" OnClientClick="changePage('first'); return false;" CommandName="Page" CommandArgument="First" />

 

And the associated code in JavaScript is as follows:

function

changePage(argument)
{
tableView.page(argument);
}

 

But it the error "Microsoft JScript runtime error: Object doesn't support this property or method" at the JavaScript code.

Anyone help me please.

Thank You,
Pradeep

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 21 Oct 2008, 06:24 AM
Hello Pradeep,

Can you show us where the tableView variable is initialized? You can check our online example for more info:
http://demos.telerik.com/aspnet/Prometheus/Grid/Examples/Programming/PagerTemplate/DefaultCS.aspx

Regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Pradeep
Top achievements
Rank 1
answered on 21 Oct 2008, 06:31 AM
Hi,

I have used the same example.
Here is my code, which I modified :


var tableView = null;
function pageLoad(sender, args)
{
tableView = $find(
"<%= rgParentFeeInfo.ClientID %>");
if(tableView != null)
{
tableView = tableView.get_masterTableView();
}
}
function RadComboBox1_SelectedIndexChanged(sender, args)
{
tableView.set_pageSize(sender.getValue());
}
function RadNumericTextBox1_ValueChanged(sender, args)
{
tableView.page(RadNumericTextBox1.getValue());
}
function changePage(argument)
{
tableView.page(argument);
}


All the above functions shows the same bug.

Thanks,
Pradeep
0
Vlad
Telerik team
answered on 21 Oct 2008, 06:39 AM
Hi Pradeep,

Do you have RadScriptBlock like in our example?

Kind regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Pradeep
Top achievements
Rank 1
answered on 21 Oct 2008, 06:49 AM
Hi,

I had not put the script inside the RadScriptBlock. So is that the problem?

Thanks,
Pradeep
Tags
General Discussions
Asked by
Pradeep
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Pradeep
Top achievements
Rank 1
Share this question
or