Telerik Forums
UI for ASP.NET AJAX Forum
19 answers
392 views
Hi,
I have an application that uses the RADprogress Manager.  On my dev machine, it works fine, during the file upload the progress bar appears and updates.  I move the application to my production server and the file uploads but no progress area.  In reviewing the forums and other support, I've done/checked the following
- Ensure the two registrations are in web.config (the prod srv is the same - I just change the connection string after I load it)
- No Ajax
- tried setting trust level="Full"
- updated to latest assemblies

I did not try registering the assembly in the GAC, as I run several other website on the server and was uncertain of the effect on them.

The production server is windows 2003 with IE 6.  It is a dedicated server, not shared.  The browser is IE 8.  My dev environment is Windows XP, Visual Studio 2008.

The only two differences I can see beyond the OS difference is that on the produciton server, the website runs as a Virtual Directory under a second website that does not have the appropriate registrations in the web.config.  I didn't purse that further since upload works.  I assume that wouldn't work if it wasn't  seeing the registrations
The other difference is the production server is running dotDefender as an application firewall.  That firewall has not caused any other code issues..

Thanks for you help,
Bob

Genady Sergeev
Telerik team
 answered on 09 Mar 2010
1 answer
162 views
Hi,

I'm trying to use some combo boxes in a custom control.  To get this working I am using AJAX and have a function that I call in the custom control backend that ties the AJAXified controls to the main page's AjaxManager.  This works for the radnumerictextbox controls on the page but for the radcombobox controls the selected index changed event doesn't fire.  If I take the controls out of the custom control and run them in a standard web page it works fine.  Any ideas?  Code is below:

Custom control webpage:
    <tr> 
        <td class="label">Start Date Modifier:</td> 
        <td class="halfWidth">  
            <telerik:RadNumericTextBox ID="uxStartDateModInterval" runat="server" Width="30" DataType="System.Int16" MaxValue="100" MinValue="-100" AutoPostBack="True" ><NumberFormat DecimalDigits="0" /></telerik:RadNumericTextBox> 
            &nbsp;  
            <telerik:RadComboBox ID="uxStartDateModIntervalTypeID" Runat="server" Width="90" MarkFirstMatch="True" AutoPostBack="True" OnSelectedIndexChanged="uxStartDateModIntervalTypeID_SelectedIndexChanged">  
                <Items> 
                    <telerik:RadComboBoxItem runat="server" Text="Day(s)" Value="1" /> 
                    <telerik:RadComboBoxItem runat="server" Text="Week(s)" Value="2" /> 
                    <telerik:RadComboBoxItem runat="server" Text="Month(s)" Value="3" /> 
                    <telerik:RadComboBoxItem runat="server" Text="Quarter(s)" Value="4" /> 
                    <telerik:RadComboBoxItem runat="server" Text="Year(s)" Value="5" /> 
                </Items> 
            </telerik:RadComboBox> 
        </td> 
        <td class="labelBlackLeft" colspan="2">  
            <asp:label ID="uxStartDateExample" runat="server" Text="Ensure both fields have data."></asp:label> 
        </td> 
    </tr> 
    <tr> 
        <td class="label">End Date Modifier:</td> 
        <td class="halfWidth">  
            <telerik:RadNumericTextBox ID="uxEndDateModInterval" runat="server" Width="30" DataType="System.Int16" MaxValue="100" MinValue="-100" AutoPostBack="True" ><NumberFormat DecimalDigits="0" /></telerik:RadNumericTextBox> 
            &nbsp;  
            <telerik:RadComboBox ID="uxEndDateModIntervalTypeID" Runat="server" Width="90" MarkFirstMatch="True" AutoPostBack="True" OnSelectedIndexChanged="uxEndDateModIntervalTypeID_SelectedIndexChanged">  
                <Items> 
                    <telerik:RadComboBoxItem runat="server" Text="Day(s)" Value="1" /> 
                    <telerik:RadComboBoxItem runat="server" Text="Week(s)" Value="2" /> 
                    <telerik:RadComboBoxItem runat="server" Text="Month(s)" Value="3" /> 
                    <telerik:RadComboBoxItem runat="server" Text="Quarter(s)" Value="4" /> 
                    <telerik:RadComboBoxItem runat="server" Text="Year(s)" Value="5" /> 
                </Items> 
            </telerik:RadComboBox> 
        </td> 
        <td class="labelBlackLeft" colspan="2">  
            <asp:label ID="uxEndDateExample" runat="server" Text="Ensure both fields have data."></asp:label> 
        </td> 
    </tr> 

