Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
136 views
Hi,

Some useful controls that I would like to see are some of the ones that Community Server has developed.  In particular, they have the control for html content that if the user has permission to edit it, they can mouse over it, a border will appear, and then if you double-click you can edit the text from a pop-up and then it refreshes that region.  Very nice.

Also, they have a sort of auto-complete box for comma-separated values (for tags), which is also very nice.

If I had those things, then, it would be much easier for some of my clients to customize their look and feel.
Chris
Top achievements
Rank 1
 answered on 23 Sep 2008
1 answer
268 views
Hi,

I'm using the SqlDataSource and Select Command with Parameters in the .aspx itself. I need to pass one of my Session and Query String values as the parameter value in the WHERE Clause of the Select statement in the Select Command. How can I pass the server side values (Session and Query String) in the SqlDataSource parameters?
Priya
Top achievements
Rank 1
 answered on 22 Sep 2008
10 answers
147 views
I have a pure object model that looks like this:

    [Serializable]
    public class NavigationModel
    {
        private IList<App> _applications;

        public IList<App> Applications
        {
            get { return _applications; }
            set { _applications = value; }
        }
    }

Each App contains an IList of Features.  I want to map this object model to the menu control.  Right now I have hierarchy through the object model and I want to keep it this way.  How would I do this?

Here is some of what I have tried with no success:
                _navigationModel = _navigationService.LoadData();
                TopMenu.DataSource = _navigationModel.Applications;
                TopMenu.DataFieldID = "Id";
                //TopMenu.DataMember = "Applications";
                //TopMenu.DataTextField = "Name";
                //TopMenu.DataValueField = "RelativePath";
                TopMenu.Flow = ItemFlow.Horizontal;
                RadMenuItemBinding appBinding = new RadMenuItemBinding();
                appBinding.Depth = 1;
                appBinding.TextField = "Name";
                appBinding.ValueField = "RelativePath";
                appBinding.DataMember = "Features";
                TopMenu.DataBindings.Add(appBinding);
                TopMenu.DataBind();

Thanks
Scott
Top achievements
Rank 1
 answered on 22 Sep 2008
3 answers
162 views
I'd like to display hierarchical data in the combobox.  Any suggestions on how to accomplish this?

Example would be:

Home
About
   Mission Statement
   Vision
Programs
   Program 1
       Requirements
       Features
   Program 2

Any help is appreciated!

Thanks,
Jason
Clayton Garrett
Top achievements
Rank 1
 answered on 22 Sep 2008
2 answers
122 views
Hi Folks

I'm having some problems with the scheduler in that it randomly displays this error message.

Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near 'Telerik.Web.UI 2008.'.

I'd like to know if you've seen this anywhere before and if so what would you suggest as the best course of action to either a) prevent it happening or b) methods of repeating the task that caused it to timeout. I think it's a timeout error but I could be wrong.

Thanks
Jon
Jonathan
Top achievements
Rank 1
 answered on 22 Sep 2008
3 answers
114 views
See post below
David
Top achievements
Rank 1
 answered on 22 Sep 2008
3 answers
211 views
Hello, I have the newest version of the Rad Controls and I have a web page with a fileupload on it along with some other form controls.  The user must submit the top part of the page and then the fileupload and a few other controls will then be enabled.  I'm using Ajax for this so the page doesn't look like it refreshes.  When I click the add file button i have to add the file from the FileUpload asp control, it doesn't see anything in the control.  I was wondering how to bypass this.  I've tried this javascript and I can't get it to work. I was wondering if htere's any other ways of making this work?
<script type="text/javascript">  
        function OnRequestStart(target, arguments) {  
            alert("here");  
            if (arguments.EventTarget == "<%# butFile.UniqueID %>") {  
                arguments.EnableAjax = false;  
                alert("Ajax disabled");  
            }  
        }  
</script> 

