Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
99 views
I've created a system for importing images, where each image is "processed" during the import process.  This process allows you to resize, crop, flip, rotate, add whitespace, etc.  For the whitespace, I allow the user to select a color (so that the whitespace can be blue, for example).  To do this, I use a RadColorPicker.  (My first time using this control!)

My problem occurs when I import a lot of images.  (I'm using the multi-file upload control - thank you!)  For each uploaded image, I show a processing panel that allows them to manipulate the image.  If there are a lot of images, there are a lot of panels.  Each panel is probably about 400-500 px high, which can make for a long page.  When it's over 9999 px high, you start seeing these hidden sliders.  In the HTML source, I see the following:

<div id="Main_gob_CustomForm3_gob_ctl04_BGColorThumb_label" title="Background Color (Current Color is #FFFFFF)" class="rcpIcon">
<a href="#">Background Color</a><em id="Main_gob_CustomForm3_gob_ctl04_BGColorThumb_icon" style="background-color:#FFFFFF;">(Current Color is #FFFFFF)</em>
</div><div id="Main_gob_CustomForm3_gob_ctl04_ctl11" class="RadSlider RadSlider_Default" style="position:absolute;top:-9999px;height:22px;width:200px;">

If you look, you can see there is a slider (class="RadSlider RadSlider_Default" style="position:absolute; top:-9999px ...)

Is there a way to get rid of this?  Obviously, you're hiding this.  Can't you do a style="display:none;" instead of shoving it up so high?

I've uploaded a screen snapshot to show this.  Note the slider stuck in the middle.  This is actually related to another color picker that is in a similar window/tile farther down the page - like 9999px farther down.

Thank you.
LeBear
Top achievements
Rank 1
 answered on 18 Apr 2011
1 answer
96 views
How can I prevent a user from uploading two files with the same filename using the asyncupload control?
Peter Filipov
Telerik team
 answered on 18 Apr 2011
3 answers
128 views
How can i validate the *.mp4 format only in RadUpload?

I tried like AllowedFileExtenstion=".mp4";  But it doesnt work for me.
Peter Filipov
Telerik team
 answered on 18 Apr 2011
1 answer
70 views

I am relatively knew to the Telerik controls but have been a developer for several years. I want to implement a load on demand combo box for my newest project(well several really), the control will load from a page method. I got the control to load initially, but as you type the dropdown just bounces a little without narrowing the search or showing any type of error. Below is the code that is currently being used for the control, and page method.

private const int ItemsPerRequest = 20;

[WebMethod]
public static RadComboBoxData GetContributors(RadComboBoxContext context)

     DataTable data = GetContributors(); 
     RadComboBoxData comboData = new RadComboBoxData();
     int itemOffset = context.NumberOfItems;
     int endOffSet = Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count);
     comboData.EndOfItems = endOffSet == data.Rows.Count;

     List<RadComboBoxItemData> results = new List<RadComboBoxItemData>(endOffSet - itemOffset);
     for (int i = itemOffset; i < endOffSet; i++)
     {
          RadComboBoxItemData itemData = new RadComboBoxItemData();
          itemData.Text = data.Rows[i]["Contributor"].ToString();
          itemData.Value = data.Rows[i]["ContributorID"].ToString();
          results.Add(itemData); 
     }

     comboData.Message = GetStatusMessage(endOffSet, data.Rows.Count);
     comboData.Items = results.ToArray();
     return comboData;

}

private static string GetStatusMessage(int offSet, int total)

     if (total <= 0)
     {
         return "No matches";
     } 
     else
     { 
         return string.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", offSet, total);
     }
}

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px"> 
<telerik:RadComboBox ID="radcboAutoContributorNames" EmptyMessage="Please enter contributor name" Width="200px"            MaxHeight="140px" EnableLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true" Runat="server">
<WebServiceSettings Method="GetContributors" Path="Default.aspx" />
</telerik:RadComboBox>
</telerik:RadAjaxPanel>
Adam
Top achievements
Rank 1
 answered on 18 Apr 2011
2 answers
203 views
I have a page with several editors and I would like to have a single toolbar to use with all the editors. This toolbar should always be visible.

I have created a sample page that is CLOSE to what I want. However, the toolbars are being duplicated - one for each RadEditor. I know that I will have to use to javascript change which Editor is active when the toolbar is clicked. That's no problem, though.

