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

RadWindow within RadGrid Javascript Error

4 Answers 28 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Craig Hinkel
Top achievements
Rank 1
Craig Hinkel asked on 21 Nov 2008, 03:13 PM

Hello,

I am trying to launch a RadWindow from within my radgrid using the following tutorial (Editing RadGrid Records with RadWindow) and everytime I click on my link I get a javascript 'Object does not support this property or method' error. If I add a button outside of the grid and try showing the window, everything works fine.

 

<

telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

 

 

<script type="text/javascript">

 

 

 

 

 

function ShowEditForm(url)

 

{

window.radopen(url,

null);

 

 

return false;

 

}

 

</

telerik:RadCodeBlock>

 

 

 

 

 

<telerik:GridTemplateColumn UniqueName="TemplateEditColumn">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:Button ID="Button1" runat="server" Text="xxx" OnClientClick="return ShowEditForm('www.google.com');" />

 

 

 

 

 

<asp:HyperLink ID="lnkEdit" runat="server" Text="Edit"></asp:HyperLink>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 


 

4 Answers, 1 is accepted

Sort by
0
Craig Hinkel
Top achievements
Rank 1
answered on 21 Nov 2008, 03:46 PM
Also, I wanted to mention I am using paging with the NeedDataSource event. It seems it works fine on the first page load, but not on all subsequent requests.
0
Craig Hinkel
Top achievements
Rank 1
answered on 21 Nov 2008, 03:55 PM
Also, here is what I am doing:

// so i do not load untill search is clicked.

 

protected void Page_Init(object sender, EventArgs e)

 

{

 

if (Page.IsPostBack)

 

{

grdUsers.NeedDataSource +=

new GridNeedDataSourceEventHandler(grdUsers_NeedDataSource);

 

}

}


 

protected void btnSearch_Click(object sender, EventArgs e)

 

{

grdUsers.DataSource = data;
grdUsers.Rebind();

}


 

protected void grdUsers_NeedDataSource(object source, GridNeedDataSourceEventArgs e)

 

{

grdUsers.DataSource = data;

}




0
Craig Hinkel
Top achievements
Rank 1
answered on 21 Nov 2008, 04:10 PM
Ok, I've narrowed it down to the following scenario. I have a search button on my screen and when the user clicks search, I reset the datasource and call the rebind method. after this, the window does not popup anymore.

thanks
0
Daniel
Telerik team
answered on 24 Nov 2008, 03:51 PM
Hello Craig,

It would be better if you send us your code via regular support ticket to be examined locally.

In the meantime I recommend you examine the following links
Online demo: RadGrid Window Editing
Knowledge base: Using RadWindow for editing/inserting RadGrid records

Kind regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Craig Hinkel
Top achievements
Rank 1
Answers by
Craig Hinkel
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or