Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
227 views

Hi,

I'm working on fixing web accessibility errors. I have a RadGrid (see attachment) with more than 10 columns. When I want to edit a particular row in the grid, all my editable fields have accessibility errors (no labels, titles, or aria-labels for displayed textboxes/dropdown lists). I'm trying to figure out what properties of radgrid or it's components I can use so that each field on my page will be web accessible in edit mode. I know that I can use code behind to set a tooltip of a particular item on my page (see below) to some value; however, it's not a good solution since I have more than 10 columns in my grid. Let me know if there is a better way to solve the web accessibility problems for editable items on my page. 

If TypeOf (e.Item) Is GridEditableItem AndAlso e.Item.IsInEditMode Then
Dim item As GridEditableItem = DirectCast(e.Item, GridEditableItem)
Dim txtBox As TextBox = DirectCast(item("CllctnID").Controls(0), TextBox)
txtBox.ToolTip = "hello"
End If

 

Thank you,

Lyubov

Bozhidar
Telerik team
 answered on 19 Dec 2016
3 answers
602 views

Good afternoon everyone,

 I'm working on a conversion to an async/client-side UI.  I know that RadGrid's are rather touchy about master/detail/hierarchical grid types being bound client side, and in addition I need Export functionality on some grids.  This is leading to some of the grids being bound the "old" way, via ItemDataBound, NeedDataSource, etc.

 What I'm wondering is if the situation is supported in making an ItemDataBound function asynchronous.

For example, I have a grid that displays a set of schedules, and a detail grid that displays a set of backups set to fire on said schedule.  There is some parsing that needs to happen in the code-behind ItemDataBound method (setting Image URLs, Tooltips, parsing Recurrence Rules, etc).  Is it possible to make those methods asynchronous?

 Thanks in advance!

Example:

protected async Task rgrdSchedules_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridDataItem)
{
var myItem = (GridDataItem)e.Item;
var taskScheduleGet = await IceApi.ExecuteGet<Schedule>("url/to/resource/" + myItem.GetDataKeyValue("ScheduleId").ToString());
 
// Do Independent Work (Image URLs, ToolTips, etc) //
 
Schedule mySchedule = await taskScheduleGet;
 
// Do bindings to mySchedule
}
}

Konstantin Dikov
Telerik team
 answered on 19 Dec 2016
7 answers
236 views
Hi,

is there a right to left property for dropdowntree?

I have tried by setting the direction as below. Unfortunately it didnt work.
raddropdowntree1.Attributes("dir") = "rtl"

Please help.

Thanks.
Hossein
Top achievements
Rank 1
 answered on 19 Dec 2016
1 answer
298 views

I have inherited a legacy ASP.NET project that uses Telerik controls. The first step was to upgrade 
the Telerik components, and I have upgraded them from quite old versions (don't recall the exact 
version numbers or dates) to 2016.1.412.35, which show up like so (Auto Update) in the project's 
property page (screen shot that demonstrates this uploaded).

I can run the site and try to log in, but then as the GUI is updated based on the login success and 
values, I get a Telerik exception regarding the inability to find an embedded skin ("Forest" in my 
case).

The markup that apparently is the culprit is:

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Direction="RightToLeft" 
MinDisplayTime="200" BorderStyle="none" BorderColor="Orange" BorderWidth="1px" InitialDelayTime="5" 
runat="server" Skin="Forest" EnableViewState="true" EnableSkinTransparency="true" 
EnableAjaxSkinRendering="true" />

(specifically the "Skin="Forest"" part).

In case it's of value, this is the full exception, as shown in the browser:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Server Error in '/' Application.

Telerik.Web.UI.RadAjaxLoadingPanel with ID='RadAjaxLoadingPanel1' was unable to find an embedded skin 
with the name 'Forest'. Please, make sure that the skin name is spelled correctly and that you have 
added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a 
custom skin, set EnableEmbeddedSkins=false.

Description: An unhandled exception occurred during the execution of the current web request. Please 
review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.InvalidOperationException: Telerik.Web.UI.RadAjaxLoadingPanel with 
ID='RadAjaxLoadingPanel1' was unable to find an embedded skin with the name 'Forest'. Please, make 
sure that the skin name is spelled correctly and that you have added a reference to the 
Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set 
EnableEmbeddedSkins=false.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information 
regarding the origin and location of the exception can be identified using the exception stack trace 
below.

