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

Grid For ASP.NET AJAX Performance Issue

9 Answers 133 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Acadia
Top achievements
Rank 1
Iron
Acadia asked on 14 Aug 2008, 01:21 PM
I recently converted from the classic Rad Grid to the new Rad Grid for Ajax.  For some reason I've lost the ability to open a rad window from a link button in my grid.  This rad window was working fine before I converted to the new grid for ajax.  Now it just doesn't open the rad window.  The code is hit and there aren't any errors the window just doesn't open.  I can open a Rad Window from other controls on the page, just not the grid.

I also need to mention that for some reason the initial load of the screen which has basically nothing but the new grid on it is very slow.  This was not the case with the classic grid the screen loaded instantly, but now it takes 10 seconds just to display the page - and that's with an empty grid.

Has anyone experienced anything similar?  Is there something different that needs to be done for the new grid to open a Rad Window?

Here is my code for attempting to open my rad window from my ajax grid:

<telerik:RadAjaxManager ID="ram1" runat="server">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="rgT"> rgT is my new grid

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="txW"></telerik:AjaxUpdatedControl>

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">

<Windows>

<telerik:RadWindow ID="txW" runat="server" style="display:none;" Behavior="Default" Height="300px" InitialBehavior="None" Left="" Modal="True" NavigateUrl="PurchaseCardUseTax.aspx" OpenerElementID="rgT" Skin="WebBlue" Top="" Width="400px" Title="Use Tax">

</telerik:RadWindow>

</Windows>

</telerik:RadWindowManager>


This is the link buttonj from my grid which calls the vb.net sub to open the window:

<telerik:GridTemplateColumn DataField="USE_TAX_AMT" HeaderText="Use Tax" UniqueName="USE_TAX_AMT"

AllowFiltering="False">

<HeaderStyle HorizontalAlign="Left" Width="45px" Wrap="False" />

<ItemStyle HorizontalAlign="Right" Width="45px" Wrap="False" />

<ItemTemplate>

<asp:LinkButton ID="lbUseTax" runat="server" Width="45px" CssClass="Normal" OnCommand="useTaxClick"

ToolTip="Click to edit use Tax" Text='<%#DataBinder.Eval(Container, "DataItem.USE_TAX_AMT") %>'></asp:LinkButton>

</ItemTemplate>

</telerik:GridTemplateColumn>


Here is my vb.net sub that opens the window:

Public

Sub useTaxClick(ByVal sender As Object, ByVal e As CommandEventArgs)

'Open up the rad window that allows editing of the Use Tax

txW.Behaviors = WindowBehaviors.Close

Or WindowBehaviors.Move

txW.NavigateUrl =

"MyWindow.aspx"

txW.VisibleOnPageLoad =

True

End Sub


Any help would be greatly appreciated.


**Also, there is a bug in the RadWindowManager designer as far as I can tell.  If you follow the steps in the Telerik online example http://www.telerik.com/help/aspnet-ajax/window_gettingstarted.html the window does not actually get added.  You need to manually drag the <Windows></Windows> tags onto your asp code  between the radwindowmanager tags first and then you can add windows via the windows manager.  Otherwsise it appears as though you are adding them but they dissappear when you leave and come back into the windows collection of the windows manager.  My co-worker reproduced this problem.  If you come back into the radwindowmanager and try to add that same window (same ID) it tells you that the window already exists.  Anyways, check it out and hopefully you can reproduce this



Thanks

9 Answers, 1 is accepted

Sort by
0
Acadia
Top achievements
Rank 1
Iron
answered on 14 Aug 2008, 06:54 PM
Please ignore the performance issue it was an oddity that seems to have cleared itself up.  I still have an issue with opening a rad window from a grid link button however.  Any help on that would be appreciated.

Thanks!
0
Georgi Tunev
Telerik team
answered on 15 Aug 2008, 03:35 PM
Hello Acadia,

We are familiar with the Design-Time problem in Visual Studio and we will fix them in one of the following updates. Regarding the initial problem with opening the RadWindow, the part of the code that you posted seems fine and should be working as expected.

Could you please open a support ticket and send us a small sample project where we can reproduce the problem that you experience? We will check it and get back to you with a solution right away.



Regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Acadia
Top achievements
Rank 1
Iron
answered on 19 Aug 2008, 04:31 PM
Yeah it was working until I upgraded the grid so it's really strange.  I've been struggling with this for a couple of days and still can't get a window to open when i click the link button in the grid.  I take it through the debugger and the code is hit without error, the rad window is legitimate and the properties of the window are all correct (visibilities, etc) but there  is no reaction on the front end.

Not sure if I can put together a smaple project or not but I'll try.  If you think of anything else just please give me a heads up.

Thanks

Here is my up-to-date code for reference as I've made a few changes:

<telerik:GridTemplateColumn DataField="SUBS" HeaderText="Subs" UniqueName="SUBS"

AllowFiltering="False">

<HeaderStyle HorizontalAlign="Left" Width="36px" Wrap="False" />

<ItemStyle HorizontalAlign="Right" Width="36px" Wrap="False" />

<ItemTemplate>

