I've been working on installing a pre-existing and functioning Telerik-using Sharepoint site from another machine onto a fresh machine, as well as updating from .NET 2.0 to .NET 3.5 Telerik versions. As it would turn out, things went terribly wrong.
I will attach a bunch of screenshots and code files so anyone who attempts to assist me with this issue will at least be armed with a visual depiction of the chaos I'm attempting to reconcile. I have taken the following steps and tutorials in my attempts to make this work:
- Adding various Assembly and Register commands into the .ascx/.aspx files in attempts to have it recognize tags and assemblies required
- Multiple Google search results of similar issues, none of which seemed to have a beneficial effect
- Heavily modifying the web.config based on tutorials and other help issues
- Tutorial: ASP.NET AJAX 1.0 as a precursor to
- Tutorial: ASP.NET AJAX 3.5
- Conferred with multiple other developers on this issue.
Since I began writing this post, I've been attempting to rebuild and deploy the different modifications of the code for screenshot purposes and I am now receiving another error, which is most likely related to and/or caused directly by the web.config modifications I made based off posts and tutorials. So I will have to explain using words.
Phase 1
Initially, the webparts were automatically implemented into the page by the code prior to loading the page, and would display a single line of text error which I can no longer re-create...but said something along the lines of the webpart encountered an error and cannot be displayed. Eventually we remedied this by removing all automatic adding of the webpart, and ended up with a blank page on the initial load as is in the screenshots.
Phase 2
Now that we had the page loading and were just missing the webpart, we would add it manually via the Site Actions > Edit Page and Add a webpart options as are also shown in the screenshots. This would result in one of two errors depending on the code.
- If the Telerik tags were not labelled correctly, (ex. rad:RadTab was called rad:Tab at one deploy) the webpart was added correctly and had a single line of text which stated "Data Not Available:Unknown server tag 'rad:Tab'."
- The other error seemed to occur if all the spelling was correct and everything in the code was correct. That was the generic Sharepoint error as shown in the screenshots. "An Unexpected Error Occurred." which is of course informative and helpful. And yes, the web.config had the settings set such that errors should be very verbose (customErrors=Off, debug=true, etc.)
Phase 3
Currently upon attempting to add the webpart to the page, I receive an error I've never seen until today which likely means it's related to the web.config modifications I've made based off the noted tutorials. This error is also shown in the screenshots; the dialog about the webpart not being 'safe' ...
So that's the basic story of my last week. I will attach the current .ascx and associated .aspx pages, the web.config... anything else someone needs to see to help with this?
Thanks in advance should you attempt to aid me,
Jon
p.s. Apparently the attachments can only be images... how helpful. Here's a link to the zip to download the files I wanted to attach to this post...
p.s.s. I will continue on my time to work on this as well and post if I find anything of interest / make progress...
10 Answers, 1 is accepted

- Webpart is loaded into the page normally and renders
Issues:
- An Access Denied error which seems to be unrelated to Telerik and only pertains to Sharepoint and/or SSP Active Directory Users/Groups
- A Telerik rendering error during page load (see attached screenshot) which has the following error details:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)
Timestamp: Wed, 13 Apr 2011 22:49:21 UTC
Message: 'Telerik' is undefined
Line: 1715
Char: 5
Code: 0
I attempted to fix the Telerik page load error by looking into this guide and adding the following lines to my web.config file:
<
system.webServer
>
<
handlers
>
<
add
name
=
"Telerik.Web.UI.WebResource"
path
=
"Telerik.Web.UI.WebResource.axd"
verb
=
"*"
type
=
"Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2009.2.701.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
/>
</
handlers
>
</
system.webServer
>
The first time I reloaded the page containing the webpart, I received no error about the Telerik being undefined, so I thought it might be fixed. But upon loading the same page later on, I have since received the same error ever since. It seems this is causing the actual webpart functionality (RadTabStrip tabbing, etc.) to not function at all.
Has anyone seen this error before or do you know of how to fix it?
Thanks,
Jon
It is a known issue that every IScript control, or a control that loads scripts via AjaxRequest, has issues while trying to get them under SharePoint.
Let me suggest you try loading the scripts that RadTabStrip uses manually – as is described at this help article.
Please let me know if this helps.
Regards,
Kalina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Thanks for the post :)
I managed to get the webpart I had been working on completely working by the time you posted your info, but through a different means, mostly editing the web.config and changing a bit of the webpart code. But I have a few more webparts for this page that still don't work so I'm currently debugging them. I'll post again with any specific issues or requests should they arise.
Thanks again,
Jon

