Telerik Forums
UI for ASP.NET AJAX Forum
12 answers
329 views
I have added the markup necessary to specify the initial sort and filter.  When the page loads, the UI is set with the proper sort and filter indicated, but the request submitted by Telerik's Ajax code to my web service has no elements in either of List<GridSortExpression> or List<GridFilterExpression>.  So as a result, the grid is populated with unsorted & unfiltered data.

Here's the signature of the web service function that is called:
public Dictionary<string, object> GetAllUsersGrid(int startRowIndex, int maximumRows, List<GridSortExpression> sortExpression, List<GridFilterExpression> filterExpression)


Here's my markup:
<telerik:RadGrid ID="AllUsersGrid" runat="server" AllowPaging="True" GridLines="None"
    AutoGenerateColumns="False" Skin="WebBlue" AllowSorting="True" PageSize="20">
    <PagerStyle Mode="NumericPages" />
    <MasterTableView Font-Size="11px" AllowFilteringByColumn="true">
        <SortExpressions>
            <telerik:GridSortExpression FieldName="Name" SortOrder="Ascending" />
        </SortExpressions>
        <Columns>
            <telerik:GridBoundColumn HeaderText="Name" DataField="Name" UniqueName="Name" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" ItemStyle-Wrap="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Email Address" DataField="Email" UniqueName="EmailAddress" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Access Level" DataField="AccessLevel" UniqueName="AccessLevel" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" CurrentFilterFunction="EqualTo" CurrentFilterValue="User">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Verified" DataField="EmailVerified" UniqueName="EmailVerified" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Failed Logins" DataField="NumFailedLogins" UniqueName="FailedLogins" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Reset" UniqueName="Reset" ItemStyle-Width="40" AllowFiltering="false">
            </telerik:GridBoundColumn>
        </Columns>
    </MasterTableView>
    <ClientSettings>
        <DataBinding Location="webservices/SupportSvcs.asmx" SelectCountMethod="GetAllUsersGrid"
            SelectMethod="GetAllUsersGrid">
        </DataBinding>
        <ClientEvents OnDataBindingFailed="AllUsers_DataBindingFailed" OnRowDataBound="AllUsers_RowDataBound"
             OnDataBound="AllUsers_DataBound" OnDataBinding="AllUsers_DataBinding" />
    </ClientSettings>
    <SortingSettings EnableSkinSortStyles="False" />
</telerik:RadGrid>

Seems like a Telerik bug to me because none of my Javascript is invoked in the process.  Help!
Iana Tsolova
Telerik team
 answered on 03 May 2011
3 answers
70 views
Hello,
When my page has a RadAjaxLoadingPanel it does a full postback. When I remove the control everything works fine.
The page is very simple. I tried with a RadAjaxManager, it has the same problem.
Version 2011.1.315.40

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %>
 
<!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="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1"
        HorizontalAlign="NotSet">
        <telerik:RadGrid ID="RadGrid1" AllowPaging="True" DataSourceID="SqlDataSource1" runat="server"
            CellSpacing="0">
            <MasterTableView DataKeyNames="ID" AutoGenerateColumns="true">
            </MasterTableView>
        </telerik:RadGrid>
    </telerik:RadAjaxPanel>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>"
        ProviderName="<%$ ConnectionStrings:MyConnectionString.ProviderName %>" SelectCommand="SELECT wptam_posts.ID, wptam_posts.post_title, wptam_terms.name, wptam_term_taxonomy.`count`, wptam_posts.post_date, wptam_posts.guid FROM wptam_term_taxonomy INNER JOIN wptam_term_relationships ON wptam_term_taxonomy.term_taxonomy_id = wptam_term_relationships.term_taxonomy_id INNER JOIN wptam_terms ON wptam_term_taxonomy.term_id = wptam_terms.term_id INNER JOIN wptam_posts ON wptam_term_relationships.object_id = wptam_posts.ID WHERE (wptam_term_taxonomy.taxonomy = 'category') AND (wptam_posts.post_type = 'post') ORDER BY wptam_posts.post_date">
    </asp:SqlDataSource>
    </form>
</body>
</html>

Any hints of what I am doing wrong?
Thank you for your help,
John.
shrujan
Top achievements
Rank 1
 answered on 03 May 2011
