Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
315 views
Hi -

I am new to RadControls, and I am having an issue accessing the RadUpload control when it is nested deep inside a RadGrid.

The RadUpload is inside of a RadMultiPage, in the FormTemplate of a RadGrid.  I am trying to manipulate the uploaded files, but I can't figure out how to get a reference to the RadUpload when my submit button is clicked.  Below is my aspx code for the entire RadGrid:

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False"  
                        AllowSorting="True" Skin="Black" 
                        AllowPaging="True" PageSize="5" GridLines="None" DataSourceID="SqlDataSource1" 
                        AllowAutomaticDeletes="false" AllowAutomaticInserts="false" AllowAutomaticUpdates="false"  
                        ShowDesignTimeSmartTagMessage="False" ShowGroupPanel="true"
                        <PagerStyle Mode="NumericPages" /> 
                        <MasterTableView CellSpacing="-1" DataKeyNames="IDDepartment" DataSourceID="SqlDataSource1" EditMode="EditForms" 
                            EnableTheming="true" CommandItemDisplay="Top"
                            <EditFormSettings EditFormType="Template"
                                <FormTemplate> 
                                    <asp:Panel ID="InnerContainer" runat="server" Visible="true" style="padding:15px;"
                                        <telerik:RadTabStrip ID="RadTabStrip1" runat="server"  
                                            MultiPageID="RadMultiPage1" SelectedIndex="0" Skin="Black"
                                            <Tabs> 
                                                <telerik:RadTab runat="server" PageViewID="RadPageView1" Text="Dept Info"
                                                </telerik:RadTab> 
                                                <telerik:RadTab runat="server" PageViewID="RadPageView2" Text="Dept Contacts"
                                                </telerik:RadTab> 
                                                <telerik:RadTab runat="server" PageViewID="RadPageView3" Text="Dept Files"  
                                                    Selected="True"
                                                </telerik:RadTab> 
                                            </Tabs> 
                                        </telerik:RadTabStrip> 
                                        <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"
                                            <telerik:RadPageView ID="RadPageView1" runat="server" BorderColor="Black"  
                                                BorderStyle="Solid" BorderWidth="1px"
                                                <table> 
                                                    <tr> 
                                                        <td> 
                                                            Name:</td> 
                                                        <td> 
                                                            <asp:TextBox ID="Name" runat="server" Text='<%# Bind( "Name" ) %>'></asp:TextBox> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td> 
                                                            Description:</td> 
                                                        <td align="center"
                                                            <telerik:RadEditor ID="Description" runat="server" BackColor="White"  
                                                                HTML='<%# Bind( "Description" ) %>' Skin="Black"
                                                                <CssFiles> 
                                                                    <telerik:EditorCssFile Value="~/css/Styles1.css" /> 
                                                                </CssFiles> 
                                                                <Content> 
                                                                 
                                                                </Content> 
                                                            </telerik:RadEditor> 
                                                        </td> 
                                                    </tr> 
                                                </table> 
                                            </telerik:RadPageView> 
                                            <telerik:RadPageView ID="RadPageView2" runat="server" BorderColor="Black"  
                                                BorderStyle="Solid" BorderWidth="1px"
                                                <table> 
                                                    <tr> 
                                                        <td></td
                                                        <td>Hold Ctrl to select multiple<br /></td
                                                    </tr> 
                                                    <tr> 
                                                        <td>Contacts:</td> 
                                                        <td> 
                                                            <asp:ListBox ID="lstContacts" runat="server" DataSourceID="SqlDataSource2"  
                                                                DataTextField="FullName" DataValueField="IDEmployee"  
                                                                ondatabound="lstContacts_DataBound" SelectionMode="Multiple" Width="250px"></asp:ListBox> 
                                                        </td> 
                                                    </tr> 
                                                </table> 
                                            </telerik:RadPageView> 
                                            <telerik:RadPageView ID="RadPageView3" runat="server" BorderColor="Black"  
                                                BorderStyle="Solid" BorderWidth="1px"
                                                <telerik:RadGrid ID="RadGrid2" runat="server" AutoGenerateColumns="False"  
                                                    AllowSorting="True" Skin="Black" AllowPaging="True" PageSize="5"  
                                                    GridLines="None" 
                                                    ShowDesignTimeSmartTagMessage="False" ShowGroupPanel="True"  
                                                    onneeddatasource="RadGrid2_NeedDataSource"
                                                    <MasterTableView CellSpacing="-1"
                                                        <RowIndicatorColumn> 
                                                            <HeaderStyle Width="20px" /> 
                                                        </RowIndicatorColumn> 
                                                        <ExpandCollapseColumn> 
                                                            <HeaderStyle Width="20px" /> 
                                                        </ExpandCollapseColumn> 
                                                        <Columns> 
                                                            <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"  
                                                                ConfirmDialogType="RadWindow" ConfirmText="Are you sure you want to delete this record?" 
                                                                UniqueName="Delete"
                                                            </telerik:GridButtonColumn> 
                                                            <telerik:GridBoundColumn DataField="FileName" HeaderText="File Name"  
                                                                SortExpression="FileName" UniqueName="FileName"
                                                            </telerik:GridBoundColumn> 
                                                            <telerik:GridBoundColumn DataField="Description" HeaderText="Description"  
                                                                SortExpression="Description" UniqueName="Description"
                                                            </telerik:GridBoundColumn> 
                                                        </Columns> 
                                                    </MasterTableView> 
                                                </telerik:RadGrid> 
                                                
                                                <table width="100%"
                                                    <tr> 
                                                        <td>Upload file: </td> 
                                                        <td> <div class="FileDetails"
                                                            <telerik:RadUpload ID="RadUpload1" runat="server" MaxFileInputsCount="5"  
                                                                OnClientAdded="addTitle"  
                                                                TargetFolder="~/files" EnableFileInputSkinning="true"  
                                                                ControlObjectsVisibility="RemoveButtons, AddButton" Skin="Black"
                                                            </telerik:RadUpload> 
                                                            <div class="UploadButton"><asp:Button Width="75px" id="buttonSubmit" runat="server" OnClick="buttonSubmit_Click" text="Upload" /></div></div> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td align="center" colspan="2"
                                                           <telerik:RadProgressArea ID="RadProgressArea1" runat="server" Skin="Black"
                                                                <Localization Uploaded="Uploaded" /> 
                                                            </telerik:RadProgressArea> <br /><br /> 
                                                             
                                                        </td> 
                                                    </tr> 
                                                </table> 
                                             
                                            </telerik:RadPageView> 
                                        </telerik:RadMultiPage> 
                                        <table width="100%"
                                            <tr> 
                                                <td align="center"
                                                    <asp:Button ID="Update" runat="server" Text="Update" CommandName="Update" /> 
                                                    <asp:Button ID="Cancel" runat="server" Text="Cancel" CommandName="Cancel" /> 
                                                </td> 
                                            </tr> 
                                        </table> 
                                    </asp:Panel> 
                                </FormTemplate> 
                            </EditFormSettings> 
                            <Columns> 
                                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="Edit"
                                </telerik:GridEditCommandColumn> 
                                <telerik:GridBoundColumn DataField="Name" HeaderText="Name"  
                                    SortExpression="Name" UniqueName="Name"
                                </telerik:GridBoundColumn> 
                                <telerik:GridBoundColumn DataField="Description" HeaderText="Description"  
                                    SortExpression="Description" UniqueName="Description"
                                </telerik:GridBoundColumn> 
                                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete"  
                                    ConfirmDialogType="RadWindow"  
                                    ConfirmText="Are you sure you want to delete this record?" Text="Delete"  
                                    UniqueName="Delete"
                                </telerik:GridButtonColumn> 
                            </Columns> 
                        </MasterTableView> 
                    </telerik:RadGrid> 

