Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
130 views
We have an ASP.Net application that displays information for each page from the database.
The information includes standard ASP.Net controls and custom controls.
It means all these controls definition, properties (i.e position, color fiont etc) is stored in the database.

We want to develop a wizard that allows to open such a dynamic page and change the properties of these dynamic controls and save changes as properties back into database.

Can we open a page in RAD Editor that has different elements(controls) defined from database, click of each element (control)
access and change each controls properties (like font-color, background, etc) and when clicked save should save each property into the database.

My manager is expecting Telerik RAD Editor should help to achieve this.

Any guidance on this side is appreciated.

regards
Ami
Rumen
Telerik team
 answered on 10 Feb 2011
3 answers
198 views
First off, I'm a newb to the Telerik ASP.NET controls and am currently eval'ing the latest download.  I've been through all of the forums and can't find an answer to this one.

I'm getting a "Microsoft JScript runtime error: Telerik.Web.UI.RadScheduler is null or not an object' error.  I'm basing my code from what I found out on the "Scheduler / Binding to Generic List" demo.  I'm using Master pages and am trying to simply bind the RadScheduler to a custom appointment class which I have created.  I'm wanting to have read-only calendar representation of a single day's activities on a webform.  Pretty basic requirement for now <grin>... My code below:

Markup:
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadScheduler ID="RadScheduler1" runat="server" EnableEmbeddedSkins="false" 
        Skin="MPower" ReadOnly="true" DataKeyField="AppointmentID" DataSubjectField="Subject" 
        DataStartField="Start" DataEndField="End" DataRecurrenceField="RecurrenceRule" 
        DataRecurrenceParentKeyField="RecurrenceParentID" width="750px" 
        DayStartTime="08:00:00" DayEndTime="20:00:00" TimeZoneOffset="03:00:00"  >
    </telerik:RadScheduler>
</asp:Content>

CodeBehind (located in the Page_Load):
AppointmentCollection appointments = new AppointmentCollection();
this.RadScheduler1.DataSource = appointments.GetAppointmentsByDate("08/19/2011");

As well, if it proves helpful...the offending JS line of code is below.  I can shift-F9 and see that my scheduler control "ctl00_ContentPlaceholder1_RadScheduler1" is populated w/all of the correct data from my binding code...it's just that the "Telerik.Web.UI.RadScheduler" is null
Telerik.Web.UI.RadScheduler._preInitialize("ctl00_ContentPlaceHolder1_RadScheduler1",0,0,1,false);

Thanks in advance for any advice!
Jim
Jim
Top achievements
Rank 1
 answered on 10 Feb 2011
1 answer
93 views
Hello -

I have a situation where I need to display RTF text, but not allow the user to modify it in any way. The RadEditor control would be perfect for this, but I can't seem to find a way to remove the toolstrips (I found how to remove the buttons but not the toolstrips), as well as disable edit ability.

Is the Editor control what I would want to use in this situation, or is there perhaps another tool which just displays RTF?

Thanks much,
Matt

Matt
Top achievements
Rank 1
 answered on 10 Feb 2011
3 answers
582 views
Hello,

I wonder if somebody knows how to get real file size (length) of the uploaded file. In my application I use this method:

protected void fileUploaded(object sender, FileUploadedEventArgs e)
        {
            try
            {
                if (RadAsyncUpload1.UploadedFiles.Count > 0)
                {
                    if (targetPersonalTmpFolder.Exists.Equals(false)) targetPersonalTmpFolder.Create();

                    foreach (UploadedFile uploadedFile in RadAsyncUpload1.UploadedFiles)
                    {
                        //UploadedFileInfo uploadedFileInfo = new UploadedFileInfo(uploadedFile);

                        string fullPath = Path.Combine(targetPersonalTmpFolder.ToString(), uploadedFile.GetName());
                        uploadedFile.SaveAs(fullPath, true);
                       
                        TmpFiles_List.Add(new UplodedFileData()
                        {
                            FileName = uploadedFile.GetName(),
                            FullFileName = targetPersonalTmpFolder.ToString() + @"\" + uploadedFile.GetName(),
                            //FileContentLength = Math.Round(uploadedFile.InputStream.Length / 1024d, 0).ToString() + " KB"
                            FileContentLength = Math.Round(uploadedFile.ContentLength / 1024d, 0).ToString() + " KB"
                        });
                       
                    }

                    BindFiles();
                    BindTmpFiles();
                }
            }
            catch (Exception ex)
            {
                //Pravdepodobne bol stlaceny klaves F5 refresh stranky...
                ReinitializeForm();
            }
        }