1 answer
154 views
Hi,

I have a GridAttachmentColumn in my grid which allows user to upload files. Unfortunately, In my Insert and Update routing, I'm ending up with null UploadedFileCollection collection even If user uploads a file. Note that, I don't use allowFileExtension and MaxFileSize properties in my GridAttachmentColumn columns property.
<telerik:RadGrid ID="grdFiles" runat="server" AutoGenerateColumns="False" OnInsertCommand="grdFiles_Insert"
        OnUpdateCommand="grdFiles_Update" OnEditCommand="grdFiles_Command" AllowSorting="True"
        OnDeleteCommand="grdFiles_Command"  OnNeedDataSource="grdFiles_NeedDataSource"
        OnCancelCommand="grdFiles_Command" OnItemDataBound="grdFiles_ItemDataBound" PageSize="10"
        OnItemCommand="grdFiles_ItemCommand" GridLines="None">
    <MasterTableView DataKeyNames="CollectionFileID"
        CommandItemDisplay="Top" EditMode="EditForms" >
    <CommandItemSettings   ShowAddNewRecordButton="true" AddNewRecordImageUrl="~/Images/AddRecord.gif"
                 AddNewRecordText="Upload New Collection File" >
    </CommandItemSettings>
    <RowIndicatorColumn  FilterControlAltText="Filter RowIndicator column">
    <HeaderStyle Width="20px"></HeaderStyle>
    </RowIndicatorColumn>
 
    <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
    <HeaderStyle Width="20px"></HeaderStyle>
    </ExpandCollapseColumn>
    <NoRecordsTemplate>
        <div> No files available.</div>
    </NoRecordsTemplate>
    <Columns>
        
        <telerik:GridBoundColumn DataField="CollectionFileID" DataType="System.Int32"
            FilterControlAltText="Filter CollectionFileID column" HeaderText="ID"
            ReadOnly="True" SortExpression="CollectionFileID"
            UniqueName="CollectionFileID" >
        </telerik:GridBoundColumn>
 
        <telerik:GridBoundColumn DataField="OriginalFileName" FilterControlAltText="Filter OriginalFileName column"
            HeaderText="Original Name" UniqueName="OriginalFileName" ReadOnly="true"
            SortExpression="OriginalFileName" >
        </telerik:GridBoundColumn>
 
        <telerik:GridBoundColumn DataField="AssignedFileName"
            FilterControlAltText="Filter AssignedFileName column" HeaderText="Assigned Name"
            SortExpression="AssignedFileName" Visible="false" UniqueName="AssignedFileName"  ReadOnly="true">
        </telerik:GridBoundColumn>
 
        <telerik:GridDateTimeColumn DataField="UploadDate" 
            FilterControlAltText="Filter UploadDate column" HeaderText="Date Uploaded"
            SortExpression="UploadDate" UniqueName="UploadDate"  ReadOnly="true"  DataFormatString="{0:d}">
        </telerik:GridDateTimeColumn>  
        <telerik:GridDateTimeColumn DataField="Modified" 
            FilterControlAltText="Filter Modified column" HeaderText="Date Modified"
            SortExpression="Modified" UniqueName="Modified" ReadOnly="true"  DataFormatString="{0:d}">
        </telerik:GridDateTimeColumn>
 
        <telerik:GridTemplateColumn DataField="Description"
            FilterControlAltText="Filter Description column"
            HeaderText="Description/Instruction" SortExpression="Description"
            UniqueName="Description">
             
           <EditItemTemplate>
                <telerik:RadTextBox ID="DescriptionTextBox" runat="server"
                    Text='<%# Bind("Description") %>'
                     Width="300px" Height="150px" TextMode="MultiLine"></telerik:RadTextBox>
                                 
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="DescriptionLabel" runat="server"
                    Text='<%# Eval("Description") %>'></asp:Label>
            </ItemTemplate>
        </telerik:GridTemplateColumn>
        <telerik:GridAttachmentColumn
            EditFormHeaderTextFormat="Upload File:" HeaderText="Download" 
            AttachmentDataField="BinaryData" AttachmentKeyFields="CollectionFileID"
            FileNameTextField="OriginalFileName"  DataTextField="OriginalFileName" UniqueName="AttachmentColumn">
        </telerik:GridAttachmentColumn>
        <telerik:GridEditCommandColumn HeaderText="Edit" ButtonType="LinkButton">
            <HeaderStyle Width="2%" />
        </telerik:GridEditCommandColumn>
        <telerik:GridButtonColumn Text="Delete" HeaderText="Delete" CommandName="Delete" ButtonType="LinkButton">
                        <HeaderStyle Width="2%" />
        </telerik:GridButtonColumn>
    </Columns>
    <EditFormSettings>
    <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
    </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False"></FilterMenu>
 
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>
    </telerik:RadGrid>