Here's some of my code: (upload file)
 Protected Sub butFile_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles butFile.Click  
              Dim postedFile As HttpPostedFile = Me.FileUpload1.PostedFile  
 
        ' Validate   
        If Not postedFile Is Nothing AndAlso postedFile.ContentLength > 0 Then 
 
            ' Retreive the byte data   
            Dim b(postedFile.ContentLength - 1) As Byte 
            postedFile.InputStream.Read(b, 0, b.Length)  
            ' Insert into the database   
            Dim sqlConn As SqlConnection = GetSqlConnection()  
            Dim sqlComm As New SqlCommand  
            ' Configure the command object   
            With sqlComm  
                .Connection = sqlConn  
                .CommandType = Data.CommandType.Text  
                Dim ecn As Integer = 201  
                ''''.CommandText = "INSERT INTO [tblFiles]( [fileName], [fileSize], [fileContentType], [fileImage]) VALUES(@fileName, @fileSize, @fileContentType, @fileImage)"  
                .CommandText = "INSERT INTO tblDGdrawings (dg_id, downloadName, length, type, attachment, description, date_added) VALUES ('" & lblid.Text & "', @fileName, @fileSize, @fileContentType, @fileImage, '" & tbDescription.Text & "', '" & Lbldate.Text & "')" 
 
                ' Configure the simple parameters   
                'sqlComm.Parameters.Add(New SqlParameter("@fileName", postedFile.FileName))  
                sqlComm.Parameters.Add(New SqlParameter("@fileName", Replace(FileUpload1.PostedFile.FileName, StrReverse(Mid(StrReverse(FileUpload1.PostedFile.FileName), InStr(1, StrReverse(FileUpload1.PostedFile.FileName), "\"))), "")))  
 
                sqlComm.Parameters.Add(New SqlParameter("@fileSize", postedFile.ContentLength))  
                sqlComm.Parameters.Add(New SqlParameter("@fileContentType", postedFile.ContentType))  
 
                ' Byte data   
                Dim paramBytes As New SqlParameter("@fileImage", Data.SqlDbType.Image, postedFile.ContentLength, "attachment")  
                ' Assign byte value   
                paramBytes.Value = b  
                sqlComm.Parameters.Add(paramBytes)  
 
                ' Open the connection and execute   
                sqlConn.Open()  
                sqlComm.ExecuteNonQuery()  
 
                ' Cleanup   
                sqlConn.Close()  
                sqlComm.Dispose()  
                sqlComm = Nothing 
                sqlConn.Dispose()  
                sqlConn = Nothing 
            End With 
 
        End If 
 
        tbDescription.Text = "" 
        grdFiles.Rebind()  
    End Sub 

asp code:
 <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">  
    </telerik:RadStyleSheetManager> 
    <p> 
        <br /> 
        </p> 
     
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"  ClientEvents-OnResponseStart="OnRequestStart">  
        <table style="width:50%;">  
            <tr> 
                <td colspan="4">  
                    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">  
                    </telerik:RadScriptManager> 
                    </td> 
            </tr> 
            <tr> 
                <td> 
                    <asp:Label ID="Label1" runat="server" Text="School/Company Name:"></asp:Label> 
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"   
                        ControlToValidate="tbName">*</asp:RequiredFieldValidator> 
                    </td> 
                <td> 
                    <asp:TextBox ID="tbName" runat="server"></asp:TextBox> 
                    </td> 
                <td> 
                    <asp:Label ID="Label6" runat="server" Text="Width:"></asp:Label> 
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"   
                        ControlToValidate="tbWidth" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator> 
                    </td> 
                <td> 
                    <asp:TextBox ID="tbWidth" runat="server"></asp:TextBox> 
                </td> 
            </tr> 
            <tr> 
                <td> 
                    <asp:Label ID="Label2" runat="server" Text="Dealer:"></asp:Label> 
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"   
                        ControlToValidate="tbDealer">*</asp:RequiredFieldValidator> 
                    </td> 
                <td> 
                    <asp:TextBox ID="tbDealer" runat="server"></asp:TextBox> 
                    </td> 
                <td> 
                    <asp:Label ID="Label7" runat="server" Text="Length:"></asp:Label> 
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"   
                        ControlToValidate="tbLength" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator> 
                    </td> 
                <td> 
                    <asp:TextBox ID="tbLength" runat="server"></asp:TextBox> 
                </td> 
            </tr> 
             <tr> 
                <td> 
                    <asp:Label ID="Label3" runat="server" Text="Lab Type:"></asp:Label> 
                    </td> 
                <td> 
                    <asp:DropDownList ID="ddlLabType" runat="server">  
                        <asp:ListItem Value="General">General Lab</asp:ListItem> 
                        <asp:ListItem Value="Chem">Chemistry</asp:ListItem> 
                        <asp:ListItem>Biology</asp:ListItem> 
                        <asp:ListItem>Physics</asp:ListItem> 
                        <asp:ListItem Value="Prep">Prep Lab</asp:ListItem> 
                        <asp:ListItem>Storage</asp:ListItem> 
                        <asp:ListItem Value="Middle">Middle School</asp:ListItem> 
                    </asp:DropDownList> 
                    </td> 
                <td> 
                    <asp:Label ID="Label8" runat="server" Text="Square Feet:"></asp:Label> 
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"   
                        ControlToValidate="tbSqFeet" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator> 
                    </td> 
                <td> 
                    <asp:TextBox ID="tbSqFeet" runat="server"></asp:TextBox> 
                 </td> 
            </tr> 
             <tr> 
                <td> 
                    <asp:Label ID="Label4" runat="server" Text="Sudent Capacity:"></asp:Label> 
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"   
                        ControlToValidate="tbStudCap" ErrorMessage="RequiredFieldValidator">*</asp:RequiredFieldValidator> 
                    </td> 
                <td> 
                    <asp:TextBox ID="tbStudCap" runat="server"></asp:TextBox> 
                    </td> 
                <td> 
                    &nbsp;</td> 
                <td> 
                    &nbsp;</td> 
            </tr> 
             <tr> 
                <td> 
                    &nbsp;</td> 
                <td> 
                    </td> 
                <td> 
                    </td> 
                <td> 
                    &nbsp;</td> 
            </tr> 
             <tr> 
                <td colspan="4">  
                    <asp:CheckBoxList ID="cblOptions" runat="server" CellPadding="2"   
                        CellSpacing="5" RepeatColumns="4" Width="614px">  
                        <asp:ListItem>Perimeter</asp:ListItem> 
                        <asp:ListItem>Peninsula</asp:ListItem> 
                        <asp:ListItem Value="Octagon Island">Octagon Island</asp:ListItem> 
                        <asp:ListItem>Forward Facing Island</asp:ListItem> 
                        <asp:ListItem>Rectangular Island</asp:ListItem> 
                        <asp:ListItem>Tables</asp:ListItem> 
                        <asp:ListItem>B, Open</asp:ListItem> 
                        <asp:ListItem>B, Closed</asp:ListItem> 
                        <asp:ListItem>B, Drawer</asp:ListItem> 
                        <asp:ListItem>B, Combo</asp:ListItem> 
                        <asp:ListItem>W, Open</asp:ListItem> 
                        <asp:ListItem>W, Closed</asp:ListItem> 
                        <asp:ListItem>W, Glass</asp:ListItem> 
                        <asp:ListItem>T, Open</asp:ListItem> 
                        <asp:ListItem>T, Closed</asp:ListItem> 
                        <asp:ListItem>T, Glass</asp:ListItem> 
                    </asp:CheckBoxList> 
                    </td> 
            </tr> 
             <tr> 
                <td colspan="4">  
                    <asp:Button ID="butSubmit" runat="server" Text="Submit" /> 
                    </td> 
            </tr> 
             </table> 
                    
            <table> 
             <tr> 
                <td> 
                    &nbsp;</td> 
                <td> 
                    <asp:Button ID="butStartNew" runat="server" Text="Start New Entry"   
                        Enabled="False" /> 
                 </td> 
                <td> 
                    </td> 
                <td> 
                    &nbsp;</td> 
            </tr> 
             
             <tr> 
                 <td> 
                     <asp:Label ID="Label12" runat="server" Font-Bold="True" Text="Add Files"   
                         Enabled="False"></asp:Label> 
                 </td> 
                 <td> 
                     &nbsp;</td> 
                 <td colspan="2" rowspan="4">  
                     <telerik:RadGrid ID="grdFiles" runat="server" AutoGenerateColumns="False"   
                         DataSourceID="SqlDataSourceFiles" GridLines="None" Skin="WebBlue">  
<MasterTableView DataSourceID="SqlDataSourceFiles">  
<RowIndicatorColumn Visible="False">  
<HeaderStyle Width="20px"></HeaderStyle> 
</RowIndicatorColumn> 
 
<ExpandCollapseColumn Visible="False" Resizable="False">  
<HeaderStyle Width="20px"></HeaderStyle> 
</ExpandCollapseColumn> 
 
    <Columns> 
        <telerik:GridBoundColumn DataField="dg_id" SortExpression="dg_id"   
            UniqueName="column" Visible="False">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="id" SortExpression="id"   
            UniqueName="column1" Visible="False">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="downloadName" HeaderText="File"   
            SortExpression="downloadName" UniqueName="column2">  
        </telerik:GridBoundColumn> 
        <telerik:GridBoundColumn DataField="description" HeaderText="Description"   
            SortExpression="description" UniqueName="column3">  
        </telerik:GridBoundColumn> 
    </Columns> 
 
<EditFormSettings> 
<PopUpSettings ScrollBars="None"></PopUpSettings> 
</EditFormSettings> 
</MasterTableView> 
                     </telerik:RadGrid> 
                 </td> 
            </tr> 
             <tr> 
                <td> 
                    <asp:Label ID="Label10" runat="server" Text="File:" Enabled="False"></asp:Label> 
                    </td> 
                <td> 
                    <asp:FileUpload ID="FileUpload1" runat="server" /> 
                    </td> 
            </tr> 
             <tr> 
                <td> 
                    <asp:Label ID="Label11" runat="server" Text="File Description:" Enabled="False"></asp:Label> 
                    </td> 
                <td> 
                    <asp:TextBox ID="tbDescription" runat="server" Width="325px" Enabled="False"></asp:TextBox> 
                    </td> 
            </tr> 
             <tr> 
                <td> 
                    <asp:Button ID="butFile" runat="server" Text="Add File" Enabled="False" OnClick="butFile_Click" /> 
                    </td> 
                <td> 
                    &nbsp;</td> 
            </tr> 
             <tr> 
                <td> 
                    &nbsp;</td> 
                <td> 
                    <telerik:RadUpload ID="RadUpload1" Runat="server" Skin="Web20"   
                        ControlObjectsVisibility="RemoveButtons, AddButton" /> 
                 </td> 
                <td> 
                    &nbsp;</td> 
                <td> 
                    &nbsp;</td> 
            </tr> 
             <tr> 
                <td> 
                    &nbsp;</td> 
                <td> 
                    &nbsp;</td> 
                <td> 
                    </td> 
                <td> 
                    &nbsp;</td> 
            </tr> 
        </table> 
        </telerik:RadAjaxPanel> 
        <asp:SqlDataSource ID="SqlDataSourceFiles" runat="server"   
            ConnectionString="<%$ ConnectionStrings:DWJobInfoConnectionString %>"   
            SelectCommand="SELECT [dg_id], [id], [downloadName], [description] FROM [tblDGdrawings] WHERE ([dg_id] = @dg_id)">  
            <SelectParameters> 
                <asp:ControlParameter ControlID="lblid" Name="dg_id" PropertyName="Text"   
                    Type="Int32" /> 
            </SelectParameters> 
        </asp:SqlDataSource> 
    
 
    <rad:AjaxLoadingPanel ID="AjaxLoadingPanel1" Runat="server" height="16px"   
        width="59px">  
        <asp:Image runat="server" AlternateText="Loading..."   
            ImageUrl="~/RadControls/Ajax/Skins/Default/loading4.gif" /> 
    </rad:AjaxLoadingPanel> 
        <asp:Label ID="lblid" runat="server" Visible="False"></asp:Label> 
        <asp:Label ID="lbldate" runat="server" Visible="False"></asp:Label> 
        <br /> 
Let me know if you need anything else.  Thanks!
Amanda
Top achievements
Rank 2
 answered on 22 Sep 2008
2 answers
175 views
We have a number of pages that use a RadAjaxManagerProxy (wired to a Manager on a master page) to turn on and off various asp:panels based on certain conditions. However, I've noticed that when the page re-renders, those panels that were explicitly set to be hidden show up as as a block-layout div, taking up vertical room on the page or control. When the controls are un-ajaxified and the page posts back, these hidden panels do not render as these "empty div" tags. Any suggestions on getting around this?

Thanks!
Justin Kiner
Top achievements
Rank 1
 answered on 22 Sep 2008
11 answers
316 views

While moving the mouse over a disabled RadComboBox I'm getting the following JavaScript error message.

Microsoft JScript runtime error: Sys.ArgumentException: Value must be a DOM element.
Parameter name: element

I'm using Telerik.Web.UI.dll version 2007.3.1425.20

Thanks,
Italo

Simon
Telerik team
 answered on 22 Sep 2008
4 answers
232 views
Since upgrading to 2008.2.723.35 I get the following error when trying to upload an image:

System.FormatException: Invalid character in a Base-64 string.

Generated: Wed, 30 Jul 2008 15:05:12 GMT

System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.FormatException: Invalid character in a Base-64 string.
   at System.Convert.FromBase64String(String s)
   at Telerik.Web.Dialogs.DialogParametersSerializer.Deserialize(String serialized)
   at Telerik.Web.UI.DialogParameters.Deserialize(String source)
   at Telerik.Web.UI.DialogHandler.GetDialogParameters()
   at Telerik.Web.UI.DialogHandler.LoadDialogControl()
   at Telerik.Web.UI.DialogHandler.OnInit(EventArgs e)
   at System.Web.UI.Control.InitRecursive(Control namingContainer)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   --- End of inner exception stack trace ---
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
		
My web.config has been updated to reflect this version.. 

Any thoughts as to why the error?

Thanks.. David

Edit:  hmmm... clicking [ Upload ] in dialog...

- the Request Url is:
http://localhost/telerik.web.ui.dialoghandler.aspx?dialogname=imagemanager&skin=default&title=image%20manager&doid=<snip/>

- compared to mock-app that succeeds:
http://localhost/Telerik.Web.UI.DialogHandler.aspx?DialogName=ImageManager&Skin=Default&Title=Image+Manager&doid=<snip/>

It appears someone is mangling my url.  Who could that be?? 
Search continues...
-

Henry
Top achievements
Rank 1
 answered on 22 Sep 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?