Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
227 views

I have been using RadTreeList in one of my project, I have used RadUpload Control which lies inside the EditFormSettings of the RadTreeList. I have used javascript for validating RadUpload control (i.e. where user has selected any file or not), now the problem here is that I'm not able to find/get the RadUpload control inside the RadTreeList in my javascript, though I'm getting the RadTreeList control.

Below is my code :-
 function IsFilesSelected(source, args) {
            debugger;
            args.IsValid = true;
            var treeList = $find("<%= FAQRadTreeList.ClientID %>");
            var RadUpload = treeList._findChildControl.getName("UploadDocumentRadUpload");
            var UploadLabel = treeList.selectItem(ImageExtensionLabel);
            var FileInputs = RadUpload.getFileInputs();
            for (var i = 0; i < FileInputs.length; i++) {
                if (FileInputs[i].value && FileInputs[i].value.length > 0) {
                    args.IsValid = true;
                }
                else {
                    if (UploadLabel == null || UploadLabel.innerHTML == '')
                        args.IsValid = false;
                    else
                        args.IsValid = true;
                }
            }
        }

While my RadTreeList is shown below :-
<telerik:RadTreeList ID="FAQRadTreeList" runat="server" AllowPaging="True" DataSourceID="FAQSqlDataSource"
                        PageSize="20" DataKeyNames="FAQ_ID" ParentDataKeyNames="FAQ_Parent_ID" AutoGenerateColumns="False"
                        Width="100%" OnInsertCommand="FAQRadTreeList_InsertCommand" OnItemCommand="FAQRadTreeList_ItemCommand"
                        OnItemDataBound="FAQRadTreeList_ItemDataBound" OnUpdateCommand="FAQRadTreeList_UpdateCommand"
                        OnItemDrop="FAQRadTreeList_ItemDrop">
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                        <Columns>
                            <telerik:TreeListEditCommandColumn UniqueName="InsertCommandColumn" ButtonType="ImageButton"
                                AddRecordText="Add" ShowEditButton="true" ItemStyle-CssClass="MyImageButton">
                                <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="60px" />
                                <HeaderStyle VerticalAlign="Top" HorizontalAlign="Left" Width="60px" />
                            </telerik:TreeListEditCommandColumn>
                            <telerik:TreeListTemplateColumn DataField="FAQ_Title" UniqueName="FAQ_Title" HeaderText="Title">
                                <ItemTemplate>
                                    <asp:Label ID="FAQTitleLabel" runat="server" Text='<%# Bind("FAQ_Title") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="120px" />
                                <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" Width="120px" />
                            </telerik:TreeListTemplateColumn>
                            <telerik:TreeListTemplateColumn DataField="FAQ_Description" UniqueName="FAQ_Description"
                                HeaderText="Description">
                                <ItemTemplate>
                                    <asp:Label ID="FAQDescriptionLabel" runat="server" Text='<%# ( Eval("FAQ_Description").ToString().Length > 150)? string.Concat(Eval("FAQ_Description").ToString().Substring(0, 150), ".....") : Eval("FAQ_Description") %>'></asp:Label>
                                    <telerik:RadToolTip ID="FAQDescriptionRadToolTip" TargetControlID='<%# ( Eval("FAQ_Description").ToString().Length > 150)? "FAQDescriptionLabel" : "" %>'
                                        Width="400px" Height="300px" ContentScrolling="Y" runat="server" HideDelay="1000"
                                        Position="TopCenter" RelativeTo="Element" ShowDelay="1000">
                                        <%# Eval("FAQ_Description")%>
                                    </telerik:RadToolTip>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                                <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" />
                            </telerik:TreeListTemplateColumn>
                            <telerik:TreeListTemplateColumn DataField="ParentName" UniqueName="ParentName" HeaderText="Parent Item">
                                <ItemTemplate>
                                    <asp:Label ID="ParentTitleLabel" runat="server" Text='<%# Bind("ParentName") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" Width="100px" />
                                <HeaderStyle HorizontalAlign="Left" VerticalAlign="Top" Width="100px" />
                            </telerik:TreeListTemplateColumn>
                            <telerik:TreeListTemplateColumn DataField="FAQ_Order" UniqueName="FAQ_Order" HeaderText="Order">
                                <ItemTemplate>
                                    <telerik:RadNumericTextBox ID="FAQOrderRadNumericTextBox" MinValue="1" NumberFormat-DecimalDigits="0"
                                        Enabled="false" runat="server" Width="50px" Text='<%# Bind("FAQ_Order") %>'>
                                        <EnabledStyle Font-Names="Verdana" HorizontalAlign="Right" />
                                    </telerik:RadNumericTextBox>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" Width="60px" />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="60px" />
                            </telerik:TreeListTemplateColumn>
                            <telerik:TreeListTemplateColumn HeaderText="Status" DataField="FAQ_ActiveStatus"
                                UniqueName="FAQ_ActiveStatus">
                                <ItemTemplate>
                                    <asp:Label ID="ActiveStatusLabel" runat="server" CssClass='<%# (Convert.ToBoolean(Eval("FAQ_ActiveStatus"))) ? "active" : "inactive" %>'
                                        ToolTip='<%# (Convert.ToBoolean(Eval("FAQ_ActiveStatus"))) ? "Active" : "Inactive" %>'
                                        Text="     "></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" Width="60px" />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="60px" />
                            </telerik:TreeListTemplateColumn>
                            <telerik:TreeListTemplateColumn DataField="FAQ_ActiveStatus" HeaderText="Action"
                                UniqueName="ActiveStatus">
                                <ItemTemplate>
                                    <asp:ImageButton ID="ActiveInactiveButton" runat="server" ToolTip='<%# (Convert.ToBoolean(Eval("FAQ_ActiveStatus"))) ? "Make inactive" : "Make active" %>'
                                        Width="14px" Height="14px" CommandName="ActiveInactive" ImageUrl='<%# (Convert.ToBoolean(Eval("FAQ_ActiveStatus"))) ? "../App_Themes/ELPISCMS/images/inactive.png" : "../App_Themes/ELPISCMS/images/active.png" %>' />
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Top" Width="60px" />
                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="60px" />
                            </telerik:TreeListTemplateColumn>
                        </Columns>
                        <EditFormSettings EditFormType="Template" PopUpSettings-Width="100%">
                            <FormTemplate>
                                <asp:Panel ID="DetailsPanel" runat="server" DefaultButton="SaveRadButton">
                                    <table border="0" cellpadding="0" cellspacing="5" class="innertable">
                                        <tr>
                                            <td class="td18">
                                                Title : <span class="mandatorymark">*</span>
                                            </td>
                                            <td class="td82">
                                                <telerik:RadTextBox ID="FAQTitleRadTextBox" runat="server" SkinID="FAQTitleRadTextBox">
                                                </telerik:RadTextBox>
                                                <asp:RequiredFieldValidator ID="ReferenceTitleRequiredFieldValidator" runat="server"
                                                    ValidationGroup="FAQValidationGroup" Display="Dynamic" SetFocusOnError="true"
                                                    ControlToValidate="FAQTitleRadTextBox" CssClass="requiredfield" ErrorMessage="Required!"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="td18">
                                                Description : <span class="mandatorymark">*</span>
                                            </td>
                                            <td class="td82">
                                                <telerik:RadTextBox ID="FAQDescriptionRadTextBox" runat="server" TextMode="MultiLine"
                                                    Rows="8" SkinID="FAQDescriptionRadTextBox">
                                                </telerik:RadTextBox>
                                                <%-- <telerik:RadEditor ID="ReferenceDescriptionRadEditor" runat="server" AutoResizeHeight="false"
                                                    EnableResize="false" OnClientLoad="OnClientLoad" EditModes="Design, Html" AllowScripts="false"
                                                    ContentFilters="RemoveScripts,MakeUrlsAbsolute,FixUlBoldItalic,FixEnclosingP,IECleanAnchors,MozEmStrong,ConvertFontToSpan,ConvertToXhtml,IndentHTMLContent"
                                                    NewLineBr="true" StripFormattingOptions="AllExceptNewLines" StripFormattingOnPaste="AllExceptNewLines"
                                                    Height="600px" Width="700px">
                                                    <ImageManager ViewPaths="~/uploads/editoruploadimages" UploadPaths="~/uploads/editoruploadimages"
                                                        DeletePaths="~/uploads/editoruploadimages" />
                                                    <CssFiles>
                                                        <telerik:EditorCssFile Value="" />
                                                    </CssFiles>
                                                    <ContextMenus>
                                                        <telerik:EditorContextMenu Enabled="true">
                                                            <telerik:EditorTool Name="Cut" />
                                                            <telerik:EditorTool Name="Copy" />
                                                            <telerik:EditorTool Name="Paste" />
                                                        </telerik:EditorContextMenu>
                                                    </ContextMenus>
                                                    <Tools>
                                                        <telerik:EditorToolGroup>
                                                            <telerik:EditorTool Name="AjaxSpellCheck" />
                                                            <telerik:EditorTool Name="FindAndReplace" />
                                                            <telerik:EditorTool Name="SelectAll" />
                                                            <telerik:EditorTool Name="Cut" />
                                                            <telerik:EditorTool Name="Copy" />
                                                            <telerik:EditorTool Name="Paste" />
                                                            <telerik:EditorTool Name="Redo" />
                                                            <telerik:EditorTool Name="Undo" />
                                                            <telerik:EditorTool Name="InsertLink" />
                                                        </telerik:EditorToolGroup>
                                                        <telerik:EditorToolGroup>
                                                            <telerik:EditorTool Name="Bold" />
                                                            <telerik:EditorTool Name="Italic" />
                                                            <telerik:EditorTool Name="Underline" />
                                                        </telerik:EditorToolGroup>
                                                        <telerik:EditorToolGroup>
                                                            <telerik:EditorTool Name="FontName" />
                                                            <telerik:EditorTool Name="RealFontSize" />
                                                            <telerik:EditorTool Name="ApplyClass" />
                                                        </telerik:EditorToolGroup>
                                                        <telerik:EditorToolGroup>
                                                            <telerik:EditorTool Name="ForeColor" />
                                                            <telerik:EditorTool Name="BackColor" />
                                                            <telerik:EditorTool Name="FormatStripper" />
                                                        </telerik:EditorToolGroup>
                                                        <telerik:EditorToolGroup>
                                                            <telerik:EditorTool Name="InsertAnchor" />
                                                            <telerik:EditorTool Name="InsertCustomLink" />
                                                            <telerik:EditorTool Name="InsertDate" />
                                                            <telerik:EditorTool Name="InsertGroupbox" />
                                                            <telerik:EditorTool Name="InsertHorizontalRule" />
                                                            <telerik:EditorTool Name="InsertUnorderedList" />
                                                            <telerik:EditorTool Name="InsertOrderedList" />
                                                            <telerik:EditorTool Name="Paragraph" />
                                                            <telerik:EditorTool Name="InsertTable" />
                                                            <telerik:EditorTool Name="InsertSnippet" />
                                                        </telerik:EditorToolGroup>
                                                        <telerik:EditorToolGroup>
                                                            <telerik:EditorTool Name="Indent" />
                                                            <telerik:EditorTool Name="Outdent" />
                                                            <telerik:EditorTool Name="JustifyRight" />
                                                            <telerik:EditorTool Name="JustifyLeft" />
                                                            <telerik:EditorTool Name="JustifyCenter" />
                                                        </telerik:EditorToolGroup>
                                                        <telerik:EditorToolGroup>
                                                            <telerik:EditorTool Name="LinkManager" />
                                                            <telerik:EditorTool Name="ImageManager" />
                                                            <telerik:EditorTool Name="ImageMapDialog" />
                                                            <telerik:EditorTool Name="DocumentManager" />
                                                            <telerik:EditorTool Name="ConvertToLower" />
                                                            <telerik:EditorTool Name="ConvertToUpper" />
                                                            <telerik:EditorTool Name="ToggleScreenMode" />
                                                        </telerik:EditorToolGroup>
                                                    </Tools>
                                                </telerik:RadEditor>
                                                <div style="float: right;">
                                                    <span id="counter" style="text-align: right;"></span>
                                                </div>--%>
                                                <asp:RequiredFieldValidator ID="FAQDescriptionRequiredFieldValidator" runat="server"
                                                    ValidationGroup="FAQValidationGroup" Display="Dynamic" SetFocusOnError="true"
                                                    ControlToValidate="FAQDescriptionRadTextBox" CssClass="requiredfield" ErrorMessage="Required!"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <td class="td18">
                                            Upload Document : <span class="mandatorymark">*</span>
                                        </td>
                                        <td class="td82">
                                            <telerik:RadUpload ID="UploadDocumentRadUpload" runat="server" ControlObjectsVisibility="AddButton,RemoveButtons"
                                                InputSize="50" AllowedFileExtensions=".png,.jpg,.jpeg,.gif" oncontextmenu="return false;"
                                                onpaste="return false;" ReadOnlyFileInputs="true"/>
                                            <span style="line-height: 15px; vertical-align: top;">
                                                <asp:Label ID="ImageExtensionLabel" runat="server" Text="<br/>(Only .PNG,.JPG,.JPEG,.GIF images allowed)" />
                                                <br />
                                                <asp:Label runat="server" ID="ImageNameLabel" Visible="false" />
                                            </span>
                                            <br />
                                            <telerik:RadProgressArea ID="UploadDocumentRadProgressArea" runat="server" ProgressIndicators="CurrentFileName">
                                            </telerik:RadProgressArea>
                                            <asp:CustomValidator ID="IsFilesSelectedCustomValidator" runat="server" ClientValidationFunction="IsFilesSelected"
                                                Display="Dynamic" SetFocusOnError="true" CssClass="requiredfield" ValidationGroup="FAQValidationGroup"
                                                ErrorMessage="Required!"></asp:CustomValidator>
                                            <asp:CustomValidator ID="ValidateExtensionCustomValidator" runat="server" ClientValidationFunction="validateImageRadUpload"
                                                Display="Dynamic" SetFocusOnError="true" CssClass="requiredfield" ValidationGroup="FAQValidationGroup"
                                                ErrorMessage="<br/>(Only .PNG,.JPG,.JPEG,.GIF images allowed)"></asp:CustomValidator>
                                        </td>
                                        <tr>
                                            <td>
                                                  
                                            </td>
                                            <td class="td82">
                                                <telerik:RadGrid ID="FilesRadGrid" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
                                                    AllowSorting="True" AutoGenerateColumns="False" CellSpacing="0" DataSourceID="FilesSqlDataSource"
                                                    GridLines="None" Width="530px" Visible="false" OnItemCommand="FilesRadGrid_ItemCommand">
                                                    <MasterTableView DataKeyNames="FAQ_Uploads_ID" DataSourceID="FilesSqlDataSource">
                                                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                                            <HeaderStyle Width="20px" />
                                                        </RowIndicatorColumn>
                                                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                                            <HeaderStyle Width="20px" />
                                                        </ExpandCollapseColumn>
                                                        <Columns>
                                                            <telerik:GridBoundColumn DataField="FileName" FilterControlAltText="Filter FileName column"
                                                                HeaderText="File Name" SortExpression="FileName" UniqueName="FileName" FilterControlWidth="80%">
                                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                                                                <ItemStyle HorizontalAlign="Left" Font-Size="11px" Font-Names="Arial" VerticalAlign="Middle" />
                                                            </telerik:GridBoundColumn>
                                                            <telerik:GridTemplateColumn HeaderText="Action" AllowFiltering="false">
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="DeleteImageButton" runat="server" ToolTip="Delete" CommandName="Del"
                                                                        ImageUrl="~/App_Themes/ELPISCMS/images/delete.png" OnClientClick="if (!confirm('Are you sure, you want to delete this record?')) {return false;}"
                                                                        CommandArgument='<%# Eval("FAQ_Uploads_ID") +":"+ Eval("FAQ_Uploads_ID") %>' />
                                                                </ItemTemplate>
                                                                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
                                                                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
                                                            </telerik:GridTemplateColumn>
                                                        </Columns>
                                                        <EditFormSettings>
                                                            <EditColumn FilterControlAltText="Filter EditCommandColumn column" />
                                                        </EditFormSettings>
                                                    </MasterTableView>
                                                    <FilterMenu EnableImageSprites="False" />
                                                    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default" />
                                                </telerik:RadGrid>
                                                <asp:SqlDataSource ID="FilesSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:elpis_cmsConnectionString %>"
                                                    SelectCommand="Usp_FAQ_Uploads_Select" SelectCommandType="StoredProcedure">
                                                    <SelectParameters>
                                                        <asp:ControlParameter ConvertEmptyStringToNull="true" ControlID="FAQIDHiddenField"
                                                            DbType="Int32" Name="FAQ_ID" PropertyName="Value" />
                                                    </SelectParameters>
                                                </asp:SqlDataSource>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="td18">
                                                Status :
                                            </td>
                                            <td class="td82">
                                                <asp:RadioButton ID="ActiveRadioButton" runat="server" CssClass="radiobutton" Checked="true"
                                                    GroupName="ActiveInactive" />Active
                                                <asp:RadioButton ID="InactiveRadioButton" runat="server" CssClass="radiobutton" GroupName="ActiveInactive" />Inactive
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                  
                                            </td>
                                            <td class="td82">
                                                <telerik:RadButton ID="SaveRadButton" runat="server" Text='<%# (Container is TreeListEditFormInsertItem) ? "Save" : "Update" %>'
                                                    CausesValidation="true" CommandName='<%# (Container is TreeListEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                                    ValidationGroup="FAQValidationGroup" Width="80px">
                                                    <Icon PrimaryIconUrl="~/App_Themes/ELPISCMS/images/save2.png" PrimaryIconLeft="5"
                                                        PrimaryIconTop="3" />
                                                </telerik:RadButton>
                                                <telerik:RadButton ID="CancelRadButton" runat="server" Text="Cancel" CommandName="Cancel"
                                                    CausesValidation="false" Width="80px">
                                                    <Icon PrimaryIconUrl="~/App_Themes/ELPISCMS/images/cancel2.png" PrimaryIconLeft="5"
                                                        PrimaryIconTop="3" />
                                                </telerik:RadButton>
                                            </td>
                                        </tr>
                                    </table>
                                </asp:Panel>
                            </FormTemplate>
                        </EditFormSettings>
                        <ClientSettings AllowItemsDragDrop="true">
                            <Selecting AllowItemSelection="True" />
                        </ClientSettings>
                    </telerik:RadTreeList>
                    <asp:SqlDataSource ID="FAQSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:elpis_cmsConnectionString %>"
                        SelectCommand="Usp_FAQ_Select" SelectCommandType="StoredProcedure"></asp:SqlDataSource>