What do I need to change to only have 1 toolbar that's always visible?

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <div style="display: none;">
        <telerik:RadEditor runat="server" ID="MasterEditor" SkinID="DefaultSetOfTools" EnableViewState="false"
            Height="100px" ContentAreaMode="Div">
            <Tools>
                <telerik:EditorToolGroup DockingZone="divToolbar">
                    <telerik:EditorTool Name="Bold" />
                    <telerik:EditorTool Name="Italic" />
                    <telerik:EditorTool Name="Underline" />
                    <telerik:EditorSplitButton Name="ForeColor" />
                </telerik:EditorToolGroup>
            </Tools>
        </telerik:RadEditor>
    </div>
    <div id="divToolbar" style="background-color: Silver; height: 100px;">
    </div>
    <div>
        <telerik:RadEditor ID="RadEditor1" runat="server" ToolProviderID="MasterEditor" Height="50"
            Width="100" ContentAreaMode="Div" EditModes="Design" EnableViewState="false"
            BorderStyle="None" AutoResizeHeight="True" OnClientLoad="RadEditorLoad" />
    </div>
    <div>
        <telerik:RadEditor ID="RadEditor2" runat="server" ToolProviderID="MasterEditor" Height="50"
            Width="100" ContentAreaMode="Div" EditModes="Design" EnableViewState="false"
            BorderStyle="None" AutoResizeHeight="True" OnClientLoad="RadEditorLoad" />
    </div>
    <script type="text/javascript">
        function RadEditorLoad(editor, args) {
            editor.removeShortCut("InsertTab");
        }
    </script>
Chris
Top achievements
Rank 1
 answered on 18 Apr 2011
1 answer
68 views
I am using the following RadContextMenu in conjunction with a radgrid

<telerik:RadContextMenu ID="grdContextMenu" runat="server"
     EnableRoundedCorners="true" EnableShadows="true" OnClientItemPopulating="FetchUserList_Pre"
     EnableAutoScroll="true"
     OnClientItemPopulationFailed="ServiceFailure"
     >
     <WebServiceSettings Path="../Services/TimeSchedule.asmx" Method="FetchUserList"  />
     <LoadingStatusTemplate>
         <div style="padding-top:100px;text-align:right;width:120px;float:left;">
             <asp:Image runat="server" ID="LoadingImage" ImageUrl="../Images/Working.gif" ToolTip="Loading..."
                 Width="50px" Height="50px" />
                 <br />
                 Loading Users...
         </span>
     </LoadingStatusTemplate>
     <Items>
          
         <telerik:RadMenuItem Text="Add" ToolTip="Add a new record" />
         <telerik:RadMenuItem Text="Delete"   ToolTip="Delete this record"/>
         <telerik:RadMenuItem Text="Copy To Day" ToolTip="Copy this shift to the selected day"
              GroupSettings-Height="165" GroupSettings-ExpandDirection="Auto" >
              
             <Items>
                 <telerik:RadMenuItem Text="Sunday" Value="Sunday"></telerik:RadMenuItem>
                 <telerik:RadMenuItem Text="Monday" Value="Monday"></telerik:RadMenuItem>
                 <telerik:RadMenuItem Text="Tuesday" Value="Tuesday"></telerik:RadMenuItem>
                 <telerik:RadMenuItem Text="Wednesday" Value="Wednesday"></telerik:RadMenuItem>
                 <telerik:RadMenuItem Text="Thursday" Value="Thursday"></telerik:RadMenuItem>
                 <telerik:RadMenuItem Text="Friday" Value="Friday"></telerik:RadMenuItem>
                 <telerik:RadMenuItem Text="Saturday" Value="Saturday"></telerik:RadMenuItem>
                  
             </Items>   
         </telerik:RadMenuItem>
         <telerik:RadMenuItem Text="Copy Shift (Open)"  ToolTip="Copy this shift as open or to another user"
          GroupSettings-Height="250" GroupSettings-Width="200"  GroupSettings-ExpandDirection="Auto"  ExpandMode="WebService"
         >
         </telerik:RadMenuItem>
          
          
     </Items>
 </telerik:RadContextMenu>


As you can see I am using a web service call to populate the menu items of a submenu when I right click on one of the grid rows. This works perfectly.

However, I have run into a problem. The service call at times can take a second or two. That is not really an issue. However, if I select to expand the menu item that is populated using the web service (thus initializing the web call), then click a different menu item (which performs a partial postback) before the web service populates the menu, I get the following error:  'this.get_element()' is null or not an object.

I am guessing that the callback function for the webservice is looking for the radmenu and not finding it, because a postback has occurred. Using the OnClientItemPopulationFailed to suppress the error does not work. I would like to cancel the service call in the OnClientItemClosing event. Does anyone have any idea how to get an instance of the web call and abort it?

Thanks
 

MFitzpatrick
Top achievements
Rank 1
 answered on 18 Apr 2011