<asp:LinkButton ID="lbSubs" runat="server" Width="36px" CssClass="Normal" OnCommand="subsClick"

ToolTip="Click to edit sub transactions" Text='<%#IIF(DataBinder.Eval(Container, "DataItem.SUBSCOUNT") is Nothing, "", DataBinder.Eval(Container, "DataItem.SUBSCOUNT")) %>'></asp:LinkButton>

</ItemTemplate>

</telerik:GridTemplateColumn>

----------------------------------------------------------------------------------------

<

telerik:RadAjaxManager ID="ram1" runat="server">

<AjaxSettings>

<telerik:AjaxSetting AjaxControlID="rcCn">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="rgT"></telerik:AjaxUpdatedControl>

</UpdatedControls>

</telerik:AjaxSetting>

<telerik:AjaxSetting AjaxControlID="btnUA">

<UpdatedControls>

<telerik:AjaxUpdatedControl ControlID="rgT"></telerik:AjaxUpdatedControl>

</UpdatedControls>

</telerik:AjaxSetting>

</AjaxSettings>

</telerik:RadAjaxManager>

---------------------------------------------------------------------------------------------------

<
telerik:RadWindowManager ID="RadWindowManager1" runat="server">

<Windows>

<telerik:RadWindow ID="stW" runat="server" Style="display: none;" Behavior="None"

Height="350px" ClientCallBackFunction="CallBackFunction" Left="" Modal="True"

NavigateUrl="" Skin="WebBlue" Top="" Width="450px"

Title="Sub Transactions">

</telerik:RadWindow>

</Windows>

</telerik:RadWindowManager>

---------------------------------------------------------------------------------------------

Public Sub subsClick(ByVal sender As Object, ByVal e As CommandEventArgs)

'Open up the rad window that allows creation and editing of sub transactions

RadWindowManager1.Windows(2).Behaviors = WindowBehaviors.Close

Or WindowBehaviors.Move

RadWindowManager1.Windows(2).NavigateUrl =

"PurchaseCardSubTrans.aspx"

RadWindowManager1.Windows(2).VisibleOnPageLoad =

True

End Sub

0
Acadia
Top achievements
Rank 1
Iron
answered on 19 Aug 2008, 06:30 PM
I would like Telerik to please provide me with an example on how to open a simple rad window by clicking an asp.net link button in the new Rad Grid.

I've tried everything and it's not happening.  As I said, worked fine before I upgraded to the new grid.  And I have no problems opening a rad window when I click a button outside of the grid.  I've simply wasted too much time so apparently there is something I don't know about how this works.

Edit:  I'm referring to an example showing how to open the window with VB.NET server-side code not javascript.

Thank You
0
Georgi Tunev
Telerik team
answered on 20 Aug 2008, 12:56 PM
Hello Acadia,

I attached to this thread a small sample that uses the NorthWind mdb and shows 2 different approaches to open a RadWindow from the codebehind when clicking on an asp:linkbutton control. The first one is pretty standard - you just need to hook to the button's onclick event. The second approach uses RadGrid's ItemCommand and opens different windows depending on the text in the first bound column.

I hope this helps.

Regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Acadia
Top achievements
Rank 1
Iron
answered on 20 Aug 2008, 01:06 PM
Thank you for the example.  I will try that and see if it works in my project.  I did notice however that you are not using a rad window manager (which I am), and the only other difference is that my grid is within a content form.

I'll get back to you with my results.

Thanks!
0
Acadia
Top achievements
Rank 1
Iron
answered on 20 Aug 2008, 03:26 PM
I followed the example exactly and my rad window still does not open.  I even used the google website just to eliminate the possibility it was the aspx page I was trying to open in the rad window but still I get no rad window.  Is it possible that it's not working because I am using a content page?  I have no form so I substituted with 

Master.Controls.Add(newWindow)

I don't know how relevant that line of code is to actually opening the window but thought I would mention it.  It just seems strange to me that the example seems so simple yet it doesn't work for me when I implement it identically.  And why did it work fine with the old grid but not with the new grid?

Please inform me on exactly what needs to be done (minimally) to create a sample project for the support team and I will try to do this but it is time consuming to create these sample projects when already knee deep into an application.

Thanks

0
Accepted
Georgi Tunev
Telerik team
answered on 21 Aug 2008, 11:25 AM
Hello Acadia,

If you are using a MasterPage, you can put an asp:PlaceHolder control on your content page (or where you want your RadWindow to be) and add the window control there. It doesn't matter if it is a RadWindow or a RadWindowManager - the logic stays the same - the control must be added in the page's form.

If you still experience problems, send us your implementation so we can check it. The project must represent your setup and the way you wish to use the RadWindow(Manager) - once we have a better view over your case, we can provide you with the appropriate solution.



Best wishes,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Acadia
Top achievements
Rank 1
Iron
answered on 21 Aug 2008, 09:42 PM
I got it.  I had to use 

Master.Page.Form.Controls.Add(newWindow)

Thanks!

Tags
Grid
Asked by
Acadia
Top achievements
Rank 1
Iron
Answers by
Acadia
Top achievements
Rank 1
Iron
Georgi Tunev
Telerik team
Share this question
or