Here is a code for insertion:
protected void grdFiles_Insert(object sender, GridCommandEventArgs e)
        {
            //Insertion Logic
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                GridEditableItem item = e.Item as GridEditableItem;
                 
                RadTextBox txtDesc = item.FindControl("DescriptionTextBox") as RadTextBox;
 
                RadUpload upload = (item.EditManager.GetColumnEditor("AttachmentColumn") as GridAttachmentColumnEditor).RadUploadControl;
                if (upload != null)
                {
                    UploadedFileCollection upFiles = upload.UploadedFiles;
 
                    if (upFiles.Count == 0)
                    {
                        //throw new Exception("No file uploaded");
                        string script = string.Format("alert('No file uploaded');");
                        ScriptManager.RegisterStartupScript(Page, typeof(Page), "myNoFileScript", script, true);
                         
                        return;
                    }
 
                    if (upload.InvalidFiles.Count > 0)
                    {
                        //throw new Exception("Invalid file type or file size is greater than maximum allowed.");
                        string script = string.Format("alert('Invalid file type or file size is greater than maximum allowed.');");
                        ScriptManager.RegisterStartupScript(Page, typeof(Page), "myInvalidFileScript", script, true);
                        return;
                    }
 
                    CollectionFile oFile = new CollectionFile();
 
                    if (txtDesc != null)
                    {
                        oFile.Description = txtDesc.Text.Trim();
                    }
 
                     
 
                    DateTime uploadTime = DateTime.Now;
 
                    oFile.UploadDate = uploadTime;
 
                     
                    upload.OverwriteExistingFiles = true;
                     
                    foreach (UploadedFile upfile in upFiles)
                    {
                        oFile.OriginalFileName = upfile.GetName();
                        oFile.FileSize = upfile.ContentLength;
                        oFile.FileExtension = upfile.GetExtension();
                        string assignedSystemFileName = System.IO.Path.GetFileNameWithoutExtension(upfile.GetName()) + "_" + System.Guid.NewGuid().ToString() + upfile.GetExtension();
                        oFile.AssignedFileName = assignedSystemFileName;
                        //Save File to server's file system
                        upfile.SaveAs(Server.MapPath("~/CollectionUploads/" + assignedSystemFileName), true);
                    }
 
                    oFile.Modified = uploadTime;
 
                     
 
                    CollectionFile.Insert(oFile);
                                         
                    oFile = null;
                    grdFiles.Rebind();
                     
                }
            }
     
        }

