Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
288 views
Trying to follow ManniAT's Colspan override... thread, but instead of changing the colspan on a nested view item, I am trying to change the colspan on a gridgroupheader item. In my case, I just want to get rid of the colspan altogether. I've tried a number of variations, including accessing the colspan attribute from the itemCreated as well as the prerender events, and changing the colspan value to "0" as well as trying grh.DataCell.Attributes.Remove("colspan").

Protected Sub RadGrid3_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles RadGrid3.ItemCreated
        If TypeOf e.Item Is GridGroupHeaderItem Then
            CType(e.Item, GridGroupHeaderItem).DataCell.Attributes("colspan") = 0
        End If
    End Sub

Protected Sub RadGrid3_PreRender(ByVal sender As Object, ByVal e As EventArgs) Handles RadGrid3.PreRender
        For Each grh As GridGroupHeaderItem In CType(sender, RadGrid).MasterTableView.GetItems(GridItemType.GroupHeader)
            grh.DataCell.Attributes.Remove("colspan")
        Next
    End Sub

Neither of these seem to work. When I try to change the colspans value to 0, I end up with duplicate colspan attributes for the TD (<td colspan="0" colspan="3"><p>R.V.'S</p></td>), and when I try to remove it, I still see the original colspan="3" attribute. (<td colspan="3"><p>R.V.'S</p></td>

An
y help will be appreciated.

Thank you,

-J.
Neha
Top achievements
Rank 1
 answered on 10 Jun 2016
1 answer
105 views

Good afternoon,

 

After some extended searching on the forums, Google and SO I have been unable to find any way to integrate mobile-support (long-touch) for FileExplorer.

What I want is to show the context-menu (rename, download etc...) when a user is on a handheld device (most usually an iPad using Safari). 

I've found some threads showing how to add mobile-support for radschedulers and attempted to integrate it into my code, but to no avail.

 

To clarify: I want my FileExplorer to handle any longtouch on a handheld device as a right-click event by a mouse (desktop). 

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="FileExplorer.ascx.vb" Inherits="WSC.DNN.WSCFileExplorer.FileExplorer" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
<script type="text/javascript">
    (function (global, undefined) {
        function OnClientFileOpen(oExplorer, args) {
            var item = args.get_item();
            var fileExtension = item.get_extension();
 
            var fileDownloadMode = true;
            if ((fileDownloadMode == true) && (fileExtension == "jpg" || fileExtension == "gif" || fileExtension == "png")) {// Download the file
                // File is a image document, do not open a new window
                args.set_cancel(true);
 
                // Tell browser to open file directly
                var requestImage = window.location.origin + "/Desktopmodules/WSCFileExplorer/Controls/Handler.ashx?path=" + item.get_url();
                if (requestImage.indexOf("localhost") != -1)
                {
                    requestImage = window.location.origin + "/jaberodnn7/Desktopmodules/WSCFileExplorer/Controls/Handler.ashx?path=" + item.get_url();
                }
                //var requestImage = "Handler.ashx?path=" + item.get_url();
                //document.location = requestImage;
                window.open(requestImage);
            }
        }
        global.OnClientFileOpen = OnClientFileOpen;
    })(window);
 
    jQuery(function ($) {
        var setupModule = function () {
            $('#frmWSCRepository').dnnPanels();
            $('#frmWSCRepository .dnnFormExpandContent a').dnnExpandAll({
                targetArea: '#frmWSCRepository'
            });
        };
        setupModule();
        Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function () {
            // note that this will fire when _any_ UpdatePanel is triggered,
            // which may or may not cause an issue
            setupModule();
        });
    });
 
    //function OnClientLoad(explorer, args) {
    //    var chkBox = $get("fileexplorer1_chkOverwrite");
    //    chkBox.checked = true;
    //    chkBox.parentNode.style.display = "none";
    //};
    //function OnClientFileOpen(sender, args) {
    //    if (!args.get_item().isDirectory()) {
    //        var href = args.get_item().get_path();
    //        window.location.href = href;
    //        args.set_cancel(true);
    //    }
    //};
</script>
 
<div class="dnnForm dnnClear" id="frmWSCRepository">
    <h2 id="WSCRepositoryExp" class="dnnFormSectionHead">
        <a href="#">Documents Repository</a></h2>
    <fieldset class="dnnClear">
        <telerik:RadFileExplorer runat="server" ID="WSCFileExplorer" Width="520px" Height="310px" Language="en-GB" PageSize="50" EnableOpenFile="true" onclientfileopen="OnClientFileOpen">
        </telerik:RadFileExplorer>
        <asp:CustomValidator ID="CustomValidator1" runat="server" CssClass="dnnFormMessage dnnFormValidationSummary"
        ErrorMessage="CustomValidator" Display="Dynamic"></asp:CustomValidator>
    </fieldset>
 
 
 
    <!-- javacsript taking care of the download (rightclick) event -->
 
    <script>
        function extendedFileExplorer_onGridContextItemClicked(oGridMenu, args) {
            var menuItemText = args.get_item().get_text();
            if (menuItemText == "Download") {// 'Download' command
                extendedFileExplorer_sendItemsPathsToServer();
            }
        }
 
        function extendedFileExplorer_sendItemsPathsToServer() {
            var oExplorer = $find("<%= WSCFileExplorer.ClientID%>"); // Find the RadFileExplorer ;
        var selectedItems = oExplorer.get_selectedItems(); // Retrieve the selected items ;
        var selectedItemsPaths = extendedFileExplorer_combinePathsInAString(selectedItems); // Get the paths as a string in specific format ;
 
        var hiddenField = $get("<%= ctlHiddenField.ClientID %>"); // Find the hiddenField
        hiddenField.value = selectedItemsPaths;
        __doPostBack("<%= btnDownload.UniqueID %>", ""); // Call the 'btnDownload_Click' function on the server ;
    }
 
    function extendedFileExplorer_combinePathsInAString(arrayOfSelectedItems) {
        var itemPaths = new Array();
        for (var i = 0; i < arrayOfSelectedItems.length; i++) {
            // Pass all the selected paths ;
            itemPaths.push(arrayOfSelectedItems[i].get_path());
        }
 
        // Return a string that contains the paths ;
        return itemPaths.join("|");
    }
</script>

Thanks!

Ianko
Telerik team
 answered on 10 Jun 2016
2 answers
289 views

Hello All,

I want the RadPanelBar to load by collapsing all the items, if the user need to see and they can expand, but collapse all is not happening at all.

In my case my datasource will be like this

Item1

     --Item1.1

     --Item1.2

 

while loading the page I want to see only the Item1 alone

Mark up code:

<telerik:RadPanelBar ID="rdPnlOrgDetail" RenderMode="Lightweight" OnDataBound="rdPnlOrgDetail_DataBound" runat="server" OnPreRender="rdPnlOrgDetail_PreRender" AllowCollapseAllItems="true" ExpandMode="SingleExpandedItem" OnClientLoad="collapseAll">
    
</telerik:RadPanelBar>

 

Dynamically adding the Items 

rdPnlOrgDetail.CollapseAllItems();
           
            var source= getSource();

            rdPnlOrgDetail.Items.Clear();
            RadPanelItem orgItems = new RadPanelItem();
            orgItems.Text = string.Format("{0} : {1}", orgChart.First().OrganisationScope.Scope, orgChart.First().Name.ToString());
            orgItems.Expanded = false;

            for (int i = 1; i < orgChart.Count; i++)
            {
                RadPanelItem orgItem = new RadPanelItem(string.Format("{0} : {1}", orgChart[i].OrganisationScope.Scope, orgChart[i].Name.ToString()));
                orgItem.Expanded = false;
                orgItems.Items.Add(orgItem);
                orgItems.Expanded = false;
            }
            orgItems.Expanded = false;
            rdPnlOrgDetail.Items.Add(orgItems);
            rdPnlOrgDetail.CollapseAllItems();

 

please do the needful.

 

With Thanks 

Amjath

Amjath
Top achievements
Rank 1
 answered on 10 Jun 2016
16 answers
529 views
Hi,

I am using RadRating Control in a RadGrid. i have paucity of space for the default sized stars RadRating generates. Is there anyway to reduce the size of the stars? i tried creating a custom skin but in vain. can anybody help me? Help much appreciated.

Thank you,

Murali Krishna.
Marin Bratanov
Telerik team
 answered on 10 Jun 2016
11 answers
653 views
Wouldn't it be nice, if Telerik provided some type of "Certification Track" ?

I was wondering how I could suggest the idea to Telerik, to provide "Official Certifications" for people to obtain. Would be another revenue stream for them and something I would like to study for and achieve. 

Thoughts?
Rumen
Telerik team
 answered on 09 Jun 2016
1 answer
149 views

Hello all:

I'm having an issue with RadComboBox not closing the drop down list when moving to a RadSearchBox.

I have a RadSearchBox in the master page and several RadComboBoxes all over the web application, but when I open the list of the RadComboBox and click on the RadSearchBox the RadComboBox list does not close.

the expected behavior is that when the user clicks outside any RadComboBox the list is closed, and this is true except when clicking on a RadSearchBox.

Regards,

Peter Milchev
Telerik team
 answered on 09 Jun 2016
4 answers
207 views

Hi,

I was following below example to select multiple files, facing following issues.

http://demos.telerik.com/aspnet-ajax/asyncupload/examples/validation/defaultcs.aspx?show-source=true

1. When click on "Select" button, and select a file (.pdf) the file getting opened and browse window get frozen.

2. How to show selected success/failure icon, file name, file size followed by "Remove" link and followed by message "This file exceeds the maximum allowed size of 500 KB."

 

 

Ivan Danchev
Telerik team
 answered on 09 Jun 2016
1 answer
205 views

I have the format set to be M/d/yyyy, and it works when selecting a date but if there is any postback on the page it changes for format to use the dashes like M-dd-yyyy.  Any ideas how to fix this?

 

 

<telerik:RadDatePicker ID="radGridDate1" Runat="server" SelectedDate='<%# DateTime.Parse( Eval("Date", "{0:M/dd/yyyy}")) %>' Width="100px" Skin="Bootstrap" >
                                                 <Calendar EnableWeekends="True"  ShowRowHeaders="false" Skin="Bootstrap" > </Calendar>
                                                 <DateInput DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy" LabelWidth="40%">
                                                     <EmptyMessageStyle Resize="None" />
                                                     <ReadOnlyStyle Resize="None" />
                                                     <FocusedStyle Resize="None" />
                                                     <DisabledStyle Resize="None" />
                                                     <InvalidStyle Resize="None" />
                                                     <HoveredStyle Resize="None" />
                                                     <EnabledStyle Resize="None" />
                                                 </DateInput>
                                                 <DatePopupButton HoverImageUrl="" ImageUrl="" />
                                            </telerik:RadDatePicker>

Thanks
Vasil
Telerik team
 answered on 09 Jun 2016
1 answer
458 views

Trying to use an ODataDataSource with a RadSearchBox.  When I try to use it, I get the following error:

The query specified in the URI is not valid. The value for OData query '$orderby' cannot be empty.

Is there a way to set an orderby that I can pass?  I don't see an option (or maybe I'm going nuts - could be) and it appears as though the ODataDataSource is just passing a blank $orderby= in the query string. 

Thanks,

Richard

Bozhidar
Telerik team
 answered on 09 Jun 2016
1 answer
133 views

I bound the radListview control by client side. I want access control (make it visible true/false) in the OnTemplateDataBoundevent of the RadLitsView.

The event is firing but I don't know how to access the controls in the ListView.

Also I want to set the command Names and fire Item Command event and in the command event want make the RadLitsView rows visible true/false.

Please help me to achieve the above functionality.

Eyup
Telerik team
 answered on 09 Jun 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?