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

Client side seems broken

23 Answers 190 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rich
Top achievements
Rank 1
Rich asked on 13 Apr 2008, 04:54 AM
I'm pretty new to Telerik, so I'm sure I've done something wrong here, but...

I can get the grid to work in my app. Examples of client side failure include no response when I mouse over a row and No postback on a row click. Strange thing is that paging seems to be working.

I've tried and failed at reproducing this behavior in a sample app. Could it be that I've added the script manager to the master page & not the child page? Does it need to be added to both? Is this a scripting failure or am I unable to figure out how to set the "react to a mouse over" setting?

My goal is pretty simple: Display a list of names & do an Ajax update in response to clicking on a row. I've reproduced this goal in the sample app, but can't get the real app to react to client side actions. Without the mouise over feedback the client will not know they can click on the row.

23 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 14 Apr 2008, 11:38 AM
Hi Rich,

Unfortunately the provided information is not enough to conclude what is causing the issue on your end.  Can you open a support ticket and send us the erroneous page/problem? What Skin are you using and how do you handle the ajaxification? Any additional information would be appreciated.

Regards,
Steve
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rich
Top achievements
Rank 1
answered on 15 Apr 2008, 11:28 PM
Have not been able to isolate the problem yet. I did notice that I recieve a JavaScript error when I double click a row:

Line: 11076
Char: 1
Error: 'this._tableView._owner' is null or not an object
Code: 0

So far I have tried these approaches to narrow down the problem:
- Tried binding different types of data (database, linq, custom objects), and using different types of fields. Result: No change; probably not related to data binding
- Tried different skins: Default, Web20, Mac. Result: No change (fails the same on all skins); probably not related to skin
- Tried it on a different page. Result: When I don't use the master page it works fine. I also don't get the above JavaScript error. When I use it on a page that uses a Master page it fails. Even created a super-simple throw away master. Still fails.

I'm stumped. It looks like it's related to using a master page, but when I try to create a sample project to upload I can't get it to fail (even with a Master page).
0
Konstantin Petkov
Telerik team
answered on 16 Apr 2008, 02:45 PM
Hi Rich,

I remember I've seen the error before. Here is what a quick search results in:

http://www.telerik.com/community/forums/thread/b311D-bbctak.aspx

Can you please check if this is the same issue there? If that does not help, please post the Grid markup so that we can try to reproduce the error as well.