Stack Trace: 

[InvalidOperationException: Telerik.Web.UI.RadAjaxLoadingPanel with ID='RadAjaxLoadingPanel1' was 
unable to find an embedded skin with the name 'Forest'. Please, make sure that the skin name is 
spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in 
your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.]
   Telerik.Web.SkinRegistrar.GetEmbeddedSkinAttributes(ISkinnableControl control, Type controlType, 
Boolean designTime) +630
   Telerik.Web.SkinRegistrar.GetEmbeddedSkinAttributes(ISkinnableControl control, Type controlType) 
+39
   Telerik.Web.SkinRegistrar.RegisterCssReferences(ISkinnableControl control) +373
   Telerik.Web.UI.RadAjaxLoadingPanel.RegisterCssReferences() +89
   Telerik.Web.UI.RadAjaxLoadingPanel.ControlPreRender() +128
   Telerik.Web.UI.RadAjaxLoadingPanel.OnPreRender(EventArgs e) +47
   System.Web.UI.Control.PreRenderRecursiveInternal() +80
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean 
includeStagesAfterAsyncPoint) +842

Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5491
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

There are many places in the code where "Forest" is explicitly referenced. Do I really need to remove 
all these? If so, what can I replace it with? Can I use the "Default" theme?

I wonder why (if it's really so) that upgrading Telerik versions make old skins invalid?

Can I salvage the existing GUI code? The project has an App_Themes folder which has, not only the 
"Forest" Theme, but many others:

(another screen shot uploaded that shows this).

I have a feeling if I really do need to eliminate the explicit references to "Forest", that will only 
be the tip of the iceberg, so to speak.

So my first preference would be to somehow still be able to reference these themes, and my second 
would be a quick way to prevent all these errors by perhaps using one theme for everything in some 
overriding global setting.

So how can I either continue to utilize legacy Telerik themes, or what is a relatively painlessly workaround 
for the litany of errors that are bound (no pun intended) to otherwise occur?

For a version of the question with inline screenshots, see http://stackoverflow.com/questions/41129149/how-can-i-continue-to-utilize-legacy-telerik-themes-after-upgrading

Ivan Zhekov
Telerik team
 answered on 19 Dec 2016
1 answer
126 views

Hi,

In one of my RadGrid after enabling the render mode="Mobile" the Excel like filtering is not coming. If the Render mode ="Auto" then the filter menu will come in desktop but not in the mobile device.

Please find the attached screen shot

 

Please let me know inorder for the excel filter option to come in mobile device with RenderMode="Auto" What settings i have to do.

Eyup
Telerik team
 answered on 19 Dec 2016
4 answers
75 views

Hi, I'm using ClientDataSource connected to a webservice and using OnCustomParameter to customize the data request.

I noticed that if I changed several fields for a data item and updated the clientdatasource, then for each field modified a request is sent to the webservice.

Each request has a single field changed from the previous one.

Suppose I have in a dataitem 4 fields (a,b,c,d) with their initial value to 1,

now I need to modify them to {a : 2, b:2, c:2, d:2}

when I update the clientdatasource the following requests are sent:

request1: {a:2,b:1,c:1,d:1}

request2: {a:2,b:2,c:1,d:1}

request3: {a:2,b:2,c:2,d:1}

request4: {a:2,b:2,c:2,d:2}

Is there a way to only send the final request? i.e. I want to get all the data updated before syncing.

Omar
Top achievements
Rank 1
 answered on 18 Dec 2016
9 answers
3.8K+ views
I am trying to figure out the best way to do replicate with the RadButton something I do with regular ASP.NET buttons. Basically I have a client script in my master page like this where a function takes a parameter to do some validation dynamically based on conditions. Its in the master page so I can have it centralized to one location for all my pages.

function Master_PerformFullPostBackWaitScreen(ValidationGroup) {
    var valid = true;
      
    if (Master_ByPassPostBackWaitScreen) {
        Master_ByPassPostBackWaitScreen = false;
        return;
    }
    var rwMasterPage_FullScreenWaitWindow = $find('<%=rwMasterPage_FullScreenWaitWindow.ClientID %>');
    if (ValidationGroup != null) {
        Page_ClientValidate(ValidationGroup);
        valid = Page_IsValid;
    }
      
    if ((rwMasterPage_FullScreenWaitWindow != null) && (valid)) rwMasterPage_FullScreenWaitWindow.show();
}

Here is my normal button code.

<telerik:Button ID="btnCustomerProfile_AccountInformationSave" runat="server" 
    Text="Save" 
    onclick="btnCustomerProfile_AccountInformationSave_Click"
    ValidationGroup="vgAccountInformation"  Visible="false"
    OnClientClick="Master_PerformFullPostBackWaitScreen('vgAccountInformation')" />

So the button passes to my function the validation group it should run before it tries to show a Rad Window that covers the entire screen modally to prevent users from clicking anything while the page process. The problem I have with the RadButton is that the OnClientClicked does not allow me to put the call in with parameters. So I thought well my solution might be that on the client side I read the source button's validation group. However, there is not clientside function for this. This best I have is to use the command argument like this.

<telerik:RadButton ID="btnCustomerProfile_AccountInformationSave" runat="server" 
    Text="Save" 
    onclick="btnCustomerProfile_AccountInformationSave_Click"
    ValidationGroup="vgAccountInformation"  
    Visible="false"
    OnClientClicked="Master_PerformFullPostBackWaitScreen_RadButton"
    CommandName="Save"
    CommandArgument="vgAccountInformation"
    Icon-PrimaryIconUrl="../images/icons/save16x16.gif"  />

Then to do a client side script like this.

function Master_PerformFullPostBackWaitScreen_RadButton(sender, eventArgs) {
    Master_PerformFullPostBackWaitScreen(sender.get_commandArgument())
}

Of course now if I run into a situation where I actually need to use the command argument on the server side I am in trouble. I ran into a similar problem where I needed a rad button to pass several parameters to a script, but again I had to use the command argument with a delimited string. It seems either the OnClientClicked needs to work more like the normal button OnClick or there needs to be some property to read parameters for the script or even expose things like the validation group property or so on.






Keith
Top achievements
Rank 1
 answered on 16 Dec 2016
5 answers
198 views

In the RadFileExplorer I am trying to figure out how to hide the subfolders.

currently I have this which is filter and only showing the file types I want to show.

I have tried to send an empty Array into the Directories but it is still shwing all the sub folders.

public class ExtendedFileProvider : FileSystemContentProvider
        {
            //constructor must be present when overriding a base content provider class
            //you can leave it empty
            public ExtendedFileProvider(HttpContext context, string[] searchPatterns, string[] viewPaths, string[] uploadPaths, string[] deletePaths, string selectedUrl, string selectedItemTag)
                : base(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, selectedItemTag)
            {
            }
            public override DirectoryItem ResolveDirectory(string path)
            {
                //get the directory information
                DirectoryItem baseDirectory = base.ResolveDirectory(path);
                //remove files that we do not want to see
                List<FileItem> files = new List<FileItem>();
                foreach (FileItem file in baseDirectory.Files)
                {
                    if (file.Name.Contains(".pdf") || file.Name.Contains(".doc") || file.Name.Contains(".docx") || file.Name.Contains(".zip"))
                    {
                        files.Add(file);
                    }
                }
                List<DirectoryItem> dirs = new List<DirectoryItem>();
                dirs.Clear();       
 
                DirectoryItem newDirectory = new DirectoryItem(baseDirectory.Name, baseDirectory.Location, baseDirectory.FullPath, baseDirectory.Tag, baseDirectory.Permissions, files.ToArray(),dirs.ToArray());
                //return the updated directory information
                return newDirectory;
            }
        }
Vessy
Telerik team
 answered on 16 Dec 2016
2 answers
217 views

I need to disable highlight of menu on mouseover. Enable="false" works, but make my image pale

<telerik:RadMenuItem ImageUrl="graphics/Users.png" enabled="false"
                                          tooltip="User Resources"
                                          style="margin-left:318px;"
                                          onmouseover="showMenu(event)"/>

Any recommendation?
David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 16 Dec 2016
3 answers
148 views

Hi Folks,

is it possible to allow only specific shape types to be resizable, i.e. rectangles can be resized, but circles not?

Best regards,
Hans

Vessy
Telerik team
 answered on 16 Dec 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?