--------------------------------------------------------------------------------------------
The problem is that property uploadedFile.ContentLength doesn't return real length of the file. I've found that this uploadedFile.InputStream.Length returns correct file size, but when I tried to use it, then this error appeared: The process cannot access the file because it is being used by another process...

Something similar is described here: http://www.telerik.com/community/forums/aspnet-ajax/async-upload/temporary-files-locked-after-upload.aspx

For further information you can check the attachment.

Please help me to solve this issue...

Best regards Vasssek

Genady Sergeev
Telerik team
 answered on 10 Feb 2011
0 answers
99 views
Hi, I am using a RadComboBox and it's working great when I compile the application in Visual Studio. But when it's on server, the cursor is not a arrow pointer when I position it at that down arrow. It is like a straight line. When I click it, it's working. Just will not show that pointer arrow.

I have another RadComboBox on the same page it's it is perfect.

I know this is weird. Any reason.....

Thanks,
Smiely
Smiely
Top achievements
Rank 1
 asked on 10 Feb 2011
4 answers
327 views
I am trying to implement the radListBox into a project I am working on and I am having an issue removing an item from the listbox via JavaScript. I am trying to use the .findItemByValue function to get the ListBoxItem I need to remove but this function returns a value of undefined. I can get the item by using the .get_items().getitem(index) but when I call the .get_value() function I get a return value of "Telerik.Web.UI.RadListBoxItem". I am using an item template to add a delete link to the item and databinding a List<Telerik.Web.UI.RadListBoxItem> to the ListBox. I have been trying to figure this out all day. Any help would be greatly appreciated.
Kate
Telerik team
 answered on 10 Feb 2011
3 answers
334 views
I was wondering if the RadSiteMap is capable of rendering itself like the asp.net control SiteMapPath?

I like the Telerik controls and I thought this control would be my way of replacing the SiteMapPath control I use because it doesn't make it very easy to change the Text property in code, which is something I need.

So I was wondering if I can somehow replicate the SiteMapPath layout with the current RadSiteMap control or will this be something you guys would include in a later release of the control?

Thanks
Kate
Telerik team
 answered on 10 Feb 2011
3 answers
64 views
The javascript (AjaxSpellCheck.js) call to getLocalizedString() seems fail all the time in radEditor in a ASP.NET MVC2 project. The returned value is always "Undefined". Same thing for the "Background Color" tool which displays "Undefined" for the "Custom color" link text.

All other resources used by radEditor loaded at beginning are OK. 

Can someone help?

Thanks

James
James Tan
Top achievements
Rank 1
 answered on 10 Feb 2011
4 answers
199 views
I'm using RAD Calender with Multiselect = 'False'.
When I click on an already selected date, the date get deselected.
I want to stop that.

Is there any property to do that or How Can I do that?
Marin
Telerik team
 answered on 10 Feb 2011
4 answers
181 views
hi we are using web user control with rad grid and getting following error is there any way to resolve this error
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EditStudentDetails.ascx.cs"
    Inherits="AdminPortal.Admin.WebUserControl1" %>
<table>
    <tr>
        <td align="right" colspan="2">
            <asp:Button ID="btnUpdate" Text="Update" runat="server" CommandName="Update" Visible='<%# Not (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'>
            </asp:Button>
            <asp:Button ID="btnInsert" Text="Insert" runat="server" CommandName="PerformInsert"
                Visible='<%# (TypeOf DataItem Is Telerik.Web.UI.GridInsertionObject) %>'></asp:Button>
              
            <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                CommandName="Cancel"></asp:Button>
        </td>
    </tr>