It would be great if you guys please help me.

Thanks

Ajay

 

Ajay
Top achievements
Rank 2
 answered on 25 Jun 2012
1 answer
95 views
Hi,

How can I have a rad numeric textbox which allow to enter only from 1 to 100. And it should be 0 if user enters a number greater than 100.

Thanks & regards,
Aneesh Daniel
Princy
Top achievements
Rank 2
 answered on 25 Jun 2012
3 answers
124 views
We have dynamically created tabs using RadTabStrip.
We have also set the following  RAdTabStrip Properties

<telerik:RadTabStrip ID="RadTabStrip1" runat="server"   SelectedIndex="0" OnTabClick="RadTabStrip1_TabClick" ScrollChildren="true" PerTabScrolling="true"  ScrollButtonsPosition="Middle" Orientation="HorizontalTop" Width="1340px">
  <Tabs ></Tabs>
</telerik:RadTabStrip>

Tabs are generated dynamically and the scroll also appears but the tab Tab at the Last Index is shown in the next line.
 I tried reducing the number of tabs by 1 but the problem still persists.

I think the width of the tab and the text length in each tab is creating a problem. But due to my requirement i have to mention a fixed width to the tab strip.

I have attached the image of the tabstrip.

Thanks in Advance.


Peter
Telerik team
 answered on 25 Jun 2012
