EzDevInfo.com

telerik interview questions

Top telerik frequently asked interview questions

Is Telerik openaccess ORM worth learning?

I have just won 1 Telerik Premium Collection for .NET Developer with subscription (lucky me!) and was wondering whether the OpenAccess ORM is worth learning? Has anyone thrown away their open source variant and are now using the Telerik ORM tools instead?

Are there any benefits from using the Telerik ORM tools instead of an open source variant?

Any thought suggestions?

BTW I can't wait to start using their RadControls for ASP.NET AJAX!!


Source: (StackOverflow)

Internal Server Error with httpHandlers section of web.config

I have an asp.net website using the form controls from Telerik. It's just moved to a new server but I keep getting a 500 Internal Server Error.

Removing the httpHandlers section of the web.config makes server error go away, although then it complains if there is a Telerik control on the page. The whole config file is valid XML. Is there anything wrong with this code?

<httpHandlers>
    <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2008.2.826.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false"/>
</httpHandlers>

Source: (StackOverflow)

Advertisements

Telerik DatePicker in IE 10 is not working

In my ASP.NET site, I am using Telerik controls to bind date and time picker, and it works good in all browsers except IE 10, then I ran script debugger it says js error :

SCRIPT5007: Unable to get property 'documentElement' of undefined or null reference Telerik.Web.UI.WebResource.axd, line 166 character 2

Anyone knows, how to fix this problem ?

Thanks a lot!


Source: (StackOverflow)

Define a Template column for Telerik MVC Grid in Razor syntax

I have the following legacy code that I would like to mimic, with all action links inside one column. However, I can't seem to get the Razor syntax right. How should I express this in Razor?

The ASPX column template is like this:

