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

[Solved] Grid Control for SPS 2003 and MOSS 2007

16 Answers 271 Views
RadControls
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dev
Top achievements
Rank 1
Dev asked on 13 Dec 2006, 12:05 AM

Hello,

Our client TMPDM have bought 3 licenses of telerik control.

We have tried to use Grid control in SPS2003. It is causing issue with the data source binding.

I would like to know if Grid control is compatible with SPs 2003 or Office SharePoint 2007.

If available, please send any other helping documentation / information in this regard.

I appreciate your help.

Thanks,
Dev



16 Answers, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 13 Dec 2006, 01:23 PM
Hello Dev,

The r.a.d.grid is compatible with SharePoint 2003 / 2007. There are no known SPS-specific issues so there is no special documentation. The regular r.a.d.grid documentation can be found online here.

Could you please send us additional information on the issues you are experiencing with the data binding so we can help you resolve them?

Kind regards,
Dimitar Milushev
the telerik team

0
Dev
Top achievements
Rank 1
answered on 13 Dec 2006, 10:44 PM

Hello Dimitar,

Thank you for your quick response.

Let me give other details regarding our trial and error message.

We are getting following error

Error: unable to load ~/wpresources/testTelerik.ascx
Details: The type initializer for 'Telerik.RadInputUtils.RadControl' threw an exception


Trail was as follows

We wanted to use RAD control in a web part for share point. We are using Smarpart 1.1.0.0 to achive this. Smart part is a wrapper SharePoint Webpart that can host any ASP.NET user control.

Details from my colleague are as follows

I’m using SmartPart 1.1.0.0 to host the user control (ASCX file). My example ASCX is minimal – it only has a R.A.D. Date Input control in it. I wanted to see if I could get the RAD Controls to work at all before trying to use them with a datasource. I have the RadControlDir set to “~/_layouts/RadControls” on the control itself. I placed the resulting DLL into the root Bin folder and the ASCX file into the ‘wpresources’ folder.


Could you please provide some insight into this issue?
0
Dimitar Milushev
Telerik team
answered on 14 Dec 2006, 03:36 PM
Hello Dev,

I made a simple test with RadInput and SmartPart 1.1.0.0 and no problems arised.

I'm attaching the .ascx used to perform the test. As you will see, it is as simple as possible. I placed it in "~/UserControls" so it could work with the SmartPart List, but I also tested it with the regular SmartPart.

The RadControlDir is set to "~/_layouts/RadControls" and the DLL file was placed in the \bin folder, similar to your case.

Please, try the attached .ascx with SmartPart and let me know if you still have problems.

Sincerely yours,
Dimitar Milushev
the telerik team
0
Ivan Stankovic
Top achievements
Rank 1
answered on 09 Jan 2007, 12:10 PM
Hello Dimitar,

I also tried using the Grid in a Sharepoint 2007 Smartpart. Your example with the input control works fine, however the grid example throws this error:

[Exception: The control must be placed inside a form tag with runat=server.]
   Telerik.RadGridUtils.RadAJAXControl.GetForm() +123
   Telerik.WebControls.GridClientSettings.get_FormID() +32


Can you tell me if there is a difference in implementation and how to solve this problem?

Thanks in advance,


Ivan
0
Dimitar Milushev
Telerik team
answered on 10 Jan 2007, 01:26 PM
Hi Ivan,

Testing a simple RadGrid in the Sharepoint 2007 Smartpart did not show any problems. I am attaching the test control for your reference.

The exception you are seeing is because the RadGrid is outside the <form runat=”server”> tag of the page. Usually WebPart Zones are inside this tag, so the SmartPart that hosts the RadGrid should be inside too.

Could it be that you have put the SmartPart outside the <form> tag using the SharePoint Designer for example? If this is the case, can you please try putting the SmartPart inside the tag and testing again?


Best wishes,
Dimitar Milushev
the telerik team
0
Ivan Stankovic
Top achievements
Rank 1
answered on 10 Jan 2007, 01:29 PM
Dimitar,

Thank you for your response. However, I am missing the attachment to your post. Can you please post the attachment for me?

Thanks in advance,


Ivan
0
Dimitar Milushev
Telerik team
answered on 10 Jan 2007, 02:36 PM
Hello Ivan,

Please excuse me for overlooking this. The file is attached now.

Sincerely yours,
Dimitar Milushev
the telerik team
0
cjenner
Top achievements
Rank 1
answered on 07 Feb 2007, 10:21 PM
I have the same issue, and your test project produce the same error:

Error: unable to load ~\/UserControls\RadGridTest.ascx
Details: The type initializer for 'Telerik.RadGridUtils.RadControl' threw an exception.

Of course the control I'm trying to test throws the exact same error.  I'm using ReturnofSmartPart v1.0.0.0.

I noticed previous threads v1.1.0.0 but I don't that works with MOSS (well mine, cause bad things happen when I try using it).

I'm not sure where to start debugging.  Thoughts, anyone?
0
Dimitar Milushev
Telerik team
answered on 09 Feb 2007, 12:55 PM
Hello Carol,

This problem exists when you try to use the RadGrid in a portal with Trust Level set to WSS_Minimal. Please try setting the Trust Level to WSS_Medium or Full in the web.config of your portal.

Regards,
Dimitar Milushev
the telerik team
0
Stefan
Top achievements
Rank 1
answered on 14 Feb 2007, 07:56 PM

Hello,