1 answer
92 views
        public ICollection<Employe> Data
        {
            set
            {
                this.RadTreeView.DataSource = value;
                this.RadTreeView.DataBind();
                this.RadTreeView.ExpandAllNodes();
}
}

Tree view nodes are not expanded. Is there another way to do this?
Plamen
Telerik team
 answered on 25 Jun 2012
1 answer
61 views
I just started testing a web app in preparation for moving to IE 9 and found that the track changes dialog in the editor does not work. A blank screen comes up. It works fine in compatability mode. Has anyone seen this yet?
Rumen
Telerik team
 answered on 25 Jun 2012
7 answers
527 views
On the server-side, I would like to save any changes made in the ImageEditor.  How can this be done?  I've messed with SaveEditableImage but am unable to get it to save correctly.  I have a button on the page:

<div class="BadgePopup">
    <telerik:RadUpload runat="server" ID="_upload" FocusOnLoad="True"
        MaxFileInputsCount="1" ControlObjectsVisibility="None" Skin="Forest"
        TargetFolder="~/BadgePhotos" Width="240px"></telerik:RadUpload>
    <telerik:RadButton runat="server" ID="_submit" Text="Upload" onclick="_submit_Click" Skin="Forest"></telerik:RadButton>     
    <telerik:RadButton ID="_finished" runat="server" Text="Save" onclick="_photo_Finished" Skin="Forest" /><br /><br />
 
    <telerik:RadImageEditor ID="_image" runat="server" Skin="Forest" Width="400px" Height="213px"
        AllowedSavingLocation="Server" ToolsFile="~/BadgePhotos/Dialogs.xml" >
    </telerik:RadImageEditor>