.Columns(column =>
{
    column.Template(o =>
        {%>
            <%= Html.ActionLink("Edit", "Edit", new{ id = o.DeviceID}) %> | 
            <%= Html.ActionLink("Delete", "Delete", new { id = o.DeviceID })%>
        <%});

I have only been able to get three separate columns using Razor without complaints about syntax etc. as below:

.Columns(columns =>
{
    columns.Template(o => @Html.ActionLink("Edit", "Edit", new { id = o.ProductId })).Width(50);
    columns.Template(o => @Html.ActionLink("Details", "Details", new { id = o.ProductId })).Width(50);
    columns.Template(o => @Html.ActionLink("Delete", "Delete", new { id = o.ProductId })).Width(50);

How can I define one template column that contains all three action links using Razor syntax?

EDIT: In trying the following small adaptation of Mike's answer below, I get the error "Only assignment, call, increment, decrement, and new object expressions can be used as a statement":

columns.Template(o => @<text>@Html.ActionLink("Edit", "Edit", new { id = o.CampaignId }) | 
                        @Html.ActionLink("Delete", "Delete", new { id = o.CampaignId })
                        </text>).Width(100);

Source: (StackOverflow)

Telerik Reporting - can't export in Chrome when using SqlDataSource

EDIT 2: Using fiddler I was able to find out that I'm getting a 504 error, but it makes no sense to me how that could possibly be happening.

EDIT: It seems to have something to do with connecting to SQL Server. I found I can export reports that don't use a SqlDataSource just fine, but when I add one then I get this error. But I still have no idea how to debug beyond this.


My Telerik reports are exporting just fine in explorer, but in Chrome I am getting an error page that says "This webpage is not available" and below that it says "ERR_CONNECTION_RESET".

When I hit F12 and look at the network activity, this is the request that is causing the problem:

https://ourwebsite.com/api/reportresolver/clients/112517-7243/instances/112518-d54c/documents/112531-33fe?response-content-disposition=attachment

The odd thing is that I can take the above link and copy/paste it into Explorer and it will open the PDF I just tried to export from Chrome.

Has anyone else run into this? I have no idea how to even proceed in troubleshooting this further :/


Source: (StackOverflow)

How to close the parent window from its child?

I have the following case:

I have a gridview on my page :

page1.aspx

I open another page(page2.aspx) through that gridview in a rad window then after that,through some button on page2.aspx i open the last page (page3.aspx) in a rad window also.

all these steps are performed through server side code :


 protected void OpenNewWindow(string url, int width, int height, int mode)
        {
            RadWindow newWindow = new RadWindow();
            newWindow.NavigateUrl = url;
            newWindow.VisibleOnPageLoad = true;
            newWindow.KeepInScreenBounds = true;
            newWindow.Skin = "Metro";
            if (width > 0)
            {
                newWindow.Width = width;


            }
            if (height > 0)
            {
                newWindow.Height = height;
            }
            newWindow.VisibleStatusbar = false;
            if (mode == 0)
            {
                {

                }
                //newWindow.OnClientClose = "OnChildWindowClosed";
                newWindow.DestroyOnClose = true;
                newWindow.InitialBehaviors = WindowBehaviors.Maximize;
            }
            RadWindowManager1.Windows.Add(newWindow);
        }

What i want to do is :

when clicking on a specific button on my (page3.aspx) close it and its parent page2.aspx.

How to do this (server side)?

I try this :but it just closes the child page3.aspx i want to close the parent page2.aspx also ?!


  protected void Button1_Click(object sender, EventArgs e)
        {
            ((RadAjaxManager)this.Parent.FindControl("RadAjaxManager1")).ResponseScripts.Add("CloseModal();");

            RadAjaxManager1.ResponseScripts.Add("CloseModal();");
        }

Source: (StackOverflow)

Not enough storage is available to complete this operation

I have an asp page with Timer control. Timer control will trigger some method to execute.

When this page is loaded, following error comes and timer control is not triggered to tick.

I use IE9. There is no issues in FF and chrome.

Error details are as follows. Anybody have an experience with this message ?

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E)
Timestamp: Thu, 12 May 2011 12:35:10 UTC

Message: Not enough storage is available to complete this operation.

Line: 6
Char: 70575
Code: 0
URI: http://localhost/AbcWeb/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen%3a1f68db6e-ab92-4c56-8744-13e09bf43565%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%3aen%3a183fb741-216d-4765-9b46-4a1f5d38fdd7%3a16e4e7cd%3af7645509%3aed16cbdc%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen%3a1f68db6e-ab92-4c56-8744-13e09bf43565%3a76254418%3bTelerik.Web.UI%2c+Version%3d2010.2.929.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen%3a183fb741-216d-4765-9b46-4a1f5d38fdd7%3a874f8ea2%3a24ee1bba%3a19620875%3a490a9d4e%3abd8f85e4%3a9cdfc6e7

When I debug the js. the above error is occured when adding css to the document (document.createStyleSheet(hrefs[i])).
Will it be a memory issue ?.

(function() {
                    function loadHandler() {
                        var hrefs = ['/WmsWeb/Telerik.Web.UI.WebResource.axd?compress=1&_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2010.2.929.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen%3a183fb741-216d-4765-9b46-4a1f5d38fdd7%3a1c2121e' ];
                        var head = document.getElementsByTagName('head')[0];
                        for (var i = 0; i < hrefs.length; i++)
                            if ($telerik.isIE) document.createStyleSheet(hrefs[i]);
                            else {
                                var link = document.createElement('link');
                                link.setAttribute('type', 'text/css');
                                link.setAttribute('rel', 'stylesheet');
                                link.setAttribute('href', hrefs[i]);
                                head.appendChild(link);
                            }
                        Sys.Application.remove_load(loadHandler);
                    }
                    Sys.Application.add_load(loadHandler);
                })();

Thank you in Advance.

DineshNS


Source: (StackOverflow)

How to move an entire div element up x pixels?

I want to reposition an entire div and its contents up about 10-15 pixels.

How can I do this?

Note: this is slider element, so when I click a button the slider slides down. Once it is finished I want to reposition it up about 15 pixels.


Source: (StackOverflow)

Devexpress or Telerik Controls comparison [closed]

I am looking into purchasing either dev express or telerik to aid in the development of our applications.

We are mainly an asp.net outfit but we are starting to make more and more use of silverlight and mvc.

I would like to know what people have thought about:

  • Feature set
  • Ease of use
  • Documentation
  • Pricing and Licensing

Source: (StackOverflow)

Infragistics WebGrid vs. Telerik Grid

I have been using the Infragistics UltraWebGrids for a few years now in multiple products, but have reached a crossroads with them. I have been looking into the Telerik products and they appear to perform better than the Infragistics grids in the demos.

The following are the things I'm looking to know.
1. Which would you use and why.
2. Which grid performs better.
3. Which product is quicker to implement.
4. Which product is easier to maintain.


Source: (StackOverflow)

Telerik and jquery

I'm working on an application I received from a client and they've used some telerik web controls. Telerik apparently includes its own version of jquery 1.3.2, while I'm using 1.4.1. I'm experiencing some weird javascript issues and I'd like to rule out the older jquery as a source of the problem. Is there a way to tell the Telerik controls not to automatically include the 1.3.2 version of jquery if I've already got jquery on the page elsewhere?


Source: (StackOverflow)

How to concatenate the id of the HTML element using Razor ASp.NET MVC

I have a grid column with checkboxes and I want to give them a different id. Id is based on the CustomerId in the Model. What syntax should I use to concatenate the chk_@item.CustomerId.

// using the telerik grid 
id="chk_@item.OrderNumber"  // does not work 

// this will put the value of @item.Customernumber as the checkbox id

columns.Template(@<text><input type='checkbox' id="@item.Customernumber" name="@item.CustomerNumber" value="@item.OrderNumber" /></text>).Width(50)

second option:

columns.Template(@<text><input type='checkbox' id="chk_@item.Customernumber" name="@item.CustomerNumber" value="@item.OrderNumber" /></text>).Width(50)

the above will render as

<input type="checkbox" id="chk_@item.Customernumber" value=... /> 

Source: (StackOverflow)

Kendo UI Grid post rendered or post databound event?

Is there a way to trigger an event after grid has been reloaded via ajax?

i see the RequestEnd event. but that seems to happen when the request returned, but before the grid has been refreshed.

i also see DataBound event. but that happens even earlier than RequestEnd,
also when i implement DataBound event, my header disappears..

i had to resort to this hack

function requestEnd(o) {
    console.debug('request ended.', o);
    setTimeout(refreshEditable, 500); // enough time to render the grid
}
function refreshEditable() {
    // perform my actions on controls within grid content
}

as a side note.. I am having a very hard time finding a reliable kendo grid mvc API reference. when i google for it, i get this: http://docs.telerik.com/kendo-ui/getting-started/using-kendo-with/aspnet-mvc/migration/widgets/grid which is a collection of little how-to and some "Events" but those don't correspond to what I am seeing in razor intelisense.

update: adding databound definition

    $('#grid').kendoGrid({
        dataBound: function(e) {
            console.debug('data bound..');
        }
    });

and here's grid ajax definition

   .Ajax().Read(read => read
        .Action("FilesRead", "SomeController")
        .Data("readData"))

 function readData() {
    return {
        IncludeChildren: $("#IncludeChildren").is(':checked'),
        SearchString: $('input[id=SearchString]').val()
    };
 }

i can see that DataBound is triggered while making the ajax call, not after it comes back.

update

corrected the DataBound event hook.

in dataBound function, i'm trying to get a reference to newly rendered templates..

function dataBound(o) {
  console.debug($('span.editable').length);                    // returns 0 
  setTimeout("console.debug($('span.editable').length)", 500); // returns 4
}

the spans are added using a client template

.ClientTemplate(@"<span class=""editable"" ... >#=DOCUMENT_DATE_FORMATTED#</span>");

see what i mean? data bound happens before grid is rendered


Source: (StackOverflow)

Passing parameters to telerik asp.net mvc grid

I have a telerik asp.net mvc grid which needs to be populated based on the search criteria the user enters in separate text boxes. The grid is using ajax method to load itself initially as well as do paging.

How can one pass the search parameters to the grid so that it sends those parameters "every time" it calls the ajax method in response to the user clicking on another page to go to the data on that page?

I read the telerik's user guide but it does not mention this scenario. The only way I have been able to do above is by passing the parameters to the rebind() method on client side using jquery. The issue is that I am not sure if it is the "official" way of passing parameters which will always work even after updates. I found this method on this post on telerik's site: link text

I have to pass in multiple parameters. The action method in the controller when called by the telerik grid runs the query again based on the search parameters.

Here is a snippet of my code:

$("#searchButton").click(function() {
    var grid = $("#Invoices").data('tGrid');

    var startSearchDate = $("#StartDatePicker-input").val();
    var endSearchDate = $("#EndDatePicker-input").val();

    grid.rebind({ startSearchDate: startSearchDate ,
                    endSearchDate: endSearchDate
                });
});

Source: (StackOverflow)

How can I convert a string length to a pixel unit?

I have a string like this:

string s = "This is my string";

I am creating a Telerik report and I need to define a textbox that is the width of my string. However the size property needs to be set to a Unit (Pixel, Point, Inch, etc). How can I convert my string length into, say a Pixel so I can set the width?

EDIT: I have tried getting a reference to the graphics object, but this is done in a class that inherits from Telerik.Reporting.Report.


Source: (StackOverflow)