Can someone tell me how to access RadUpload1 from the buttonSubmit_Click event?
Peter Filipov
Telerik team
 answered on 05 Sep 2012
1 answer
106 views
Hello Team;
Is there any plan to upgrade the RADAsyncUpload control to take advantage of the new .Net 4.5 Async model for Q3?

Thanks!
..Ben
Dimitar Terziev
Telerik team
 answered on 05 Sep 2012
2 answers
98 views
Hi Team,
I need to close the calender popup when the mouse leave it.
regards,
Mohammed
Top achievements
Rank 2
 answered on 05 Sep 2012
1 answer
394 views
Hey All,

I've been searching for a solution to this problem for days now and its starting to get ridiculous. The page I'm building is quite simple. It's got 4 RadComboBoxes, each bound to an ASP SqlDataSource with their SelectCommand set to nothing (SelectCommand=""), except the first one. Once the page loads, the user needs to choose an option from the very first combo box which contains list items only. Once the item is selected, the control posts back and I can then generate the SQL query required to populate the second combo box. Once the user has made his/her selection in the second combo box, the SQL query is build up again for the third combo box and so forth. As mentioned, the first combo box contains list items only and then the 2nd, 3rd and 4th combo boxes contains checkboxes (user must select multiple items from each). Once the combo box (containing the checkboxes) are closed, there is no postback occurring - only when that control has lost focus, then the post back occurs. To the end-user, it seems like the system isn't responding but in the meantime, the Telerik RadComboBox isn't posting back as it should.