Here is my Update Method:
protected void grdFiles_Update(object sender, GridCommandEventArgs e)
        {
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                GridEditableItem itm = e.Item as GridEditableItem;
 
                string collFileId = Convert.ToString(itm.GetDataKeyValue("CollectionFileID"));
                //Edit Files
                RadTextBox txtDesc = itm.FindControl("DescriptionTextBox") as RadTextBox;
 
                RadUpload upload = (itm.EditManager.GetColumnEditor("AttachmentColumn") as GridAttachmentColumnEditor).RadUploadControl;
 
                CollectionFile oFile = CollectionFile.GetEntity(collFileId);
 
                if (oFile != null)
                {
                    DateTime ModifyTime = DateTime.Now;
 
                    if (txtDesc != null)
                        oFile.Description = txtDesc.Text.Trim();
 
                    if (upload != null)
                    {
                        upload.OverwriteExistingFiles = true;
                        UploadedFileCollection upFiles = upload.UploadedFiles;
 
                        //If new File is uploaded then delete old file
                        if (upFiles.Count != 0)
                        {
                            //New File is selected to upload
                            if (File.Exists(Server.MapPath("~/CollectionUploads/" + oFile.AssignedFileName)))
                            {
                                File.Delete(Server.MapPath("~/CollectionUploads/" + oFile.AssignedFileName));
                            }
                        }
 
                        foreach (UploadedFile upfile in upFiles)
                        {
                            oFile.OriginalFileName = upfile.GetName();
                            oFile.FileSize = upfile.ContentLength;
                            oFile.FileExtension = upfile.GetExtension();
                            string assignedSystemFileName = System.IO.Path.GetFileNameWithoutExtension(upfile.GetName()) + "_" + System.Guid.NewGuid().ToString() + upfile.GetExtension();
                            oFile.AssignedFileName = assignedSystemFileName;
                            //Save File to server's file system
                            upfile.SaveAs(Server.MapPath("~/CollectionUploads/" + assignedSystemFileName), true);
                        }
 
                    }
                    oFile.Modified = ModifyTime;
 
                    CollectionFile.Update(oFile);
                     
                    oFile = null;
                    grdFiles.Rebind();
                }
            }
             
        }

what am I doing wrong here ?

Just To Update you that my Grid is in RadAjaxPanel which in turn, uses loading panel. Anytime when I set EnableAJAX="false" for RadAjaxPanel then Upload control works well, but It stop working as soon as I set EnableAJAX="true".

Thanks

Tejas
Pavlina
Telerik team
 answered on 03 May 2011
1 answer
49 views
Lets say I have 3 items

ID1
ID2
ID3

ID1 & 2 have a ParentID of NULL

ID3 has a ParentID of 6

Now since there is no "ID6" in the resultset, ID3 doesn't even show-up, even though it's a valid item.

Can you please give me a property in which I can tell the TreeList "that's okay...show it anyway"?
Vasil
Telerik team
 answered on 03 May 2011
9 answers
207 views
Hi,

I am in need of creating a Menu Using RADMenu control.
Here is the issue which made me stuck.

I am retrieving the menuitems from a XML and binding it to the RADMenu. It works fine.
But I am in need of having a multicolumn menuitem.
The Multi column menuitem should not repeat for all menuitem. It should be available in only one menuitem.

I found a MultiColumn demo in http://demos.telerik.com/aspnet-ajax/menu/examples/multicolumnmenu/defaultcs.aspx
But that demo is applying the settings for all the menuitems in the menu. How can I restrict to a single menuitem using XML.

Kindly let me know how this can be achieved. Refer attachment for more details,
Kate
Telerik team
 answered on 03 May 2011
2 answers
130 views
Hi,

we are not able to view html source for rad grid .
Please can you help us with this.