</div>

And then the codebehind:
protected void _photo_Finished(object sender, EventArgs e)
{
    using (DAL.KeeleyBarcodeDataContext dal = new DAL.KeeleyBarcodeDataContext())
    {
        DAL.Employee emp = (from n in dal.Employees where n.EmployeeID == new Guid(EmployeeID) select n).First();
        emp.PicturePath = Path.GetFileName(_image.ImageUrl);
 
        _image.SaveEditableImage(emp.PicturePath, true);
        dal.SaveChanges();
    }
}

If I do a simple resize of the image and click "Save" (my save, not the save on the toolbar), the SaveEditableImage code runs without an exception, yet the image is not saved with the new resized dimensions.  I am implementing this Save method because my users don't like to click on the Save on the toolbar and then yet another Save so I can update the DB.









Dobromir
Telerik team
 answered on 25 Jun 2012
1 answer
109 views
Hello,

I am looking for a sample code where in radtreeview, under each radtreenode there will be a radgrid depending on the grouping.
I created a radtreeview where I am adding the radtreenodes dynamically and then creating nodetemplate dynamically where I am creating a radgrid control. I have a editcommandcolumn as one of the column on the radgrid. The problem I am facing is binding the radgrid datasource in needdatasouce event. So if I have 3 nodes and under that 3 radgrids then needdatasource is firing 3 times attaching the last datasource results to all the 3 radgrids. Please provide me a sample code where needdatasource is handled for hierarchy of radgrids.