At first I thought it might be a setting I've added there that's causing this, but after creating a test page and only the basic settings, the same problem occurs:

ASPX:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestCombo.aspx.cs" Inherits="TestCombo" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     
    <telerik:RadScriptManager ID="ScriptManager1" runat="server"></telerik:RadScriptManager>
     
    <div>
        <telerik:RadComboBox ID="cboTest" runat="server" AutoPostBack="true"
            CheckBoxes="true" AllowCustomText="false"
            onselectedindexchanged="cboTest_SelectedIndexChanged">
            <Items>
                <telerik:RadComboBoxItem Text="Item 1" Value="1" />
                <telerik:RadComboBoxItem Text="Item 2" Value="2" />
            </Items>
        </telerik:RadComboBox>
    </div>
    </form>
</body>
</html>

C#:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class TestCombo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
 
    }
 
    protected void cboTest_SelectedIndexChanged(object sender, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
    {
        throw new Exception("SelectedIndexChanged");
    }
}

It is quite vital for me to have the combobox post back as soon as its closed (not when it has lost focus). Is there any workaround for this?
Princy
Top achievements
Rank 2
 answered on 05 Sep 2012
3 answers
65 views
Hello again,
I can't refresh grid on UpdateCommand, the data are saved but the grid look like it's freeze, I think that's happening because I'v put grid into UpdatePanel to refresh data from outside.
gezim
Top achievements
Rank 1
 answered on 05 Sep 2012
1 answer
102 views
Hi,

Is it possible to change the target folder from the client side?  I have a combobox with a list of possible folders, and when the selection is changed, I want to change the target folder for the upload.

function OnClientSelectedIndexChanged(sender, eventArgs) {
      var item = eventArgs.get_item();
      var upload = $find("<%= RadAsyncUpload1.ClientID %>");
      upload.TargetPath = ???
      alert("You selected " + item.get_text());
}


Alternatively, is it possible to do this on the server side before the files are moved from the temporary directory to the target directory?  I can obviously change the value in a postback, but the upload appears to be happening before my event is called.

Any help would be appreciated.

Thanks,
Mathew
Plamen
Telerik team
 answered on 05 Sep 2012
1 answer
113 views
Hello Team,

I seek your help and suggestions on "RadHtmlChart" control. We have to use RadHtmlChart to show the drilling down functionality with "Pie" and "bar" charts. I have started using this control but its better to have some suggestions from you guys before finishing it up.

1) I am creating a page where i need to show drilling down of data with pie chart and bar charts. I want to focus on look and feel of the charts. We want the pie charts and bar charts to be good in look and feel, must be flashy and interactive etc. Can you suggest the proper links from where we can refer this kind of charts(for drilling down data).

2) with a good look and feel we want to show some information when user will hover on information , we want the pie's and bars to move and dance. Please help us to find such a good links and demos from where we can refer such type of functionality for RadHtmlChart.

Looking forward for your response.

Thanks and have a great day.!!!
Aakansha
Marin Bratanov
Telerik team
 answered on 05 Sep 2012
1 answer
87 views
HI All,

Can anybody assist me on the below error,

<

telerik:RadScriptManager ID="sm1" runat="server" />

 

Kate
Telerik team
 answered on 05 Sep 2012
4 answers
138 views
Hi there,

I'm using the RadEditor for ASP.net from the 2012.1.215.40 Release with SpellChecking enabled in a .Net 4.0 Web Application.

The scenario is that various web servers should use the same dictionaries (especially to share the custom dictionaries).

Everything works fine as long as the dictionary folder resides on the same server. But spell checking fails when it is on a different one.

DictionaryPath is set like "\\server-name\share", same on all systems.

Error Message in Response and EventLog is:

No dictionary loaded. Set the DictionaryPath property from the spell checker settings or copy the dictionaries to ~/App_Data/RadSpell/

The share's security settings are lowered by now to "Everyone" having full access.

Any suggestions on how to set this up correctly or how to find the proper cause for the error?

Kind regards,
Markus
Markus Wolff
Top achievements
Rank 1
 answered on 05 Sep 2012
1 answer
104 views
Hello

I only find CTP setup for dowloading on Telerik website. Where or how do I get the official release of SharePoint 2010 Acceleration Kit?

Thank you and regards,
Roger
Rumen
Telerik team
 answered on 05 Sep 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?