This is the aspx code for rad Grid:

        <telerik:RadGrid ID="dgSearchResults" runat="server" AllowPaging="True" AllowSorting="True"
            AutoGenerateColumns="False" Skin="Office2007" OnSortCommand="dgSearchResults_SortCommand"
            GridLines="None">
            <HeaderStyle Height="30px" HorizontalAlign="Center" Font-Size="10px" Font-Bold="True">
            </HeaderStyle>
            <HeaderContextMenu Skin="Office2007">
                <CollapseAnimation Duration="200" Type="OutQuint" />
            </HeaderContextMenu>
            <AlternatingItemStyle HorizontalAlign="Center" Font-Size="10px" />
            <ItemStyle CssClass="gridRow" HorizontalAlign="Center" Font-Size="10px"></ItemStyle>
            <PagerStyle Mode="NextPrevAndNumeric" />
            <MasterTableView Visible="true">
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="Name" SortOrder="None" />
                    <telerik:GridSortExpression FieldName="DocID" SortOrder="None" />
                </SortExpressions>
                <Columns>
                    <telerik:GridBoundColumn DataField="DocID" ItemStyle-CssClass="gridRow" UniqueName="DocID"
                        HeaderText="Creation<BR>Order" HeaderStyle-HorizontalAlign="Left">
                        <ItemStyle />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Name" ItemStyle-CssClass="gridRow" HeaderText="Label Name"
                        UniqueName="Name">
                        <ItemStyle />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Product" ItemStyle-CssClass="gridRow" HeaderText="Product"
                        UniqueName="Product" AllowSorting="False">
                        <ItemStyle />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Country" ItemStyle-CssClass="gridRow" UniqueName="Country"
                        Visible="False" AllowSorting="False">
                        <ItemStyle ForeColor="Blue" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="SubmissionType" ItemStyle-CssClass="gridRow"
                        HeaderText="Submission Type" UniqueName="SubmissionType" AllowSorting="False">
                        <ItemStyle />
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="View" UniqueName="TemplateColumn1">
                        <ItemStyle CssClass="gridRow" HorizontalAlign="Center" ForeColor="Blue" />
                        <ItemTemplate>
                            <%# CreateViewURL(DataBinder.Eval(Container.DataItem, "id", "{0}"))%>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Open" UniqueName="TemplateColumn2">
                        <ItemStyle CssClass="gridRow" HorizontalAlign="Center" ForeColor="Blue" />
                        <ItemTemplate>
                            <%# CreateURL(DataBinder.Eval(Container.DataItem, "id", "{0}"))%>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn HeaderText="Retire/Activate" UniqueName="TemplateColumn">
                        <ItemStyle CssClass="gridRow" HorizontalAlign="Center" />
                        <ItemTemplate>
                            <asp:Button ID="Button1" runat="server" BackColor="Transparent" BorderColor="Transparent"
                                BorderStyle="None" CommandName="RetireorReactivateLabel" Font-Underline="True"
                                ForeColor="Blue" Text="Retire" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <%--<telerik:GridButtonColumn HeaderText="View" ShowSortIcon="False" Text="View" UniqueName="column4">
                        <ItemStyle CssClass="gridRow" ForeColor="Blue" />
                    </telerik:GridButtonColumn>
                    <telerik:GridButtonColumn HeaderText="Open" ShowSortIcon="False" Text="Open" UniqueName="column5">
                        <ItemStyle CssClass="gridRow" ForeColor="Blue" />
                    </telerik:GridButtonColumn>
                    <telerik:GridButtonColumn HeaderText="Retire/Activate" ShowSortIcon="False" Text="Retire"
                        UniqueName="column6">
                        <ItemStyle CssClass="gridRow" ForeColor="Blue" />
                    </telerik:GridButtonColumn>--%>
                </Columns>
            </MasterTableView>
            <FilterMenu Skin="Office2007">
                <CollapseAnimation Duration="200" Type="OutQuint" />
            </FilterMenu>
        </telerik:RadGrid>
    </ContentTemplate>
</asp:UpdatePanel>
<ajaxToolkit:UpdatePanelAnimationExtender ID="updatePanel1_UpdatePanelAnimationExtender"
    runat="server" Enabled="True" TargetControlID="updatePanel1">
</ajaxToolkit:UpdatePanelAnimationExtender>


But when we are doing a view page source on rendered page, we are getting this:

<div id="dgSearchResults" class="RadGrid RadGrid_Office2007">

        <input id="dgSearchResults_ClientState" name="dgSearchResults_ClientState" type="hidden" />
            </div>

But when we do a view page source on the telerik site Grid views, we are able to view the complete html of the grid.

so how can we view the html source.

Thanks in advance.



Smitha
Top achievements
Rank 1
 answered on 03 May 2011
6 answers
133 views
Hi All,

First of all thanks to telerik team for their awesome controls.

After searching a lot on Telerik website I am writing my problem here, though there is some suggestion in some threads of the forum but truly speaking none of the solution is satisfying my requirement.

Here is what I want to achieve ->  My project is displaying RadGrid height correctly and it is filling the page correctly on a screen resolution of (1024 X 768), but problem arise when screen resolution change to some higher value (e.g. 1440 X 900). On high resolution grid looks like hanging in the middle of the browser. Please note that RadGrid scroll height is hard coded in each .aspx page depending on the space available for Radgrid( Means there are also some controls above the Grid like Menu's, tabs, export to excel button etc, which are screen specific,though Menu's are contained in Master page)

Radgrid is using Virtual scrolling, Filtering, static headers, RadToolbar etc.

To make my point clear I made a sample project which demonstrate my page and project structure and here is the link to sample project -

http://www.woofiles.com/dl-242315-4N3ibXA3-GridHeightDemo.zip