I've managed to get to the point where everything is rendered and functions as expected as far as expected, with one major issue in this particular Telerik item.
Basically, within the webpart is a RadTabStrip which contains a RadGrid. Within this RadGrid are many rows and each row has different types of columns. Some columns contain controls for user-editable information. At the bottom of the page, external from the RadGrid or Telerik controls, is an Update button. Upon clicking this Update button, the page does a postback and is supposed to retrieve the edited rows from the grid, and send those off to an external web service to be processed.
This all used to work fine, but has since needed upgrading on a different machine and is no longer working. The way in which it originally pulled the user-modified data from the RadGrid was to compare every single Item from the (RadGrid targetGrid).MasterTableView.Items and in each Item (gridRow) check each column and if the column was editable, retrieve the corresponding control and determine the value of the user-edited information in said control by cross-checking the specific control's UniqueID with the (HttpRequest request).Form[UniqueID] and using that value (if changed) as the updating value.
I'll attach the function which does this madness below.
Basically, I want to know what is the expected/intended/easiest way to find/retrieve:
- Which Items were edited?
- What are the new values for the edited Items?
And from there the webservice should still function correctly and take care of the actual SQL updating etc.
This currently seems a very convoluted and quite unnecessary way of obtaining a user-modified value from a RadGrid. Can anyone tell me a different way of doing such?
Just stumbled upon this article (http://www.telerik.com/help/aspnet/grid/radgrid-telerik.webcontrols.gridtableview-extractvaluesfromitem.html) whilst writing this post. Implemented it, but it gives me the pre-modified values. i.e. one value was 50, I modified to 100, update run, and the corresponding entry from the ExtractValuesFromItem() contained 50 instead of 100. So that doesn't seem to help...
Edit: Turns out, the ExtractValuesFromItem() actually obtained the correct values on a fresh page refresh, but not after any previous errors on the page. Eliminate errors, produce results.
Function Code:
private
static
void
CaptureChangesInGrid(RadGrid targetGrid, System.Web.HttpRequest request)
{
//Loop through each targetgrid item
foreach
(GridDataItem gridRow
in
targetGrid.MasterTableView.Items)
{
foreach
(GridColumn column
in
targetGrid.MasterTableView.Columns)
{
CustomEditableColumn editableCol = column
as
CustomEditableColumn;
if
(editableCol !=
null
)
{
//Find the edit control in the given row
System.Web.UI.Control editItem = editableCol.FindControlInRow(gridRow);
if
(editItem ==
null
)
{
throw
new
ApplicationException(
"Unable to find edit control in for column: "
+ editableCol.HeaderText);
}
//HACK: hackery to allow for the date picker to have a different text input key format in the request
if
(editableCol
is
EditableDateColumn)
{
editableCol.CheckControlForChange(editItem, request.Form[
string
.Concat(editItem.ClientID,
"_dateinput_text"
)]);
}
else
{
editableCol.CheckControlForChange(editItem, request.Form[
string
.Concat(editItem.ClientID,
"_text"
)]);
}
}
}
}
}
string
.Concat(editItem.ClientID,
"_text"
)
used on the Form will return"ctl00_m_g_29457b47_2aec_438e_b389_e67a0cee42c0_uctlProjMenCtrl_uctlIPTDashboard_taskGrid_ctl01_ctl09_PercentComplete_Edit_text"
But the corresponding key from request.Form contains
"ctl00_m_g_29457b47_2aec_438e_b389_e67a0cee42c0_uctlProjMenCtrl_uctlIPTDashboard_taskGrid_ctl00_ctl04_PercentComplete_Edit_text".
Reason for this discrepancy is unknown.
Any help or better ideas?
Thanks,
Jon
This indeed a very intricate way to get the necessary values and incorrect for that matter. You should obtain the column values of the items being edited as follows:
foreach
(GridDataItem editedItem
in
RadGrid1.EditItems)
{
Hashtable newValues =
new
Hashtable();
GridEditFormItem editFormItem = editedItem.EditFormItem;
editFormItem.ExtractValues(newValues);
}
Hope it helps. Regards,
Tsvetoslav
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

It seems your code will give me a hashtable filled with all the edits/editable fields in the RadGrid?
Currently that doesn't fit with how things work on this end, but I may be able to modify how things currently work on our end to better suit this method of retrieving the values.
I'll post back later with how things turn out.
Edit: Well, upon clicking Update (which is separate from the RadGrid) I stepped through the loop you provided, and the radGrid1.EditItems contains no items, and thus never steps through the loop. Is there something missing that makes those items appear as edited or editable?
Thanks,
Jon
If you need to obtain the field values for the edit form of a given item, then just use the ItemCommand event of the grid and e.Item object that comes in with the event arguments.
All the best,Tsvetoslav
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

There is an ItemCommand event handler and function in the code, but I added a breakpoint into that code and during the normal procedure of updating the items in the grid, this breakpoint is never hit. The Update button I have on the page was not coded into the RadGrid itself, but is a separate System.Web.UI.WebControls.Button object defined as follows:
updateButton =
new
Button();
updateButton.ID =
"updateButton"
;
updateButton.UseSubmitBehavior =
false
;
updateButton.Text =
"Update"
;
updateButton.Width =
new
Unit(125);
updateButton.Click +=
new
EventHandler(UpdateButton_Click);
The UpdateButton_Click function contains relevant code as follows:
taskEditorCore.SaveChanges(taskGrid, Page.Request);
private
TaskEditorCore taskEditorCore;
----
public
class
TaskEditorCore : IDisposable
This SaveChanges function includes the relevant code:
public
void
SaveChanges(RadGrid grid, System.Web.HttpRequest request
)
{
//First, get the changes in the grid
DataSet changes =
this
.GetDataSetOfChangedRows(grid, request);
...
}The GetDataSetOfChangedRows() contains the relevant code:
public
DataSet GetDataSetOfChangedRows(RadGrid targetGrid, System.Web.HttpRequest request)
{
CaptureChangesInGrid(targetGrid, request);
//Loop through each modified row and read the values into it
foreach
(GridEdit item
in
this
.GetEditsInGrid(targetGrid))
{
...
}
return
set
;
}
The CaptureChangesInGrid is the same as the function above in this thread. Any changes found between the old values and new user-modified values will be saved as a GridEdit item and later processed in the above foreach loop.
All that works fine. There is a problem with postbacks breaking functionality of the actual retrieving of the user-modified values.
I have tried two methods that actually work for obtaining user-modified values after initial page load.
- The request.Form[] method. The first time the Update is performed, the generated keys within the Form match the individual edit control UniqueIDs (with appended name, etc.) But once the Update posts back, stepping through another Update will result with the Form keys having new slightly changed values (as in previous posts) whereas the individual control UniqueIDs will be identical to the previous run. Further Updates will remain with the Form unchanged after the first postback, and the UniqueIDs of the controls never changing (as they should not).
- To fix this method, I need to figure out why the Form keys change in value after a postback and find a way to prevent this change.
- The ExtractValuesFromItem() method. The first time the Update is performed, this method will correctly retrieve any user-modified values from the RadGrid.MasterTableView object. But upon subsequent Updates, it will only retrieve the old, unmodified values already contained in the RadGrid.
- To fix this method, I need to figure out why this function does not work after post backs. If there is anywhere for intricate workings of this function, I would perhaps be a little more informed.
- The coding difference between the Form[] method and the ExtractValuesFromItem method is the following lines:
Dictionary<
object
,
object
> editDict =
new
Dictionary<
object
,
object
>();
targetGrid.MasterTableView.ExtractValuesFromItem(editDict, (gridRow
as
GridEditableItem));
And in place of the request.Form[] in the previously posted CaptureChangesInGrid() function:
editableCol.CheckControlForChange(editItem, GetValueFromDictionary(editableCol, editDict));
private
static
string
GetValueFromDictionary(CustomEditableColumn editableCol, Dictionary<
object
,
object
> editDict)
{
string
value =
string
.Empty;
foreach
(
object
controlObj
in
editDict.Keys)
{
string
key = controlObj.ToString();
if
(key == editableCol.UniqueName)
{
value = editDict[key].ToString();
break
;
}
}
return
value;
}
ALL OF THAT WORKS.
But only before a postback. I just want to know why and how to avoid it.
Please tell me I don't have to recode many things... I really don't have the resources to do so.
Thanks,
Jon

Filtering, paging, and changing page size all don't work after the page encounters a postback, but work correctly upon a fresh page load.
I can load the grid, perform a page size change, and then be unable to filter, page to another page, or change page size.
I can load the grid, perform a paging operation to another page, and then be unable to filter, change page size, or page to another page.
I can perform an Update via the Update button (which performs a postback) and then be unable to filter, or page.
etc.
So it seems for some reason postbacks are now breaking internal Telerik functionality.
I've done a step-through of the back-end code when paging and filtering. After the initial page load, the step through hits and goes through the ItemCommand() function. After a postback, the ItemCommand() function is never hit at all. Why would a postback change how the code is executed?
Could it possibly be a web.config issue? Any ideas? I'm continuing to look for similar issues as well.
The cause for the problem you have encountered I suspect is caused by either of two reasons:
- incorrect binding for the grid.
- incorrect ajaxification of the grid.
Please, open up a formal support ticket and send your files for a closer look as it is not possible to get the full picture from the code snippets provided.
Thanks in advance.
Best wishes,
Tsvetoslav
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.