Custom control codebehind
        Public Sub SetupAJAX(ByRef radAjaxManager As Telerik.Web.UI.RadAjaxManager)  
            radAjaxManager.AjaxSettings.AddAjaxSetting(Me.uxStartDateModInterval, Me.uxStartDateExample)  
            radAjaxManager.AjaxSettings.AddAjaxSetting(Me.uxStartDateModIntervalTypeID, Me.uxStartDateExample)  
            radAjaxManager.AjaxSettings.AddAjaxSetting(Me.uxEndDateModInterval, Me.uxEndDateExample)  
            radAjaxManager.AjaxSettings.AddAjaxSetting(Me.uxEndDateModIntervalTypeID, Me.uxEndDateExample)  
        End Sub 
 
        Protected Sub uxStartDateModIntervalTypeID_SelectedIndexChanged(ByVal o As ObjectByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles uxStartDateModIntervalTypeID.SelectedIndexChanged  
            ModifyDate(uxStartDateModInterval, uxStartDateModIntervalTypeID, uxStartDateExample, False)  
        End Sub 
 
        Protected Sub uxEndDateModIntervalTypeID_SelectedIndexChanged(ByVal o As ObjectByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles uxEndDateModIntervalTypeID.SelectedIndexChanged  
            ModifyDate(uxEndDateModInterval, uxEndDateModIntervalTypeID, uxEndDateExample, False)  
        End Sub 
 
        Protected Sub uxStartDateModInterval_TextChanged(ByVal sender As ObjectByVal e As EventArgs) Handles uxStartDateModInterval.TextChanged  
            ModifyDate(uxStartDateModInterval, uxStartDateModIntervalTypeID, uxStartDateExample, False)  
        End Sub 
 
        Protected Sub uxEndDateModInterval_TextChanged(ByVal sender As ObjectByVal e As EventArgs) Handles uxEndDateModInterval.TextChanged  
            ModifyDate(uxEndDateModInterval, uxEndDateModIntervalTypeID, uxEndDateExample, False)  
        End Sub 

Finally on the page that has the custom control placed on it I use the following in the Page_Load event...

uxDateModifierControl.SetupAJAX(uxRadAjaxManager) 

Where uxDataModifierControl is the custom control ID....

Any thoughts?

Regards,

Jon



Jon
Top achievements
Rank 1
 answered on 09 Mar 2010
2 answers
128 views
Hi,

Is there a way I can edit the Filter name of a built-in column Filter option. So if I want to rename "NotIsEmpty" to "NotEmpty" can I do it without ofcourse changing the functionality? If yes how?

Thanks
Phani Musale
Top achievements
Rank 1
 answered on 09 Mar 2010
3 answers
134 views

Hey everyone,

I've got a Textbox being placed inside a RadTreeNode. It all works great, except I can't select any text, either by clicking and dragging, or by using shift and the arrow keys. Is there any easy way I can fix this?

Note: at first, hitting enter didn't work either, but then I found this post:

http://www.telerik.com/community/forums/aspnet-ajax/treeview/radtreeview-control-with-textbox-space-issue.aspx

edited the code a tiny bit, and that works fine now. I tried editing it a bit more to allow for shift-arrowing, but to no avail. 

Thank you,

Tommy Walsh

Tommy Walsh
Top achievements
Rank 1
 answered on 09 Mar 2010
1 answer
148 views
I have a custom field template for choosing / uploading images in my dynamic data project.

The uploading worked fine pretty much out of the box, but I just can't figure out how to get the progress manager / progress area to work. Basically need to provide users with feedback as their files are being uploaded in the DynamicData web application. My Edit page templaet is plain vanilla:

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server"
    <asp:DynamicDataManager ID="DynamicDataManager1" runat="server" AutoLoadForeignKeys="true"
        <DataControls> 
            <asp:DataControlReference ControlID="FormView1" /> 
        </DataControls> 
    </asp:DynamicDataManager> 
    <h2 class="DDSubHeader"
        Edit 
        <%= table.DisplayName %> 
        record</h2> 
    <asp:UpdatePanel ID="UpdatePanel1" runat="server"
        <ContentTemplate> 
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="true" 
                HeaderText="List of validation errors" /> 
            <asp:DynamicValidator runat="server" ID="DetailsViewValidator" ControlToValidate="FormView1" 
                Display="None" /> 
            <asp:FormView runat="server" ID="FormView1" DataSourceID="DetailsDataSource" DefaultMode="Edit" 
                OnItemCommand="FormView1_ItemCommand" OnItemUpdated="FormView1_ItemUpdated" OnDataBound="FormView1_DataBound"
                <HeaderTemplate> 
                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Update" Text="Update" 
                        CssClass="btnNext" /> 
                    <asp:LinkButton ID="LinkButton2" runat="server" CommandName="Cancel" Text="Cancel" 
                        CausesValidation="false" CssClass="btnNext" /> 
                </HeaderTemplate> 
                <EditItemTemplate> 
                    <table id="detailsTable" class="tableHR" cellpadding="6"
                        <asp:DynamicEntity runat="server" Mode="Edit" /> 
                    </table> 
                </EditItemTemplate> 
                <FooterTemplate> 
                    <br /> 
                    <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Update" Text="Update" 
                        CssClass="btnNext" /> 
                    <asp:LinkButton ID="LinkButton4" runat="server" CommandName="Cancel" Text="Cancel" 
                        CausesValidation="false" CssClass="btnNext" /> 
                </FooterTemplate> 
                <EmptyDataTemplate> 
                    <div class="DDNoItem"
                        No such item.</div> 
                </EmptyDataTemplate> 
            </asp:FormView> 
            <asp:EntityDataSource ID="DetailsDataSource" runat="server" EnableUpdate="true"
                <WhereParameters> 
                    <asp:DynamicQueryStringParameter /> 
                </WhereParameters> 
            </asp:EntityDataSource> 
        </ContentTemplate> 
    </asp:UpdatePanel> 
</asp:Content> 
 

my custom field template looks like this:

<%@ Control Language="C#" AutoEventWireup="True" CodeBehind="ImageUpload_Edit.ascx.cs" 
    Inherits="myProject.Admin.ImageUpload_Edit" %> 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<div class="ImagePicker"
    <asp:Panel ID="feedback" runat="server" Visible="false"
        <id="feedbackP" runat="server"
        </p> 
    </asp:Panel> 
    <table> 
        <tr> 
            <td style="width: 10%;"
                Current Image 
            </td> 
            <td> 
                <asp:Image ID="img1" runat="server" Visible="true" ImageUrl='<%# GetImgUrl() %>' 
                    Width="100" Height="100" AlternateText="Selected Image" /> 
                <asp:TextBox ID="TextBox1" runat="server" Text='<%# FieldValueEditString %>' CssClass="DDTextBox"></asp:TextBox> 
                <asp:Button ID="btnClearImg" runat="server" Text="Clear Image" CssClass="btnStandard" 
                    OnClick="btnClearImg_Click" /> 
            </td> 
        </tr> 
        <tr> 
            <td> 
                Upload New Image 
            </td> 
            <td> 
                <telerik:RadUpload ID="RadUpload1" runat="server" AllowedFileExtensions=".jpg, .jpeg" 
                    ControlObjectsVisibility="None" EnableFileInputSkinning="false" RegisterWithScriptManager="true"
                </telerik:RadUpload> 
                <asp:Button ID="btnUpload" runat="server" Text="Upload File" CssClass="btnStandard" 
                    OnClick="btnUpload_Click" /> 
            </td> 
        </tr> 
        <tr> 
            <td> 
                Choose Existing Image 
            </td> 
            <td> 
                <asp:Button ID="btnChooseExisting" runat="server" Text="Choose Existing File" CssClass="btnStandard" 
                    OnClick="btnChooseExisting_Click" /> 
                <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="true" 
                    GridLines="None" PageSize="10" Skin="Office2007" AutoGenerateColumns="false" 
                    Visible="false" OnNeedDataSource="gridsNeedData"
                    <PagerStyle Mode="NumericPages" /> 
                    <MasterTableView NoMasterRecordsText="There are no records for you to view"
                        <Columns> 
                            <telerik:GridTemplateColumn ItemStyle-Width="100px"
                                <HeaderTemplate> 
                                    <asp:Button ID="btnCloseRadGrid1" runat="server" OnClick="btnCloseRadGrid1_Click" 
                                        Text="Close Image Picker" CssClass="btnStandard" /> 
                                </HeaderTemplate> 
                                <ItemTemplate> 
                                    <asp:Button ID="btnSelect" runat="server" OnClick="btnSelect_Click" Text="Select" 
                                        CssClass="btnStandard" /> 
                                    <%--                    <asp:Button ID="btnDelete" runat="server" OnClick="btnDelete_Click" Text="Delete" OnClientClick="return confirm('Are you sure you want to delete this item?\r\n\r\n(Cannot Undo)\r\n');" />--%> 
                                </ItemTemplate> 
                            </telerik:GridTemplateColumn> 
                            <telerik:GridImageColumn DataImageUrlFields="URL" ImageHeight="75" ImageWidth="75" 
                                HeaderText="Image (may appear distorted)" /> 
                            <telerik:GridBoundColumn DataField="FileName" HeaderText="Filename" /> 
                        </Columns> 
                        <AlternatingItemStyle CssClass="rgAltRow" /> 
                        <SortExpressions> 
                            <telerik:GridSortExpression FieldName="FileName" SortOrder="Ascending" /> 
                        </SortExpressions> 
                    </MasterTableView> 
                </telerik:RadGrid> 
            </td> 
        </tr> 
    </table> 
    <asp:RegularExpressionValidator runat="server" ID="RegularExpressionValidator1" CssClass="DDControl" 
        ControlToValidate="TextBox1" Display="Dynamic" Enabled="false" /> 
    <asp:DynamicValidator runat="server" ID="DynamicValidator1" CssClass="DDControl" 
        ControlToValidate="TextBox1" Display="Dynamic" /> 
</div> 
 

and the code behind on the field template is:

using System; 
using System.Collections.Specialized; 
using System.ComponentModel.DataAnnotations; 
using System.Web.DynamicData; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
using Telerik.Web.UI; 
using System.Collections.Generic; 
 
namespace myProject.Admin 
    public partial class ImageUpload_Edit : System.Web.DynamicData.FieldTemplateUserControl 
    { 
        internal sealed class ImageDetails 
        { 
            public string FileName { getset; } 
            public string URL { getset; } 
        } 
 
        string _CurrentFileName { getset; } 
        List<ImageDetails> _ExistingImgList { getset; } 
 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            SetUpValidator(RegularExpressionValidator1); 
            SetUpValidator(DynamicValidator1); 
        } 
 
        protected Uri GetImgUrl() 
        { 
            try 
            { 
                Uri imgUri = new Uri(string.Format("{0}{1}", Constants._WEBIMAGELOCATION, this.FieldValue.ToString())); 
                return imgUri; 
            } 
            catch (Exception) 
            { 
                img1.Visible = false
                return null
            } 
        } 
 
        protected override void ExtractValues(IOrderedDictionary dictionary) 
        { 
            dictionary[Column.Name] = ConvertEditedValue(TextBox1.Text); 
        } 
 
        public override Control DataControl 
        { 
            get 
            { 
                return TextBox1; 
            } 
        } 
 
        protected void gridsNeedData(object sender, GridNeedDataSourceEventArgs e) 
        { 
            GetFileListData(); 
            RadGrid1.DataSource = _ExistingImgList; 
        } 
         
        protected void btnUpload_Click(object sender, System.EventArgs e) 
        { 
            //DisposeRadGrid1(); 
            bool transferSuccessful = false
 
            if (this.RadUpload1.InvalidFiles.Count > 0) 
            { 
                feedbackP.InnerHtml = "You cannot upload that type of file. Please submit documents as JPG images (.JPG, .JPEG)<br />" + 
                    "Please ensure that your uploaded files end with an appropriate file extension (noted above)<br />"
                feedback.CssClass = "emergency_box"
                feedback.Visible = true
            } 
            else 
            { 
                transferSuccessful = HandleUploadedFiles(); 
 
                if (transferSuccessful) 
                { 
                    feedbackP.InnerHtml = "Your file was uploaded successfully."
                    feedback.CssClass = "callout_box"
                    feedback.Visible = true
 
 
                    TextBox1.Text = _CurrentFileName; 
                    ShowImg1(); 
                } 
                else 
                { 
                    feedbackP.InnerHtml = "No File Selected or File upload failed."
                    feedback.CssClass = "callout_box"
                    feedback.Visible = true
                } 
 
 
            } 
        } 
 
        protected void GetFileListData() 
        { 
            List<string> myList = Helpers.callFtpDir(new ftpService.serviceArgs() { transferProfile = Constants._FTPTRANSFERPROFILEMYRECYCLOPEDIA }, Constants._REMOTEPATH); 
 
            _ExistingImgList = new List<ImageDetails>(); 
            myList.ForEach(i => _ExistingImgList.Add(new ImageDetails() { FileName = i, URL = string.Format("{0}{1}", Constants._WEBIMAGELOCATION, i) })); 
        } 
 
        protected void btnChooseExisting_Click(object sender, System.EventArgs e) 
        { 
            GetFileListData(); 
            RadGrid1.DataSource = _ExistingImgList; 
            RadGrid1.DataBind(); 
            RadGrid1.Visible = true
 
            btnChooseExisting.Visible = false
        } 
 
        protected void btnClearImg_Click(object sender, EventArgs e) 
        { 
            DisposeRadGrid1(); 
            img1.Visible = false
            TextBox1.Text = null
        } 
 
        protected void btnCloseRadGrid1_Click(object send, EventArgs e) 
        { 
            DisposeRadGrid1(); 
        } 
 
        protected void btnSelect_Click(object sender, System.EventArgs e) 
        { 
            _CurrentFileName = ((sender as Button).Parent.Parent as GridDataItem)["FileName"].Text; 
            TextBox1.Text = _CurrentFileName; 
            DisposeRadGrid1(); 
            ShowImg1(); 
        } 
        protected void btnDelete_Click(object sender, System.EventArgs e) 
        {  
            // not implemented as will require a yet-unwritten ftp call 
        } 
         
             
         
        private bool HandleUploadedFiles() 
        { 
            //System.Threading.Thread.Sleep(10000);// simulate long file load for testing 
 
            int failCount = 0; 
            bool blnResultsExist = false
            try 
            { 
                blnResultsExist = this.RadUpload1.UploadedFiles.Count > 0; 
                if (blnResultsExist) 
                { 
                    if (System.IO.Directory.Exists(Constants._ATTACHMENTPATH) == false
                    { 
                        try 
                        { 
                            System.IO.Directory.CreateDirectory(Constants._ATTACHMENTPATH); 
                        } 
                        catch (Exception ex) 
                        { 
                            feedbackP.InnerHtml = "Remote directory cannot be created. Error message is " + ex.ToString(); 
                            feedback.CssClass = "emergency_box"
                            feedback.Visible = true
 
                            string strMessage = ""
                            strMessage = ex.Message.ToString() + Constants._VBCRLF + Constants._VBCRLF + ex.StackTrace.ToString(); 
                        } 
                    } 
                } 
                if (RadUpload1.UploadedFiles.Count == 1) 
                { 
                    foreach (Telerik.Web.UI.UploadedFile file in RadUpload1.UploadedFiles) 
                    { 
                        file.SaveAs(string.Format("{0}\\{1}", Constants._ATTACHMENTPATH, file.FileName)); 
 
                        // build the arguments for the ftp service and execute it 
                        ftpService.serviceArgs args = Helpers.buildServiceArgsJobDescription(file); 
                        bool serviceResponse = Helpers.callFtpService(args); 
                        if (serviceResponse == false
                            failCount++; 
                    } 
                } 
            } 
            catch (Exception ex) 
            { 
                string strMessage = ""
                strMessage = ex.Message.ToString() + Constants._VBCRLF + Constants._VBCRLF + ex.StackTrace.ToString(); 
 
                feedbackP.InnerHtml = strMessage; 
                feedback.CssClass = "emergency_box"
                feedback.Visible = true
 
                failCount++; 
            } 
 
            if (failCount == 0 && blnResultsExist) 
                _CurrentFileName = RadUpload1.UploadedFiles[0].FileName; 
 
            return (failCount == 0 && blnResultsExist); 
        } 
 
        private void DisposeRadGrid1() 
        { 
            RadGrid1.DataSource = null
            RadGrid1.Visible = false
            btnChooseExisting.Visible = true
        } 
 
        private void ShowImg1() 
        { 
            img1.ImageUrl = string.Format("{0}{1}", Constants._WEBIMAGELOCATION, _CurrentFileName); 
            img1.Visible = true
        } 
 
    } 
 

I tried replacing the asp:UpdatePanel with teh telerik one; just dropping in the RadProgressManager and RadProgressArea; using the postback trigger method per: http://www.telerik.com/help/aspnet-ajax/upload_uploadingajax.html
etc

Help Please!!

/jonathan
Genady Sergeev
Telerik team
 answered on 09 Mar 2010
1 answer
139 views
Hi, I am using upload and the gridbinary column pretty much right out of the samples found elsewhere on this site. I am not even bothering with upload progress bars, etc. and there is no ajax involved. I am using  Q3 2009, and the Uploaded file name is present, but the length is zero - I am trying to read into a byte array but there is nothing to read into. Here is a code frag - if anyone knows what I am doing wrong here, please  let me know.

Dim editItem As GridEditableItem = DirectCast(e.Item, GridEditableItem)
                    Dim upload As RadUpload = DirectCast(editItem.EditManager.GetColumnEditor("Upload"), GridBinaryImageColumnEditor).RadUploadControl
                    Dim MyUploadedFile As Telerik.Web.UI.UploadedFile = upload.UploadedFiles(0)

                    Dim MyFileName As String = MyUploadedFile.FileName ' this evaluates to the file I am uploading
                    Dim fs As System.IO.Stream = MyUploadedFile.InputStream ' fs.length is always zero.

                    Dim picture As Byte() = New Byte(fs.Length - 1) {}
                    fs.Read(picture, 0, fs.Length - 1)
                    fs.Close()

Genady Sergeev
Telerik team
 answered on 09 Mar 2010
6 answers
718 views
How to change the radgrid row  - dataitem forecolor accoring to the value of a column.
For example: I have a column with name "type" in my radgrid.
if type column has value "o" - I want to set the entire row forecolor to blue
if type column has value "p" - I want to set the entire row forecolor to green

Please let me know how to do this.


Thanks

Shiza
Dimo
Telerik team
 answered on 09 Mar 2010
2 answers
114 views
Dear all,
I have just bough the whole package of telerik and I think they should be good to go in my project :)

My question is, in asp.net treeview control, there is a property call "NavigateUrl" and if u click on it, it will redirect to another page with whole page refresh, and then the state of treeview is clean.I know the answer is the new page is a link, so it would be considered as a new page. How does this radcontrol to handle this saturation? Such as saving the treeview state, and click on the node with no refreshing...I know there is multipage of radcontrol, but I think that will be preloaded all of my pages in multopage, so it will slow down the process...

Please advice, thx.

Best regards,
Stephen
robertw102
Top achievements
Rank 1
 answered on 09 Mar 2010
3 answers
120 views
I have a combo box.
Almost 500 rows is bind to the combo at run time.
<telerik:RadComboBox ID="RadComboBox_SchoolName_Search" runat="server" Skin="Default" 
                        Width="575px" Font-Names="Arial" HighlightTemplatedItems="true" MarkFirstMatch="true" 
                        AutoPostBack="true" EnableTextSelection="true" EnableItemCaching="true"
                        <HeaderTemplate> 
                            <table style="text-align: left; width: 575px"
                                <tr> 
                                    <td style="width: 400px; font-weight: bold;"
                                        School Name 
                                    </td> 
                                    <td style="width: 175px; font-weight: bold;"
                                        State 
                                    </td> 
                                </tr> 
                            </table> 
                        </HeaderTemplate> 
                        <ItemTemplate> 
                            <table style="width: 630px; text-align: left"
                                <tr> 
                                    <td style="width: 430px;"
                                        <%# DataBinder.Eval(Container.DataItem, "SchoolName")%> 
                                    </td> 
                                    <td style="width: 200px;"
                                        <%# DataBinder.Eval(Container.DataItem, "State")%> 
                                    </td> 
                                </tr> 
                            </table> 
                        </ItemTemplate> 
  <CollapseAnimation Duration="200" Type="None" /> 
                    </telerik:RadComboBox> 
and bind using
 private void Populate_RadComboBox_SchoolName_Search() 
    { 
        DataTable _SchoolwithState = new DataTable(); 
        _SchoolwithState.Clear(); 
        RadComboBox_SchoolName_Search.Items.Clear(); 
        _SchoolwithState = objLookup.Populate_SchoolwithStatename(); 
        if (_SchoolwithState.Rows.Count > 0) 
        { 
            if (_SchoolwithState.Rows.Count > 15) 
            { 
                RadComboBox_SchoolName_Search.Height = 410
            } 
 
            RadComboBox_SchoolName_Search.DataSource = _SchoolwithState
            RadComboBox_SchoolName_Search.DataTextField = "SchoolName"
            RadComboBox_SchoolName_Search.DataValueField = "SchoolID"
            RadComboBox_SchoolName_Search.DataBind(); 
        } 
        RadComboBox_SchoolName_Search.Items.Insert(0, new RadComboBoxItem("---Search Students by School Name---")); 
    } 
At run time, I have to wait for a long time to load the drop down after clicking the arrow.
Is there any other methods to make it fast.
Please help.








Kamen Bundev
Telerik team
 answered on 09 Mar 2010
1 answer
78 views
Hi,

I have many problems to fix this scenario. I need to use one radUploader usercontrol loaded in one ajax multipanel but i can't loaded my files. I have used the conditionalPostback registred from loaded usercontrols to stop ajax refreshing or created a realPostBack in page and registred in page-Load of Loaded usercontrol but still not working.

Use the wizard sample of demo of RadTabs and loading one RadUploader control
<telerik:RadAjaxLoadingPanel  runat="server" ID="LoadingPanel1" IsSticky="true"
    </telerik:RadAjaxLoadingPanel>         
    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel1" LoadingPanelID="LoadingPanel1" > 
            <telerik:RadComboBox  runat="server" ID="RadComboTipo" Skin="Vista"  AutoPostBack="true" Width="200px" 
             OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged"  > 
                            <Items> 
                                <telerik:RadComboBoxItem Text="Select" Value="-1" Selected="true"></telerik:RadComboBoxItem> 
                                <telerik:RadComboBoxItem Text="Case1" Value="1" ></telerik:RadComboBoxItem> 
                            </Items> 
            </telerik:RadComboBox> 
            <div style="height:33px;"></div> 
            <telerik:RadTabStrip ID="RadTabStrip1" SelectedIndex="0" runat="server" MultiPageID="RadMultiPage1" 
                Skin="Default" CssClass="tabStrip"
            </telerik:RadTabStrip> 
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" CssClass="multiPage"
            </telerik:RadMultiPage> 
    </telerik:RadAjaxPanel> 

The LoadedControl in pageView use RadUploader and  page load to register realPostBack and stop the ajax event.

bool isOnClickAttached = false
        IEnumerator keys = this.buttonSubmit.Attributes.Keys.GetEnumerator(); 
        while (keys.MoveNext()) 
        { 
            if (keys.Current.Equals("onClick")) 
            { 
                isOnClickAttached = true
                break; 
            } 
        } 
        if (!isOnClickAttached) 
            this.buttonSubmit.Attributes.Add("onClick", string.Format("realPostBack('{0}', ''); return false;", this.buttonSubmit.UniqueID));  
 
This realpostback is firing but no upload is performed.

Use one ClientEvents-OnRequestStart="conditionalPostback" in RadAjaxPanel1 is not possible in this scenario where controls are loaded in the panel.

The object is one Ajax RadTab and one RadUpload control loaded inside and fonctional. Some suggestions. Thanks.
Genady Sergeev
Telerik team
 answered on 09 Mar 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
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?