I also attached the screen shot of screen on resolution (1024 X 768)  which is working fine and on resolution (1440 X 900) in which grid is hanging out in the middle of browser.

It would be nice if anyone can modify the attached sample project so that it will display consistent on all resolution. I beleive if we can solve this issue it will benefit many others guys also.

Here is detail of environment I am using -

RadControls Version - RadControls for ASP.NET AJAX Q1 2010 ( File Version and product Version - 2010.1.309.20)
ASP.NET version - (ASP.Net 3.5)
Browser - Internet explorer 8 (Version - 8.0.6001.18904)
programming language - C#

Thanks,
Dheeraj
Dheeraj
Top achievements
Rank 1
 answered on 03 May 2011
1 answer
35 views
I have a cascading menu with templated items, where the template consists of 2 halves, left and right. I only want the child items menu to popup when the mouse if moved into the right half, not the left. Is this possible?

Cheers
Shinu
Top achievements
Rank 2
 answered on 03 May 2011
2 answers
67 views
I'm new to these controls. Normally to add an item to a listbox webcontrol I just had to do
 --->>>>  listbox1.items.add("value here") and all was right with the world

Now using the RadListBox I can not do this. I have tried using the RadListBoxItem
DIm itemout as RadListBoxItem
itemout.text = "some value"
radlistbox1.Items.add(itemout)        

BUT using this approach I get compiler error

--->>    Could not find a match for method 'RadListBox1.Items.Add' for the given parameter types: String.

How do I just add a simple value to my listbox???

Help

gollnick

William Gollnick
Top achievements
Rank 1
 answered on 03 May 2011
5 answers
162 views
I've tried everything I can think of but this control just will not render on my page.  From FireFox's error console, I can see the reason for this is because of 4 Javascript errors:

Error: illegal character 
Source File: http://localhost:2173/dev/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a0d787d5c-3903-4814-ad72-296cea810318%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.2.701.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a7e598a31-3beb-49a1-914c-5f530240f0ea%3a16e4e7cd%3af7645509%3a24ee1bba%3aa585d0d4 
Line: 1 
Source Code: 
� `I�%&/m�{J�J��t��`$ؐ@�����iG#)�*��eVe]f@�흼 ��{���{��;�N'���?\fdl��J�ɞ!���?~|?"~�?�7�5��:��������t�g��������w~�w������?��-��O�=���������O��~������~��g�̿��������}��?�����/��=������������,���;��?���_�O�.��/��������������?���� 

Error: ASP.NET Ajax client-side framework failed to load. 
Source File: http://localhost:2173/dev/test2.aspx 
Line: 40 
 
Error: Sys is not defined 
Source File: http://localhost:2173/dev/test2.aspx 
Line: 46 
 
Error: Sys is not defined 
Source File: http://localhost:2173/dev/test2.aspx 
Line: 64 


Yes those weird characters are what shows up in the error console.  The entire contents of my page are as follows (I've registered my telerik reference in the web.config, works with all other telerik controls I've used so far):

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test2.aspx.cs" Inherits="Test2" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
</head> 
<body> 
    <form runat="server"
    <telerik:RadScriptManager ID="ScriptManager1" runat="server" /> 
    <telerik:RadUpload runat="server" ID="RadUpload1" TargetFolder="~/uploads/flash"
    </telerik:RadUpload> 
    </form> 
</body> 
</html> 

I've also registered the upload module and handler, disabled my URLRewriting, swapped the order of the modules/handlers...nothing worked.  A help article I read said to check Telerik.RadUploadProgressHandler.aspx (I assume this is for the old version and should be .ashx now) and make sure the line shows up:
var rawProgressData = {InProgress:false,ProgressCounters:false};

I'm in Full Trust and my web.config looks like this for the module/handler sections:

 <httpModules> 
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" /> 
</httpModules> 
<httpHandlers> 
            <remove verb="*" path="*.asmx" /> 
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> 
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> 
            <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" /> 
            <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" /> 
            <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" /> 
            <add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler, Telerik.Web.UI" />     
    </httpHandlers> 

I would really like to use this control for some video uploads mainly for the progress area, so please help me.

Genady Sergeev
Telerik team
 answered on 03 May 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?