Home » Visual Studio

displaying error message - Telerik MVC grid - AJAX mode

I want a common solution for handling error messages ON telerik mvc grid in ajax inline and popup edit modes. I am not talking about error messages that are related to single input field. These are business error messages that come back to grid from DB upon clicking grid edit or insert buttons. I want to dispaly error message and not loose data in input fields, bcaz in some cases we are talking about more than 20 fields.

1) I want to know the best way to handle error messges received from backend while using telerik mvc grid.

2) Is it possbile to display error message in a message dialog box?


2 Answers Found


Answer 2

in addition of Nai-Dong Jin - MSFT

2) Is it possbile to display error  message in a message  dialog box?

<% if (!ModelState.IsValid){%>

window.alert('<% = Html.ValidationSummary(true) %>'); // maybe parse a little and do not retrieve the html tags

<% }%>



I am using telerik MVC grid. how can i add hover effect  on rows I am following the example from here




Hi all,

I have an app which loads a popup of a different app - ie cross domain browsing.  In the popup I also have telerik AJAX controls. 

When the user clicks on the close button on the page, using  :

RegisterCloseScript(Page, 1)

A javascipt error then appears, claiming Access Denied - line: 5959, which is:  

var offsetL = w.screenLeft - top.screenLeft - top.document.documentElement.scrollLeft + 2;
 I previously had issues with AJAX and telerik and have modified the MicrosoftAjax.js files as described in the links:
..and changed the script manager to:
<asp:ScriptManager ID="ScriptManager1" runat="server"><Scripts><asp:ScriptReference Name="MicrosoftAjax.js" ScriptMode="Auto" Path="~/Protected/MicrosoftAjax.js" /></Scripts></asp:ScriptManager>

Really can't see the best way forward with this.




a little baffled how to do this.

I have a Product table where I created an EDMX on it.  All good.

I have a Suppliers table where I created an EDMX on it. All good.

I use this Product type for a Telerik MVC Grid ( shows list of products ).  All good - works fine.

My problem is - I have a foreign key on a SUPPLIER_GUID column in my Product table.  It is a one to one relationship.

Now - I want to use my Product type (prior to generating the page) so that it contains the SUPPLIER_NAME from the Suppliers table in the grid as opposed to showing the SUPPLIER_GUID guid value.

I know this could be done with a model built on a view (using SQL Server 2K8) - but I'm wondering if it's possible to get the actual Supplier Name into the Product type when generating the product line items in the grid....

Is this possible or do I have to create a (db)view and create a model on that (db)view?

p.s Using Telerik MVC grid with Ajax binding.

Thanks in Advance,



hi i had one ajax tab containeer.in that i placed a grid on click of the grid i am showing another grid which has pagination in a popup. the popup grid has the pagination(custom) which iam showing prev and next button in middle drop downlist the code is as fllows




 <spanstyle="color: #ffffff">| </span>












<spanstyle="color: #ffffff">| </span>








when go with 


Dim gvPager As

GridViewRow = gvForwardedJobs.BottomPagerRow

ddlPages = CType(gvPager.Cells(0).FindControl("ddlFPages"), DropDownList)

here the ddlPages is getting identified but when i go with the


when i using the same thing for imgbtnFPrev_Command  the ddl pages is getting nothing

how to solve this problem



I am using Telerik Rad Grid Control in my Sharepoint While creating Custom field type .

I downloaded Telerik Rad Controls for ASP.Net AJAX Q2 2010 SP1.and put my telerik.web.config.UI in GAC .I added in web.configthe safe controls


SafeControlAssembly="Telerik.Web.UI, Version=2009.2.701.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"Namespace="Telerik.Web.UI"TypeName="*"Safe="True" />


SafeControlAssembly="Telerik.Web.UI, Version=2010.2.826.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"Namespace="Telerik.Web.Design"TypeName="*"Safe="True" />

and in my .ascx file I added this thing:


@Registerassembly="Telerik.Web.UI, Version=2010.1.309.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4"


namespace="Telerik.Web.UI"tagprefix="telerik" %>

and I am getting this error please tell me where is tha problem .


File Not Found.   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at System.Web.Configuration.CompilationSection.LoadAssembly(String assemblyName, Boolean throwOnFail)
   at System.Web.UI.TemplateParser.LoadAssembly(String assemblyName, Boolean throwOnFail)
   at System.Web.UI.TemplateParser.AddAssemblyDependency(String assemblyName, Boolean addDependentAssemblies)
   at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistrationCore(TagNamespaceRegisterEntry nsRegisterEntry)
   at System.Web.UI.MainTagNameToTypeMapper.ProcessTagNamespaceRegistration(TagNamespaceRegisterEntry nsRegisterEntry)
   at System.Web.UI.BaseTemplateParser.ProcessDirective(String directiveName, IDictionary directive)
   at System.Web.UI.TemplateControlParser.ProcessDirective(String directiveName, IDictionary directive)
   at System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)