</table>
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="StudentDetails.aspx.cs" Inherits="AdminPortal.Admin.StudentDetails" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <%--<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />--%>
    <!-- content start -->
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
    <telerik:RadCodeBlock runat="server" ID="radCodeBlock">
        <script type="text/javascript">
            function showFilterItem() {
                $find('<%=RadGrid1.ClientID %>').get_masterTableView().showFilterItem();
            }
            function hideFilterItem() {
                $find('<%=RadGrid1.ClientID %>').get_masterTableView().hideFilterItem();
            }
 
 
 
 
            function RowDblClick(sender, eventArgs) {
                sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
            }
        
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True"
        DataSourceID="EntityDataSource1" AllowSorting="True" AutoGenerateColumns="False"
        ShowStatusBar="true" CssClass="RadGrid">
        <MasterTableView Width="100%" DataKeyNames="StudentID">
            <Columns>
                <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="StudentID" DataType="System.Int32" HeaderText="StudentID"
                    ReadOnly="True" SortExpression="StudentID" UniqueName="StudentID" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="StudentName" HeaderText="StudentName" SortExpression="StudentName"
                    UniqueName="StudentName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ParentsName" HeaderText="ParentsName" SortExpression="ParentsName"
                    UniqueName="ParentsName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Gender" HeaderText="Gender" SortExpression="Gender"
                    UniqueName="Gender" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="EmailId" HeaderText="EmailId" SortExpression="EmailId"
                    UniqueName="EmailId">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PhoneNumber" HeaderText="PhoneNumber" SortExpression="PhoneNumber"
                    UniqueName="PhoneNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MobileNumber" HeaderText="MobileNumber" SortExpression="MobileNumber"
                    UniqueName="MobileNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject" SortExpression="Subject"
                    UniqueName="Subject" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="TimeZone" HeaderText="TimeZone" SortExpression="TimeZone"
                    UniqueName="TimeZone">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address"
                    UniqueName="Address">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Country" HeaderText="Country" SortExpression="Country"
                    UniqueName="Country" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="State" HeaderText="State" SortExpression="State"
                    UniqueName="State" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City"
                    UniqueName="City" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ZipCode" HeaderText="ZipCode" SortExpression="ZipCode"
                    UniqueName="ZipCode" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SkypeId" HeaderText="SkypeId" SortExpression="SkypeId"
                    UniqueName="SkypeId" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status"
                    UniqueName="Status" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete" />
            </Columns>
            <EditFormSettings UserControlName="EditStudentDetails.ascx" EditFormType="WebUserControl">
                <EditColumn UniqueName="EditCommandColumn1">
                </EditColumn>
            </EditFormSettings>
            <ExpandCollapseColumn ButtonType="ImageButton" Visible="False" UniqueName="ExpandColumn">
                <HeaderStyle Width="19px"></HeaderStyle>
            </ExpandCollapseColumn>
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnRowDblClick="RowDblClick" />
        </ClientSettings>
    </telerik:RadGrid>
    <%--<telerik:RadGrid AutoGenerateColumns="false" ID="RadGrid1" DataSourceID="EntityDataSource1"
        AllowFilteringByColumn="True" AllowSorting="True" CssClass="RadGrid" GridLines="None"
        AllowPaging="True" PageSize="20" runat="server" EnableLinqExpressions="false"
        Width="500px" OnItemDeleted="RadGrid1_ItemDeleted" OnItemUpdated="RadGrid1_ItemUpdated"
        OnItemCommand="RadGrid1_ItemCommand" OnPreRender="RadGrid1_PreRender">
        <PagerStyle Mode="NextPrevAndNumeric" ShowPagerText="true" />
        <GroupingSettings CaseSensitive="false" />
        <MasterTableView AutoGenerateColumns="false" AllowFilteringByColumn="True" TableLayout="Auto"
            DataKeyNames="StudentID" DataSourceID="EntityDataSource1" EditMode="InPlace"
            ShowFooter="true">
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <Columns>
               <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
                </telerik:GridEditCommandColumn>
                <telerik:GridButtonColumn UniqueName="DeleteColumn" CommandName="Delete" ButtonType="ImageButton" /> 
                <telerik:GridEditCommandColumn>
                </telerik:GridEditCommandColumn>
                <telerik:GridBoundColumn DataField="StudentID" DataType="System.Int32" HeaderText="StudentID"
                    ReadOnly="True" SortExpression="StudentID" UniqueName="StudentID" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="StudentName" HeaderText="StudentName" SortExpression="StudentName"
                    UniqueName="StudentName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ParentsName" HeaderText="ParentsName" SortExpression="ParentsName"
                    UniqueName="ParentsName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Gender" HeaderText="Gender" SortExpression="Gender"
                    UniqueName="Gender" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="EmailId" HeaderText="EmailId" SortExpression="EmailId"
                    UniqueName="EmailId">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="PhoneNumber" HeaderText="PhoneNumber" SortExpression="PhoneNumber"
                    UniqueName="PhoneNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="MobileNumber" HeaderText="MobileNumber" SortExpression="MobileNumber"
                    UniqueName="MobileNumber">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Subject" HeaderText="Subject" SortExpression="Subject"
                    UniqueName="Subject" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="TimeZone" HeaderText="TimeZone" SortExpression="TimeZone"
                    UniqueName="TimeZone">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Address" HeaderText="Address" SortExpression="Address"
                    UniqueName="Address">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Country" HeaderText="Country" SortExpression="Country"
                    UniqueName="Country" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="State" HeaderText="State" SortExpression="State"
                    UniqueName="State" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="City" HeaderText="City" SortExpression="City"
                    UniqueName="City" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ZipCode" HeaderText="ZipCode" SortExpression="ZipCode"
                    UniqueName="ZipCode" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SkypeId" HeaderText="SkypeId" SortExpression="SkypeId"
                    UniqueName="SkypeId" Visible="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status"
                    UniqueName="Status" Visible="false">
                </telerik:GridBoundColumn>
            </Columns>
            <EditFormSettings EditFormType="Template">
                <FormTemplate>
                    <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
                        style="border-collapse: collapse; background: white;">
                        <tr class="EditFormHeader">
                            <td colspan="2" style="font-size: small">
                                <b>Student Details</b>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0" class="module">
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Country:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("Country") %>'>
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            City:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("City") %>' TabIndex="1">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Region:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("State") %>' TabIndex="2">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Home Phone:
                                        </td>
                                        <td>
                                            <telerik:RadMaskedTextBox ID="HomePhoneBox" runat="server" SelectionOnFocus="SelectAll"
                                                Text='<%# Bind("PhoneNumber") %>' PromptChar="_" Width="300px" Mask="(###) ###-####"
                                                TabIndex="3">
                                            </telerik:RadMaskedTextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <table id="Table1" cellspacing="1" cellpadding="1" width="250" border="0" class="module">
                                    <tr>
                                        <td>
                                            Address:
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:TextBox ID="TextBox6" Text='<%# Bind("Address") %>' runat="server" TextMode="MultiLine"
                                                Rows="2" Columns="40" TabIndex="6">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                <b>Personal Info:</b>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <table id="Table4" cellspacing="1" cellpadding="1" width="250" border="0" class="module">
                                    <tr>
                                        <td>
                                            Student Name:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox2" Text='<%# Bind( "StudentName") %>' runat="server" TabIndex="8">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Parent Name:
                                        </td>
                                        <td>
                                            <asp:TextBox ID="TextBox3" Text='<%# Bind( "ParentsName") %>' runat="server" TabIndex="9">
                                            </asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" colspan="2">
                                <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                    runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                </asp:Button
                                <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                    CommandName="Cancel"></asp:Button>
                            </td>
                        </tr>
                    </table>
                </FormTemplate>
            </EditFormSettings>
        </MasterTableView>
        <ClientSettings EnableRowHoverStyle="true">
            <Selecting AllowRowSelect="True" />
            <Scrolling AllowScroll="false" />
        </ClientSettings>
    </telerik:RadGrid>--%>
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=AdminPortalEntities"
        DefaultContainerName="AdminPortalEntities" EnableDelete="True" EnableFlattening="False"
        EnableUpdate="True" EntitySetName="StudentInfoes">
    </asp:EntityDataSource>
    <!-- content end -->
</asp:Content>
Ajay
Top achievements
Rank 1
 answered on 10 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?