Best wishes,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rich
Top achievements
Rank 1
answered on 16 Apr 2008, 05:16 PM
Hmmm... That wasn't it. I've been able to reproduce the problem in a project that has been submitted as part of support ticket (#132447).
0
Konstantin Petkov
Telerik team
answered on 17 Apr 2008, 01:52 PM
Hello Rich,

It looks like the error is caused by the leading underscore of the Grid control ID when placed in content page of MasterPage. I have notified our developers and it will be fixed for the next update. You can change the ID meanwhile.

Sincerely yours,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
gerry
Top achievements
Rank 1
answered on 27 Sep 2008, 10:49 PM
Is this still not fixed in the latest version (August 2008)?

I am using a grid on a master page and am getting the same error:

Error: 'this._tableView._owner' is null or not an object

Gerry
0
Pavel
Telerik team
answered on 30 Sep 2008, 07:19 AM
Hi Gerry,

Could you please elaborate on the exact scenario in which this error is observed? If you find it appropriate you can open a support ticket and attach to it a small runnable sample that illustrates the erroneous behavior.

Sincerely yours,
Pavel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
gerry
Top achievements
Rank 1
answered on 30 Sep 2008, 02:12 PM
Pavel,

The scenario is this: master page with telerik grid in content page.  master page also uses telerik radpanel control.

I'm trying to use client side key data values but it appears that they do not work in this scenario due to the script error mentioned above.

Gerry
0
gerry
Top achievements
Rank 1
answered on 02 Oct 2008, 12:46 AM
The response time on this is killing me--I first reported this on Sunday 9/27 and i've gotten one response.

Pavel--are you able to reproduce this bug?

Gerry
0
Pavel
Telerik team
answered on 02 Oct 2008, 05:37 AM
Hello Gerry,

The provided information is still insufficient for us to determine what is causing the error on your end. Can you paste some of your markup and code so that we get better idea of the scenario?

Also please note that the forum tickets reply time is 72 hours. For additional information I suggest you to read the following forum thread.

Sincerely yours,
Pavel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
mjones
Top achievements
Rank 1
answered on 02 Oct 2008, 10:51 AM
Gerry,

Please see my post here.  If you are experiencing the same issue, the cause could be that either your grid's ID starts with an underscore, or any of the parent control's ID starts with an underscore.  Parent controls can be the Master Page's ContentPlaceHolder or any control which the grid is nested inside.

As you saw on this thread, Telerik says that the issue will be fixed.  But when I submitted a bug report, with a complete patch of the source, they responded that the problem was too hard to fix.

I recommend changing your IDs to not start with underscores.

Good luck,

Matt
0
gerry
Top achievements
Rank 1
answered on 06 Oct 2008, 05:47 AM
Matt,

At first glance I didn't think your problem applied to mine but after further checking I think that it does.  I have a grid in a content page of a master page.  In inspecting the generated HTML (view source) I see this is what is being generated for a grid with the name rgFields:

 <div id="_ctl0_cpMain_rgFields" class="RadGrid RadGrid_Office2007" style="height:369px;width:738px;">
...

So you can see that the master page/content page results in a name with an _ in it which is the crux of the problem.  I do not know of an easy way to work around this.  Do you?

Thanks,
Gerry
0
gerry
Top achievements
Rank 1
answered on 06 Oct 2008, 06:04 AM
I figured out that I could set the Master page id (e.g. this.ID = "someid") and that removed the initial underscore.  Here is the generated HTML now:

 <div id="ProgramViewMasterPageID_cpMain_rgFields" class="RadGrid RadGrid_Office2007" style="height:369px;width:738px;">


However, I still get the script error when I double click on the grid--the following output from Firefox firebug:

this._tableView._owner is undefined

if(this._tableView&&this._tableView._own...KeyValues[this._itemIndexHierarchical]){

From the line of the error this._tableView is ok but this._tableView._owner is not.  The source of the script is doing this:

this._tableView=$find(this._id.split("__")[0]);

Any ideas now why this._tableView._owner is undefined?

Thanks,
Gerry
0
gerry
Top achievements
Rank 1
answered on 06 Oct 2008, 06:15 AM
A little more info.  In looking at the generated name for each row you see that they are like so:

<tr class="GridRow_Office2007" id="ProgramViewMasterPageID_cpMain_rgFields__ctl0__0">

<tr class="GridRow_Office2007" id="ProgramViewMasterPageID_cpMain_rgFields__ctl0__1">

<tr class="GridRow_Office2007" id="ProgramViewMasterPageID_cpMain_rgFields__ctl0__2">

etc. and they have the __ as part of the row name.

Gerry
0
gerry
Top achievements
Rank 1
answered on 06 Oct 2008, 05:59 PM
<< figured out that I could set the Master page id (e.g. this.ID = "someid") and that removed the initial underscore. >>

Actually setting the master page id broke a bunch of stuff with postback and so that approach doesn't work.  When I set the id like that then on the ensuing postback my form variables were empty (e.g. txtInput.Text was "" and did not contain the text that was entered in the form).

Gerry
0
mjones
Top achievements
Rank 1
answered on 06 Oct 2008, 06:56 PM
Gerry,

ProgramViewMasterPageID_cpMain_rgFields__ctl0__2

In that generated ID, what is the control _ctl0?  It appears that there is a control with the id _ctl0.  Telerik's javascript can only handle the double underscore in the final position.  So I'd start by figuring out what _ctl0 is.  Or, does the id rgFields actually end with an underscore?  (rgFields_?)

You need to figure out where the extra underscore is coming from.  Maybe if you open a support ticket, they might be able to help.

Good luck,

Matt
0
gerry
Top achievements
Rank 1
answered on 06 Oct 2008, 07:15 PM
Matt,

that seemed to just be leftover artifacts from the master page's original name of _ctl0.  However, as I mentioned above it appears that I can't override the master page and so must go with the name generated.

and thus i have for the div
<div id="_ctl0_cpMain_rgFields" class="RadGrid RadGrid_Office2007" style="height:369px;width:738px;">

and 
<table class="MasterTable_Office2007" cellspacing="0" border="0" id="_ctl0_cpMain_rgFields__ctl0" style="width:100%;border-collapse:collapse;table-layout:fixed;empty-cells:show;">

and for the rows:
 <tr class="GridRow_Office2007" id="_ctl0_cpMain_rgFields__ctl0__0">
<tr class="GridAltRow_Office2007" id="_ctl0_cpMain_rgFields__ctl0__1">
<tr class="GridAltRow_Office2007" id="_ctl0_cpMain_rgFields__ctl0__2">

etc.

Would seem to be the same problem as you.

Gerry
0
Pavel
Telerik team
answered on 07 Oct 2008, 06:47 AM
Hi Gerry,

I have prepared a small sample which illustrates a scenario similar to yours. Please take a look at it and let me know how to alter it in order to reproduce the error.

Regards,
Pavel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
gerry
Top achievements
Rank 1
answered on 07 Oct 2008, 01:45 PM
Pavel,

The sample zip is missing the master page.  Although I expect that the sample will work because it will generate the controls with a $ in the name.  I did the same thing--created a sample but the sample worked but it was because for whatever reason the controls are generated with ids that begin with a $.  In my project that fails the controls all begin with _ctl.

Gerry
0
gerry
Top achievements
Rank 1
answered on 07 Oct 2008, 02:21 PM
Pavel,

Some more details.  In looking at the generated HTML for my project that works what I have is this:

<div id="ctl00_cpMain_rgFields" class="RadGrid RadGrid_Office2007" style="height:369px;width:738px;">

The controls are all prefixed with a ctl00_cpMain where cpMain is the name of the content placeholder.

Likewise, the table id is ctl00_cpMain_rgFields_ctl00 and the rows are 
ctl00_cpMain_rgFields_ctl00__0, ctl00_cpMain_rgFields_ctl00__1, etc.

However, here is the output from the project that doesn't work:

 <div id="_ctl0_cpMain_rgFields" class="RadGrid RadGrid_Office2007" style="height:369px;width:738px;">

and table id is _ctl0_cpMain_rgFields__ctl0 and the rows are
_ctl0_cpMain_rgFields__ctl0__0, _ctl0_cpMain_rgFields__ctl0__1, etc.

From what has been documented it would appear that this is a known issue and will not work; am I correct?  however, what is the work around to force asp.net to generate correct ids that will work with your grid?

I have played around with setting the master page id but it still doesn't work.  If I set Master.ID in the constructor it does change the generation slightly but there is still the __ in the name.  Here is an example:

Say I set Master.ID = "telerikbug" then what i get is:

telerikbug_cpMain_rgFields__ctl0 and the rows are
telerikbug_cpMain_rgFields__ctl0__0, telerik_cpMain_rgFields__ctl0__1, etc.

In other words it removes the initial _ but leaves in the _ctl0 at the tail end of the name.

Gerry
0
Pavel
Telerik team
answered on 08 Oct 2008, 06:11 AM
Hi Gerry,

Excuse me for omitting the MasterPage in my previous attachment. I have included it in this post.

Do you by any chance have <xhtmlConformance mode="Legacy"/> in the web.config of your problematic project? If so, please remove it. There seems to be a similar problem when using this setting as explained here. You can read more about this in the following blog post.

Hope this helps.

Best wishes,
Pavel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
gerry
Top achievements
Rank 1
answered on 08 Oct 2008, 06:33 AM
Pavel,

Thanks for the reply.  That is a good catch--yes, my site has that in there as it was originally in vs 2003, then 2005, and now in 2008.  It explains why the site is rendering as such.  I do not recall putting that setting in the file and so it must have been done by the VS conversion wizard.

I just tested the site without the setting and it is now working fine!  I will have to do some more testing to make sure everything is ok.

As a side note it might be nice if somehow Telerik were to detect that setting and issue some kind of warning.

Thanks,
Gerry
0
Pavel
Telerik team
answered on 09 Oct 2008, 06:57 AM
Hi Gerry,

Thank you for your suggestion. I am not sure whether such approach is practical, considering the number of different settings that might prevent the controls from working properly. Nevertheless I will forward the idea to our developers for consideration.

Regards,
Pavel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Rich
Top achievements
Rank 1
Answers by
Steve
Telerik team
Rich
Top achievements
Rank 1
Konstantin Petkov
Telerik team
gerry
Top achievements
Rank 1
Pavel
Telerik team
mjones
Top achievements
Rank 1
Share this question
or