2 answers
121 views
I have page with a tabstrip that has two tabs.  Each tab has a grid along with a button to export the grid. 

The first page exports, however the grid on the second tab will not export. 

It does not throw an error, it fires the Grid1.MasterTableView.ExportToExcel() but does not export.  No prompt to save or open.  I have looked over the code and can't see what's causing this.

Is this a limitation of exporting and tabs?

Mike
Top achievements
Rank 1
 answered on 18 Apr 2011
19 answers
280 views
I have a page with three rad comboboxes showing State, City, and PostalCode. It is basically a copy of your multiple combobox example.

This page is one of many in a multistep wizard and each page has previous / next buttons.  The problem occurs if the user goes back one step to the multiple combobox page and then changes the comboboxs. They get the following error on the second combobox:


System.ArgumentOutOfRangeException was unhandled by user code
  Message="Selection out of range\r\nParameter name: value"
  Source="Telerik.Web.UI"
  ParamName="value"

Since I copied your example code, I tested your example to see if your page would also throw an error if I used the back button and then changed the combobox selections. I did get an error.

Here are the steps to reproduce the error:

1) Go to http://www.telerik.com/DEMOS/ASPNET/Prometheus/Combobox/Examples/Functionality/MultipleComboBoxes/DefaultCS.aspx
2) Select a continent, then country, and then city
3) Click on Telerik Home (to simulate clicking a next button like my multistep wizard)
4) Use your browser history to go back (my application has a previous button with onclick=history.back)
5) Selecting a continent will throw an error (I assume on country DataBind)

Regards,
http://www.donaldlee.net
Simon
Telerik team
 answered on 18 Apr 2011
1 answer
90 views
Hi,
I'm new to this project and to RadControls so please bare with me. I have a button that when clicked I need to return back a dynamically created document from the server. However, the button is contained with in a user control (ascx) which is apparently dynamically loaded within an asp:panel. I don't exactly understand how this is implemented but here is some of the markup code from the aspx page:
<telerik:RadAjaxManager ID="ajaxManager" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        onajaxrequest="ajaxManager_AjaxRequest"
        UpdatePanelsRenderMode="Inline">
        <ClientEvents OnRequestStart="centerLoadingPanel"></ClientEvents>
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ajaxManager">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="infoBar" />
                    <telerik:AjaxUpdatedControl ControlID="errorPanel" />
                    <telerik:AjaxUpdatedControl ControlID="contentScreenPanel" />
                    <telerik:AjaxUpdatedControl ControlID="tabStrip" />
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="errorPanel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="errorLabel" />
                    <telerik:AjaxUpdatedControl ControlID="editMode" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="infoBar">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="screenOverviewPanel" />
                    <telerik:AjaxUpdatedControl ControlID="toolBarPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ToolBarControl1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="contentScreenPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="screenOverviewPanel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblScreenTitle" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

Somewhere later in the same aspx page we have the following code:
<telerik:RadPane runat="Server" ID="lowerContentPane" Scrolling="Both" Width="100%" Height="542">
                            <asp:Panel ID="errorPanel" runat="server">
                                <asp:Label ID="errorLabel" ForeColor="Red" runat="server"></asp:Label>
                                <asp:HiddenField runat="server" ID="editMode" />
                            </asp:Panel>
                            <asp:Panel ID="contentScreenPanel" runat="server"></asp:Panel>
                        </telerik:RadPane>

So it seems that the ascx pages are loaded into the contentScreenPanel.  I don't want to disable ajax for the contentScreenPanel control because that will affect all content loaded in it. I'm wanting to disable ajax for a button within a specific ascx page. I found the following pages that have some info but I'm unsure how to implement this in my situation because they all deal with the RadAjaxPanel and not the RadAjaxManager:
http://www.telerik.com/help/aspnet-ajax/ajax-download.html
http://www.telerik.com/help/aspnet-ajax/ajax-exclude.html
http://www.telerik.com/support/kb/aspnet-ajax/ajax/how-to-disable-ajax-for-specific-items-of-an-ajax-ified-navigational-control.aspx

I appreciate any advice you can offer.
Thanks,
G
20Below
Top achievements
Rank 1
 answered on 18 Apr 2011
2 answers
96 views
I have implemented filtering on my RadGrid via a web service method with the following signature:

public Dictionary<string, object> GetAllUsersGrid(int startRowIndex, int maximumRows, List<GridSortExpression> sortExpression, List<GridFilterExpression> filterExpression)

My problem is I don't want to support all of the available GridSortExpressions.  How do I prevent some of them from appearing in the user interface?

Phil Hadley
Top achievements
Rank 1
 answered on 18 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?