Thanks
Swarup
Top achievements
Rank 1
 answered on 25 Jun 2012
1 answer
41 views
I  selected a recurring appointment and chosen option edit this occurence(single occurence) and saved the detail,  it is throwing following error. 

System.NullReferenceException was unhandled by user code
  Message=Object reference not set to an instance of an object.
  Source=Telerik.Web.UI
  StackTrace:
       at Telerik.Web.UI.Scheduling.AppointmentController.AttachRecurrenceException(Appointment parent, Appointment exceptionAppointment, DateTime explicitExceptionDate, ISchedulerInfo schedulerInfo)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateException(Appointment modifiedAppointment, Appointment originalAppointment, ISchedulerInfo schedulerInfo)
       at Telerik.Web.UI.Scheduling.AppointmentController.UpdateAppointment(ISchedulerInfo schedulerInfo, Appointment originalAppointment, Appointment modifiedAppointment)
       at Telerik.Web.UI.WebServiceAppointmentController.CreateRecurrenceException[T](ISchedulerInfo schedulerInfo, T recurrenceExceptionData)
       at Telerik.Web.UI.WebServiceAppointmentController.CreateRecurrenceException(ISchedulerInfo schedulerInfo, AppointmentData recurrenceExceptionData)
       at CalendarTest.SchedulerWebService.CreateRecurrenceException(MySchedulerInfo schedulerInfo, AppointmentData recurrenceExceptionData) in D:\dotnet Practice\CalendarTest\SchedulerWebService.asmx.cs:line 77
  InnerException: 