When exporting a grid if the user has it filtered in any way the grid should just export the filtered data not the entire dataset



I have the following telerik grid:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                        <telerik:RadGrid ID="GrdDynamic" runat="server" AutoGenerateColumns="false"
                                      <telerik:GridBoundColumn AllowFiltering="false" HeaderText="MovieID" UniqueName="MovieID" HeaderStyle-Wrap="false"
                                    <telerik:GridTemplateColumn AllowFiltering="false" D HeaderText="Channel Number" UniqueName="Channel Number" ItemStyle-HorizontalAlign="Center">
                                            <asp:TextBox ID="txtChannelNo" runat="server" Text='<%# Bind("ChannelNumber") %>'/>
                                    <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Service ID" UniqueName="Service ID" ItemStyle-HorizontalAlign="Center">
                                            <asp:TextBox ID="txtServiceID" runat="server" Text='<%# Bind("ServiceID") %>'/>
                                    <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Transponder ID" UniqueName="Transponder ID" ItemStyle-HorizontalAlign="Center">
                                            <asp:TextBox ID="txtTransponderID" runat="server" Text='<%# Bind("TransponderID") %>'/>
                                    <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Network ID" UniqueName="Network ID" ItemStyle-HorizontalAlign="Center">
                                            <asp:TextBox ID="txtNetworkID" runat="server" Text='<%# Bind("NetworkID") %>'/>
                                       <ClientSettings AllowColumnHide="true" ReorderColumnsOnClient="false">
                                <Selecting AllowRowSelect="true" />
                                <Resizing AllowColumnResize="true" AllowRowResize="true" />
                            <FilterMenu EnableEmbeddedSkins="False">
                                        <asp:LinkButton ID="btnSaveNetwork" runat="server" 
                                           onclick="btnSaveNetwork_Click">Save Network </asp:LinkButton>
                                        <asp:Label ID="lblNetworkMsg" runat="server" class="LabelText" CssClass="ErrorMsg" 
                                            Font-Size="Small" Height="16px" Text="Project Network info saved Successfully!" 
                                            Visible="False" Width="242px"></asp:Label>

And in a submit button click event,I am writting the following code:

 protected void btnSaveNetwork_Click(object sender, EventArgs e)
        int res = 0;
        NetworkInformation netin = new NetworkInformation();
        netin.ProjectId = ProjectID;
        netin.UserId = Convert.ToInt32(SessionHelper.UserId);
        foreach (GridDataItem gvr in GrdDynamic.Items)
            netin.ProjectId = ProjectID;
            netin.UserId = Convert.ToInt32(SessionHelper.UserId);

            netin.MoviePriority = Convert.ToInt32(gvr["MovieID"].Text);
            netin.ChannelNumber = (gvr["Channel Number"].Text!="")? Convert.ToInt32(gvr["Channel Number"]) : 0;
            netin.ServiceId = (gvr["Service ID"].Text!="")?gvr["Service ID"].Text:null;
            netin.TransponderId= (gvr["Transponder ID"].Text!="")?gvr["Transponder ID"].Text:null;
            netin.NetworkId= (gvr["Network ID"].Text!="")?gvr["Network ID"].Text:null;
        if (res > 0)
            lblNetworkMsg.Visible = true;

But,the problem is:I am gettting null for ChannelNumber,ServiceID,TransponderID,NetworkID,i.e.,not being able to access the values entered in those respective textboxes.

Where am I going wrong?Do I need to write the same code in diff event?or diff code in diff event?Please suggest.


Hello All,

I am using Telerik grid, but when I do search it fetches all data instead of only 10 ( I have set 10 paging) due to that my binding and application become slow.

What setting I have to do that telerik grid only bring 10 datarow from server and every next click bring other 10 data.




Hello everybody.

I am using Telerik RadControl For ASP.NET and AJAX for my college project. Telerik is installed in my desktop and eventually I will not be able to take it into my college during examination. There are two dll files Telerik.Web.Design.dll and Telerik.Web.UI.dll in the Bin directory of Telerik installation folder. Can I add these two file as reference into my project on my college's computer? Will it be helpful?

Is there any other way to do this? I may not get permission to install it into college's machine.

Thank you.


Hello I am Salvio this is my first Post

In Gridview I am using  radcombobox... (Grid is inside ajax updatepanel)

and web page contain some ajax autocomplete textbox extextender also

if I use Scriptmanager

<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" >

means.... ajax control working properly and radcombobox not working...

if I use


means... radcombobox working properly and ajax control not working.....

Can any one tell what script manager that support both.....


Hi all, no matter what I do or what template I use, when I create a new page based on a master template designer 2010 keeps telling me that