Please let me know when you still have some problems with creating a webpart for the Radgrid. I'am testing the trial version of telerik in combination with MOSS 2007 custom webparts for one of our customers. I'have a full working example the same as the Basic Filtering Demo without using ascx and the SmartPart. I have created a WebPart with using the objectmodel of the RadGrid. (Yes it takes some time untill you are finished with that. If visual designing and/or time is import then go on with creating ascx controls and using SmartPart. If not then my advice is object oriented developing.)

I know SmartPart and even created  our own custom WebPart for hosting ascx files. I had the same problems "unable to load... ascx" in the past. Lett me know when you need some help with testing the code in one of the Zip files.

Here is some advice that i can give you at this moment:

Place the needed Telerik assembly files in the bin used by your MOSS site. See ASPX demo pages for the needed assembly's.

The folder where you place the ascx can be the problem. Place the ascx files in a folder in a folder "ascx" under  "_layouts" and try  "~/_layouts/ascx". Lett me know when you don't know this folder. (Problem is the way moss  handles urls)

If have compiled your ascx codebehind file to an assembly DLL then you have to sign the DLL. Place the DLL in the BIN folder of your site. Don't forget to add a Safe Control row for the DLL in the webconfig.

Yeh keep it short Bassie and tell me what you think the real problem is:

The code in the Zip without using a datasource is working correct? And you got some AJAX problems when adding a datasource. Please try this (the jscript need a id for referencing the datasource i think) :
Create a global (datasource or datatable?)  look at the Aspx sample. Fill the datasource or datable id property.  Fill the DataSourceID property of your grid with the id. Things start to look the same now as the demo.

If still not working then the ascx  with datasource and Smartpart combination is your problem i think. The datasource you create also needs to be added to the controls collection of the WebPart. Don't know if this is handled correctly by the ascx self. 

You can load an ascx in an webpart yourself with the function loadcontral. For security problems using loadcontrol see also CodeToRunElevated (Unposible things will become simple with this).

I shall add a working example using the objectmodel to this posting.

Greetings,
Stefan Lankester (LogicaCMG)

0
dawood
Top achievements
Rank 1
answered on 18 Feb 2007, 03:35 PM
Hello Dear
i am using 2 rad grid in my dotnetnuke code.
in grid 1 a ama binding any data from database and in grid 1 a have a linkbutton control , whene I click on the link button manny data binding to second radgrid.and  i choose the check mark (Enable ajax) in radgrid property , but the second radgrid not binding
can you help me ? to how binding second radgrid data by raise event in first radgrid?
thanks
 
0
Sebastian
Telerik team
answered on 19 Feb 2007, 09:46 AM
Hi Dawood,

An AJAX request from r.a.d.grid cannot affect other controls on the page. The AJAX functionality is limited to the grid and the controls it contains.
You should use r.a.d.ajax controls in order to update other controls outside of grid's body via asynchronous request. For example, you can disable the built-in ajax for both grids and ajaxify them through the settings of an ajax manager.
Thus only through the design-time settings of the manager (no extra server code required) you will be able to update the second grid when pressing a link button in the first.

Alternatively, you can wire a client event of the first grid (OnRowSelected or RequestEnd for example) and trigger an ajax request through the RadGridClientObject.AjaxRequest(eventSrc, eventArgs) to update the second grid. These online resources represent the approach:

http://www.telerik.com/demos/aspnet/Grid/Examples/Programming/SelectedValue/DefaultVB.aspx (see the OnRowSelected/RaisePostBackEvent handlers)

http://www.telerik.com/demos/aspnet/Grid/Examples/Programming/WebMail/DefaultVB.aspx (see the OnRequestEnd/RaisePostBackEvent handlers)

Best regards,
Stephen
the telerik team
0
Garry
Top achievements
Rank 1
answered on 27 Feb 2007, 01:10 PM
Hi Dimitar,

I am experiencing the same issue when using RadControls in a SmartPart (MOSS2007) i.e. The type initializer for 'Telerik.RadGrid.RadControl' threw an exception

You mentioned setting the trust level to WSS_Medium in the web config. Which setting is this?

I have tried the test apps attached in various parts of this thread, and I get the same error.

FYI:

I have copied the Radgrid .dll's into the bin folder of my sp site. I have also copied the RadControls folder into the root of my site i.e. the same root folder as the bin folder.

Thanks!!

George

0
Dimitar Milushev
Telerik team
answered on 27 Feb 2007, 01:14 PM
Hello Nicholas,

In the web.config file, find the <trust> tag and set it similar to this:

<trust level="WSS_Medium" originalUrl="" />

Best wishes,
Dimitar Milushev
the telerik team
0
Garry
Top achievements
Rank 1
answered on 27 Feb 2007, 02:36 PM
Hi Dimitar,

Thanks for the prompt response. 

I have set the trust level to WSS_Medium as suggested, althought this has not solved the problem. I still receive a 'The type initializer for 'Telerik.RadGridUtils.RadControl' threw an exception'. error.

It is a real pain. I am sorry to trouble you, I have run out of ideas. Do you have any other ideas as to what might be the problem?

Thanks!

Nick


0
Garry
Top achievements
Rank 1
answered on 27 Feb 2007, 02:39 PM
Hi Dimitar,

I set the trust level to WSS_Full, and it now works fine!! :)

Thanks you once again for your help!

Regards

Nick
Tags
RadControls
Asked by
Dev
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
Dev
Top achievements
Rank 1
Ivan Stankovic
Top achievements
Rank 1
cjenner
Top achievements
Rank 1
Stefan
Top achievements
Rank 1
dawood
Top achievements
Rank 1
Sebastian
Telerik team
Garry
Top achievements
Rank 1
Share this question
or