Not sure what is causing problem. The line number 77 is referring to following code:

return Controller.CreateRecurrenceException(schedulerInfo, recurrenceExceptionData);



Plamen
Telerik team
 answered on 25 Jun 2012
1 answer
199 views

I am not sure of the best way to describe my question, as the title doesn't even make sense to me!

What I am doing is calling a WCF Service and I get an Object back, within this object are a selection of elements and some arrays.

So the object would be something like...(I would be passed the Person)

    public class Person
   
{
       
string firstName;
       
string lastName;
       
Address[] addressDetails;
   
}
   
public class Address
   
{
       
string address1;
       
string address2;
       
string postcode;
   
}

So then on my page, I would like to display not only firstName and lastName. But the details of the address. If you can imagine this page to be a profile view. So all the fields in a list and the ability to edit them.

Currently I can access any element that is "top level" i.e. not within an array. I do that on the ascx page using the following code within a Telerik RadListView...

<tr>
 
<td>
 
<asp:Label ID="firstNameLabel" runat="server"
   
AssociatedControlID="firstNameTextBox" Text="firstName"></asp:Label>
 
</td>
 
<td>
   
<asp:TextBox ID="firstNameTextBox" runat="server" CssClass="rlvInput"
   
Text='<%# Bind("firstName") %>' />
 
</td>
</tr>

So I guess what I am asking is; how do I display 'address1' on the page.

Hope somebody can help me out! Thanks

Tsvetina
Telerik team
 answered on 25 Jun 2012
1 answer
87 views

I am using radtree having around 1000 nodes with different hierarchy.

I have added this tree under rad splitter and set pan height according to contain.

There is only 1 root node under root node all the nodes are getting added.

I have referred  http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/contextmenu/defaultcs.aspx

demo to add context menu for adding nodes in the tree.

Whenever I add the node in between of the tree nodes focus of the screen redirected to newly created node.

But when I am adding node in root node the focus is not going at the end of the screen on newly created node.

So to name it I have to scroll down to that node & have to rename it.

Can you please let me know why it is behaving this way?

Is there any fix for it?
Thanks in advance

Plamen
Telerik team
 answered on 25 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?