"This page does not contain any regions that are editable in safe mode. Do you want to open this page in advanced mode?"

If I choose yes then it still doesn't let me do anything and the cursor is a greyed out circle with line through it.

I've searched and looked on here and can't find any mention of the safe mode non-editable regions but its becoming irritating now as I can't progress. Is there a stage missing or should pages be created using templates in a different manner?




I run application in release mode using user custom dll. But I am getting "failed to start because msvcr90d.dll was not found"  message.

Please help me to solve this problem.




I have just installed Microsoft Visual Web Developer 2010 Express on a new computer with Windows 7 Professional.

I have opgraded a webproject from Microsoft Visual Web Designer 2008 Express to Microsoft Visual Web Designer 2010 Express.

I get error message: "ASP.NET Ajax client-side framework failed to load", when I run following simple page:


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test3.aspx.vb" Inherits="test3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<form id="form1" runat="server">

<a href="test.zip" >Download test file</a>



In my web.config file is written:

The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS.

My system.webServer section is empty and  Internet Information Services 7.0 is installed on my computer.

Has this anything to do with the error message ? How can I solve the problem?
I have googled a lot on "ASP.NET Ajax client-side framework failed to load", but I have not found any useful advices to solve my problem.
If I create a new project in VWD 2010 and insert:

<a href="test.zip" >Download test file</a>

in a new webpage, I get the same error message, when I view it in the browser.

Best regards,




I have 3 grids within a master grid, all of the same size. When designing on WPF Designer VS 2010, there is no way I can scroll and bring forward a different grid. Or am I missing something.  Clicking on Document Outline does not help. The properties pane changes to the new grid, but the designer still shows the old grid.

Help would be appreciated.


hi All,

I want to display Bitmap image in picture box with Grid, Same like in Paint if we zoom the image there will be option

show grid same like that i want.

please help me in this.., i amsearching in net from past

two days..,



              <hiddenSegments applyToWebDAV="true">
                    <add segment="web.config" />
                    <add segment="bin" />
                    <add segment="App_code" />
                    <add segment="App_GlobalResources" />
                    <add segment="App_LocalResources" />
                    <add segment="App_WebReferences" />
                    <add segment="App_Data" />
                    <add segment="App_Browsers" />
HTTP Error 404.8 - Not FoundThe request filtering module is configured to deny a path in the URL that contains a hiddenSegment section.

Most likely causes:Request filtering is configured for the Web server and it contains a hiddenSegments section that allows the server administrator to deny access to specific directories.

Things you can try:Verify configuration/system.webServer/security/requestFiltering/hiddenSegments settings in the applicationhost.config or the web.config file.

Here's the hiddenSegment in the applicationhost.config file. What should I be looking here and how what change should I make here?

 <hiddenSegments applyToWebDAV="true">

                    <add segment="web.config" />

                    <add segment="bin" />

                    <add segment="App_code" />

                    <add segment="App_GlobalResources" />

                    <add segment="App_LocalResources" />

                    <add segment="App_WebReferences" />

                    <add segment="App_Data" />

                    <add segment="App_Browsers" />


The SmallBakery.sdf is in the App_Data directory of my development system.

Thanks much. 



Im using VS 2010 Trial edition. In my web application i got error "error hresult e_fail has been returned from a call to a component" while viewing the aspx page in design mode. Yesterday i got one solution from ASP.net Forum. Refer URL: http://forums.asp.net/p/1579954/3980147.aspx#3980147

after i restart my system again i am facing the issue.

Can anyone know the solution for this problem?


I have an autocomplete extender working well with IE and Firefox but it is either displaying incorrectly or causing the error below in Chrome and Safari.

Displaying incorrectly: At times the autocomplete list appears in the lower right corner of the browser.  It still works at this point though.

Error: The list stops appearing along with the halting of all of the JavaScript on the page.  I captured the error (see below).  In order to get the page to operate correctly again, I have to refresh the page.

Things to note:

There are two autocomplete extenders on two separate textboxes both of which trigger an asynchronous post-back that updates the value of the other (to ensure the data is correct according to the database). These are both located in an update panel that triggers the a-post-back. I have customized the CSS but when I set the CSS back to the defaults for AjaxControlToolkit there was no change to the behavior described above.

Thank you in advance for your help!


Uncaught TypeError: Cannot call method 'show' of null




(anonymous function)ScriptResource.axd:627


(anonymous function)ScriptResource.axd:4337





hi all,

Can any body tell me how to display error message in asp.net when duplicate user is inserted.


Thanks in advance!



In a Winforms Application, when using exceptions we use messagebox.show to display what error he user got.

catch ex as exception

end try

What do you use in a web application to let the user know that some error occurred?
I was trying response.write and the visual studio is not recognizing it for some reason.



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure