Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
108 views
Hello,

For anyone out there using IE 9 and version 2010.1.519.35 ASP .NET I think I may have found a bug. Now I am not sure if this is a Telerik or Msoft issue but it is there either way. The drag and drop capability was not working between the two list boxes. Had me pulling my hair out till I tried other IE versions along with Safari and Firefox. The code below worked in every way except for drag and drop and the Server side API event were not firing.

<td>
     <telerik:RadListBox ID="AvailableRolesListBox" runat="server" Height="200" DataTextField="DisplayName" DataValueField="RoleId" CssClass="AvailableRolesListBox" SelectionMode="Multiple" AllowTransfer="true" TransferToID="SelectedRolesListBox" OnTransferred="RadListBox_Transferred" AutoPostBackOnTransfer="true" EnableDragAndDrop="true" AllowTransferOnDoubleClick="true" OnDropped="RadListBox_Dropped" Skin="WebBlue" />
</td>
 
<td>
       
</td>
                     
<td>
     <telerik:RadListBox ID="SelectedRolesListBox" runat="server" Height="200" DataTextField="DisplayName" DataValueField="RoleId" CssClass="SelectedRolesListBox" SelectionMode="Multiple" AllowTransfer="true" TransferToID="AvailableRolesListBox" OnTransferred="RadListBox_Transferred" AutoPostBackOnTransfer="true" EnableDragAndDrop="true" AllowTransferOnDoubleClick="true" OnDropped="RadListBox_Dropped" Skin="WebBlue" />
</td>


As I mentioned earlier I don't know if this is a problem with IE or Telerik and I know that Telerik has a newer release of the ASP .NET controls and hopefully by Q4 I can get this very large site upgraded to them. This post is mostly to help anyone out there hitting the same wall and Goggling for help.

JB
federic batista
Top achievements
Rank 1
 answered on 11 Nov 2011
1 answer
85 views
Hi telerik team,

I need a clarification in add custom drop down.
When i add custom drop down via code behind,only able to see the custom drop down only.

Instead of that ,Is any possibility to add custom dropdown in that full set of tools. If possible,share any idea to proceed.

Expecting your valuable suggestions.

Thank you.
Rumen
Telerik team
 answered on 11 Nov 2011
2 answers
50 views
Currently, the date is a Link, and I don't want it to be.  How do I disable that?
Peter
Telerik team
 answered on 11 Nov 2011
10 answers
130 views
I just ran the Telerik update wizard because for some reason my web.config was not setup to run RadControls. It modified my web.config. I am not getting the following error:

ASP.NET Ajax client-side framework failed to load.

What is going on? Can someone please help me unscrew my project...

Thanks,
Duncan
Duncan
Top achievements
Rank 2
 answered on 11 Nov 2011
3 answers
156 views
Hi Telerik,

I am trying to figure out if I have something wrong with my architecture, or if I am just in need of a quick fix.

I have the following on my page:

<csw:UploadDashboardRadWindow ID="UploadDashboardWindow" Runat="Server">
    <ContentTemplate>
        <div ID="UploadDashboardDecorationZone">
            <fieldset id="UploadDashboard">
                <legend>Upload Dashboard</legend>
                <telerik:RadUpload ID="UploadDashboardSelector" Runat="server" Width="235px" AllowedFileExtensions=".xml"  MaxFileInputsCount="1" ControlObjectsVisibility="None" />
            </fieldset>       
            <div class="BottomButton">
                <telerik:RadButton ID="SubmitUploadDashboardButton" Runat="Server" Text="Upload" OnClientClicked="CloseUploadDashboard" /> 
            </div>
        </div>
    </ContentTemplate>
</csw:UploadDashboardRadWindow>

and the following server-side code:

protected void Page_Init(object sender, EventArgs e)
{
    if (Request.Files.Count > 0) HandleUploadedFile();
}

HandleUploadedFiles() works perfectly fine, but I am left with my Request's HTTPMethod set to POST and not GET. This means that if the user tries to refresh my Web Application they are prompted with a confirm form resubmission alert.

Previously, I had fixed this with the following:

Page.Response.Redirect(Page.Request.Url.ToString(), true);

But new additions to my code makes this a non-acceptable solution. Namely, I have implemented Start Edit / Cancel Edit / Save Changes -- and refreshing the page is analogous to 'Cancel Edit.' As such, refreshing via code isn't a possibility.

Could you show me how to parse an uploaded file while keeping the RadWindow wrapped in an update panel? Whenever I try to do it, Request.Files.Count is 0. 

Thanks

Peter Filipov
Telerik team
 answered on 11 Nov 2011
5 answers
278 views

I have a TreeList with a popup EditForm Template. I would like to be able to enable/disable some of the controls based on the user’s input. Is there a way to put client script in the EditForm Template to control their state?

Paul
Top achievements
Rank 1
 answered on 11 Nov 2011
1 answer
72 views
Is Telerik by any chance working on a built-in merged columns functionality? The existing suggested work-arounds are ok, but it forces you to use a TemplateColumn, thus losing the benefits of the many strongly-typed columns Telerik has created and it also doesn't work in various scenarios (such as with frozen columns). I'm sure it is more complicated than simply adding a new "item" type above the header item, but this functionality really only consists of grapical representation of spanned columns. Ideally, each column might have a "ColumnGroup" property which defines which columns are grouped together. Or, it might be even more logical for telerik to create a "ColumnGroups collection under the mastertableView like so...

<MasterTableView>
    <ColumnGroup  UniqueName="Something" Header Text="Whatever" Tooltip="Something Cool">
        <Columns>
            <Column....
        </Columns>
    </ColumnGroup>
    <ColumnGroup  UniqueName="SomethingElse" Header Text="Whatever Else">
        <Columns>
            <Column....
        </Columns>
    </ColumnGroup>
</MasterTableView>
Pavlina
Telerik team
 answered on 11 Nov 2011
4 answers
224 views
Hi, I wasn't sure where to put this suggestion/request but would it be possible for you to add a static "cast()" method to your client side javascript classes?

I know Visual Studio SP1 has had some work done to improve the javascript intellisense but currently there is a common scenario where intellisense fails and could so easily be fixed.

The scenario is where you have a client side event handler, for example:

...
var win = new Telerik.Web.UI.RadWindow(parent);
win.initialize();
...
win.add_close(function(sender, e)
    {
        // No intellisense on "sender" or "e".
    }
);

What would be useful is if the handler could be written like this:

win.add_close(function(sender, e)
    {
        sender = Telerik.Web.UI.RadWindow.cast(sender);
        e = Telerik.Web.UI.RadWindowEventArgs.cast(e);

        // Intellisense is now fully enabled on "sender" and "e"
        sender.dispose();
    }
);

The actual code you would need to add to your classes would be like this:

Telerik.Web.UI.RadWindow.cast = function(obj)
{///<returns type="Telerik.Web.UI.RadWindow"/>
    return obj;
}

I hope that makes sense and I'm sure it would be very useful to any developers dealing with an increasingly complex client side API.

Many thanks

Kevin
teeberryu
Top achievements
Rank 1
 answered on 11 Nov 2011
1 answer
187 views
Hi,

I would like to use a Rad Splitter to show and hide the Command Item Template.

The functionality would be sililar to this example:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandsplitterresizing/defaultcs.aspx?product=splitter

Please advise if this is possible.


Thanks in advance,

Ryan
Dobromir
Telerik team
 answered on 11 Nov 2011
3 answers
318 views
I've a problem.
grid.MasterTableView.GetSelectedItems() == 0

my Aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/UI/Doculex.Master" AutoEventWireup="true" CodeBehind="DocumentsList.aspx.cs" Inherits="WebSearch.UI.DocumentsList" %>
<%@ MasterType VirtualPath="~/UI/Doculex.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<telerik:RadCodeBlock runat="server">

</telerik:RadCodeBlock>
<%-- <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="UserGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="UserGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
                   
                </UpdatedControls>
            </telerik:AjaxSetting>
              <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="UserGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
                        
                    </UpdatedControls>
                </telerik:AjaxSetting>  
        </AjaxSettings>
    </telerik:RadAjaxManager>--%>
    <div class="headerPage">
        <asp:Label ID="lblTitle" runat="server"></asp:Label>
    </div>
    <div class="containerSub" id ="containerSub" runat="server">
    <telerik:RadSplitter  ID ="Splitter"  Width = "100%"  Height ="100%" Orientation="Vertical"  runat="server">
        <telerik:RadPane runat="server" ID="gridPane" Scrolling="None" Height="80%"  Width=100%>
             <telerik:RadGrid ID="DocumentGrid" runat="server"
            AllowPaging="True" AllowSorting="True"
            AllowFilteringByColumn="true"             
            CellSpacing="0"
            EnableHeaderContextMenu ="true" EnableHeaderContextFilterMenu="true"
            GridLines="None"  
            Width="99.8%" PageSize="12" Height="500px" AutoGenerateColumns="False"  
           EnableLinqExpressions="false"  EnableViewState="false"
            onneeddatasource="DocumentGrid_NeedDataSource"
            onprerender="DocumentGrid_PreRender"
                 onitemcommand="DocumentGrid_ItemCommand"   >
            <ItemStyle VerticalAlign="Top" />
           
            <GroupingSettings CaseSensitive="false" />
         
            <MasterTableView  CommandItemDisplay="None"  DataKeyNames="Id" Width="100%"
                TableLayout="Auto"  PagerStyle-Mode="NumericPages">
                   <Columns>
                         <telerik:GridTemplateColumn  UniqueName="Select" HeaderStyle-Width="3%"  AllowFiltering="false">
                          
                          <ItemTemplate>
                           <asp:CheckBox  id="chkSelect" runat="server"  />
                          </ItemTemplate>
                          
                       </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
                  <ClientSettings Scrolling-SaveScrollPosition="true"  EnablePostBackOnRowClick="true"  Scrolling-AllowScroll="true"  ActiveRowIndex="true" AllowColumnsReorder="true" AllowColumnHide="true"
                  >
                  <Selecting AllowRowSelect="true" />
                           <ClientEvents OnColumnHidden="ColumnHiding"   />
                          <Resizing AllowColumnResize="false"></Resizing>

                              
                         </ClientSettings>
                </telerik:RadGrid>
        </telerik:RadPane>
       <telerik:RadPane ID="searchPane" Width="20px"  runat="server" Scrolling="None" Height="80%"  >
            <telerik:RadSlidingZone runat="server" ID="PreviewZone" SlideDirection="Left" >
                  <telerik:RadSlidingPane ID="DocPreview" runat="server" Width="300px" OnClientDocked = "PaneDockDocPreview"
                                             OnClientUndocked = "PaneUnDockDocPreview">
                                             <div Id="preview" runat="server"></div>
                 </telerik:RadSlidingPane>
            </telerik:RadSlidingZone>
        </telerik:RadPane>
    </telerik:RadSplitter>
    
    </div>




</asp:Content>

my C#

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Resources;
using System.Web;
using Telerik.Web.UI;
using WebSearch.Components;
using WebSearch.SecurityModel;
using WebSearch.UI.Model;
using WebSearch.UI.Model.Items.Grid;
using WebSearch.UI.Model.Screen;

namespace WebSearch.UI
{
    public partial class DocumentsList : System.Web.UI.Page
    {
        #region Properties

        private GridScreen _grid;
        private UIContainer _container;
        private string _culture;
        private ResourceManager _resources;
        private readonly Organization _organization = new Organization();

        #endregion

      

        #region Events
        protected void Page_Load(object sender, EventArgs e)
        {
            GetInfo();

            if (Page.IsPostBack)
            {
                App.SavePreferencesGrid(DocumentGrid);
                App.SavePane();
            }

            if (!Page.IsPostBack)
            {
                LoadSettings();
                CreateGrid();
                App.LoadPreferencesGrid(DocumentGrid);
                App.LoadPane(PreviewZone);

               
            }
            
            DocumentGrid.HeaderContextMenu.ItemCreated += new RadMenuEventHandler(HeaderContextMenu_ItemCreated);

        }

       

        void HeaderContextMenu_ItemCreated(object sender, RadMenuEventArgs e)
        {
            CommonFunctions.HideColumns(sender, e);
            CommonFunctions.HideSpecialColumns("Select", e.Item);
            CommonFunctions.HideSpecialColumns("Id", e.Item);
           
        }
        
        #endregion

        #region Methods
      
        

        private void CreateGrid()
        {
           
            List<DocumentTypeField> documentTypeFieldList = _organization.GetDocumentTypeField(1);

            foreach (DocumentTypeField documentTypeField in documentTypeFieldList)
            {
                GridBoundColumn boundColumn = new GridBoundColumn();
                DocumentGrid.MasterTableView.Columns.Add(boundColumn);

                boundColumn.DataField = documentTypeField.Name;
                boundColumn.HeaderText = documentTypeField.Header;
                boundColumn.UniqueName = documentTypeField.Name;
                boundColumn.Visible = documentTypeField.IsVisible;
                if (!documentTypeField.IsVisible) boundColumn.Display = false;
            }

            GridBoundColumn boundColumnId = new GridBoundColumn();
            DocumentGrid.MasterTableView.Columns.Add(boundColumnId);

            boundColumnId.DataField = "Id";
            boundColumnId.UniqueName = "Id";
            boundColumnId.Visible = false;
            boundColumnId.Display = false;

        }

        private void GetInfo()
        {
            _culture = App.CurrentCulture();
            _resources = App.GetMasterResources("DocumentsList");
        }

        private void LoadSettings()
        {
            lblTitle.Text = _resources.GetString(lblTitle.ID, new CultureInfo(_culture));

            DocPreview.IconUrl = VirtualPathUtility.ToAbsolute("~/UI/Images/layout.png");
            DocPreview.TabView = SplitterSlidePaneTabView.ImageOnly;
            DocPreview.Title = _resources.GetString("TitleViewPane", new CultureInfo(_culture));
            DocPreview.UndockText =
                _resources.GetString("UndockViewPane", new CultureInfo(_culture));
            DocPreview.DockText =
                _resources.GetString("DockViewPane", new CultureInfo(_culture));
            DocPreview.ToolTip =
                _resources.GetString("ToolTipViewPane", new CultureInfo(_culture));

            PreviewZone.Style.Add("position", "static");
            
        }
        #endregion

        protected void DocumentGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
           // RadRibbonBar menu= Master.FindControl("TopMenu") as RadRibbonBar;
            DocumentGrid.DataSource = GenericGrid.ListDocuments;
        }

        protected void DocumentGrid_PreRender(object sender, EventArgs e)
        {
            DocumentGrid.MasterTableView.GetColumnSafe("RowIndicator").Display = false;
            DocumentGrid.MasterTableView.GetColumnSafe("Id").Display = false;
            CommonFunctions.GridOptions(DocumentGrid);
        }

        protected void DocumentGrid_ItemCommand(object sender, GridCommandEventArgs e)
        {
            RadGrid grid = (RadGrid)sender;


            switch (e.CommandName)
            {
                case "RowClick":

                    preview.InnerHtml = null;

                    foreach (GridDataItem selectedItem in grid.MasterTableView.GetSelectedItems())
                    {
                        string[] extension = selectedItem["FileName"].Text.Split('.');
                        string path = AppDomain.CurrentDomain.BaseDirectory + "TempFolder";
                        String fileName = selectedItem["FileName"].Text.ToString();
                        path = path + " \\" + fileName;
                        switch (extension[1].ToLower())
                        {
                            case "txt":
                                StreamReader oStreamReader = File.OpenText(path);
                                string contents = oStreamReader.ReadToEnd();

                                preview.InnerHtml = contents;

                                oStreamReader.Close();
                                break;



                            case "pdf":

                                preview.InnerHtml =
                                    "<iframe src=\"../TempFolder/" + fileName + "\" style=\"width:718px; height:700px;\" frameborder=\"0\"></iframe>";

                                break;

                            default:

                                preview.InnerHtml = "<b>Preview not available<b>";
                                break;

                        }


                        PreviewZone.ExpandedPaneId = "DocPreview";
                        PreviewZone.DockedPaneId = "DocPreview";

                    }
                    break;

            }
        }
    }
}

thanks
July
Top achievements
Rank 2
 answered on 11 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?