Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
150 views

I want to bind below datatable into a radmenu control with sub node.Please help me with some sample code.

Menu should be generate like below.
Campaigns & Program
-> Advertising->Bundel, Business Class, Etc
Tactics & Branded Example -> Adverting And Design->Bill Insert, Billboard, etc


My datatable contain following data-

ID          Title                                              Parent      Level       sno         Root        URL                
----------- -------------------------------------------------- ----------- ----------- ----------- ----------- --------------------
1           Campaigns and Programs                  0           1           1           1           CampaignHeader.aspx  
5           Tactics and Branded Ex                      0           1           1           2           TacticHeader.aspx
6           Advertising and Design                       5           2           1           2           home_page.aspx  
6           Advertising and Desi                           5           2           1           2           home_page.aspx  
7           Bill Insert                                             6           3           2           2           NULL    
7           Bill Insert                                             6           3           2           2           NULL      
8           Brand Standards                                 0           1           1           3           BrandStandardsHome.aspx      
11          Call Tracker                                       1           2           3           1           NULL  
11          Call Tracker                                       1           2           3           1           NULL  
16          Research                                           0           1           1           4           ResearchHome.aspx
17          Resources                                         0           1           1           5           ResourcesHome.aspx
18          Collateral and Office                          5           2           3           2           home_page.aspx   
18          Collateral and Office                          5           2           3           2           home_page.aspx   
25          Billboard                                            6           3           3           2           NULL             
25          Billboard                                           6           3           3           2           NULL             
26          Buck Slips                                        6           3           25          2           NULL             
30          Door Hanger                                    6           3           25          2           NULL             
30          Door Hanger                                    6           3           25          2           NULL             
31          eMarketing                                       6           3           25          2           NULL             
32          Core Brand Elements                       8           2           1           3           home_page.aspx   
32          Core Brand Elements                       8           2           1           3           home_page.aspx   
33          Communication Materials                 8           2           2           3           home_page.aspx   
33          Communication Materials                 8           2           2           3           home_page.aspx   
36          Brand Awareness & Image               16          2           1           4           #                
36          Brand Awareness & Image               16          2           1           4           #                
37          Affiliates                                            17          2           1           5           home_page.aspx   
37          Affiliates                                           17          2           1           5           home_page.aspx   
38          Logo Usage                                      32          3           1           3                            

I have tried with below code but it is not working.

 

RadMenu2.DataSource = dt

 

 

 RadMenu2.DataFieldParentID = "Parent"

 

 

 

 ''Set Text, Value, and NavigateUrl:

 

 

 

 RadMenu2.DataTextField = "Title"

 

 

 

RadMenu2.DataValueField = "ID"

 

 

 

 RadMenu2.DataNavigateUrlField = "URL"

 

RadMenu2.DataBind()

Thanks

Keshava
Top achievements
Rank 1
 answered on 17 Apr 2015
7 answers
301 views
I'm using a RadWindow (rw_viewUpload) which pops up and displays a RadCombo box (sel_DocType), among other things. The popup RadWindow works fine, the ComboBox its self displays fine, but when the RadCombo is selected it paints the dropdown menues on the base page, behind the popup RadWindow, rather than in the RadWindow as it should. My code is as follows. Any help appreciated, thanks. 

<telerik:RadWindow 
            ID="rw_viewUpload" runat="server" Modal="true" CenterIfModal="true" 
            Title="Upload Documents" Behaviors="Close,Move" Width="750px" Height="500px" >
            
<ContentTemplate> <P><B>Upload Documents:</B></P>
            <table id="tbl_Upload"> <tr> <td class="labelCol">
                    <asp:Label ID="Label1"  runat="server"  AssociatedControlID="rau_receipt" Text="Attach receipts / logs / misc:" />
                </td> <td>
                    <telerik:RadAsyncUpload 
                        ID="rau_receipt" runat="server" Width="99%"  MultipleFileSelection="Disabled" MaxFileInputsCount="1" 
                        AllowedFileExtensions=".pdf" AllowedMimeTypes=".pdf" PostbackTriggers="btn_claimSave,btn_claimReset" />
                    
                     <telerik:RadComboBox 
                        ID="sel_DocType" 
                        RenderMode="Lightweight" 
                        runat="server" 
                        MarkFirstMatch="true" 
                        EmptyMessage="Select a Document Type" 
                        AutoPostBack="true" 
                        OnSelectedIndexChanged="sel_DocType_SelectedIndexChanged" 
                        ExpandDirection="Down" 
                        EnableScreenBoundaryDetection="false"
                        EnableVirtualScrolling="true" 
                        ToolTip="Select Document Type" 
                        Height="150px" 
                        DropDownAutoWidth="Enabled" />

                </td></tr></table>
   </ContentTemplate>
    </telerik:RadWindow>
JT
Top achievements
Rank 1
 answered on 16 Apr 2015
1 answer
102 views

Hi,

I create a visual web part in SharePoint 2013 and use the combobox control in the web part . I bind the combobox when page load (if (!this.Page.IsPostBack)), the issue is when I select a value in the combobox and click a button(check) to filter a gird, it works well, but after a while such as 20 minuets later, when I click the button(check) again, and the page postback, but the combobox is blank and lose bound items and selected value .

Can any body tell me how can I retain the selected value and the bound items after a postback ? By the way, it happens I open the page and leave it some times later(20-30 minuets).

Thank you!

Ivan Danchev
Telerik team
 answered on 16 Apr 2015
1 answer
160 views

How can I convert a RadFlowDocument to PDF width a PdfFormatProvider (I use Telerik UI for ASP.NET AJAX)?

Thanks!

Tanya
Telerik team
 answered on 16 Apr 2015
1 answer
166 views

Hello

What is the best way to disable Arrowkeys on a closed RadCombo?

(open radcombo should still have arrow key functionality)

 

I have tried to break selection in a Keypressing event without success,(it should also consider if radcombo is open or not) :

 

  <script type="text/javascript">

        function combokeypress(sender, args) {
            if (args.get_domEvent().keyCode == 40){

                args.set_cancel(true); //not working!
            }
        }

</script>

  <telerik:RadComboBox ID="RadComboBox1" Runat="server" OnClientKeyPressing="combokeypress"  
            ResolvedRenderMode="Classic" TabIndex="1">

 

 

 Any hints?

Regards

 

Mark

Ivan Danchev
Telerik team
 answered on 16 Apr 2015
1 answer
85 views
Is there a way to cancel the finish button click event server side if there is an error and it will keep the fields from being cleared?
Tina
Top achievements
Rank 2
 answered on 16 Apr 2015
2 answers
1.2K+ views

I'm using the NavigateUrl to open a new page. That new page contains some javascript like

$(document).ready(function () {
    alert("ready!");
});
The alert dialog never displays when the window is opened.

Should I not expect the ready function to fire? Is there an alternative? I'm (re)using this window to open many different pages, but only one is trying to use the ready function.

 

Jay
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 16 Apr 2015
8 answers
191 views

Hello

 I've successfully added a resource field called "Assigned" to my radscheduler and I've tried setting the style of the appointments via the resource mapping but it does not work.

I've followed the guides and i've even tried changing it via the vb code and all of my efforts seem to be ignored for some reason.

 I was wondering if there is anything i've overlooked or something that would override my settings.

 The radscheduler code in my project is as follows;

 

<telerik:RadScheduler ID="RadScheduler1" runat="server" DataDescriptionField="Description" DataEndField="Endtime" DataKeyField="ID" DataReminderField="Reminder" DataSourceID="SqlDataSource1" DataStartField="Starttime" DataSubjectField="Subject" BorderStyle="None" Culture="en-GB" FirstDayOfWeek="Monday" LastDayOfWeek="Friday" SelectedView="TimelineView" ShowFooter="False" ShowHoursColumn="False" EnableDescriptionField="True" AllowDelete="False" BackColor="#EEEEEE" EnableRecurrenceSupport="False" ShowViewTabs="False" StartInsertingInAdvancedForm="True" RowHeight="30px" OnAppointmentDataBound="RadScheduler1_SchedulerDataBound" AllowInsert="False" Height="340px" TimelineView-HeaderDateFormat="d" RowHeaderWidth="46px" >
    <ExportSettings>
        <Pdf PageTopMargin="1in" PageBottomMargin="1in" PageLeftMargin="1in" PageRightMargin="1in" AllowAdd="True" AllowModify="True" PageHeight="297mm" PageWidth="210mm" PaperSize="A4"></Pdf>
    </ExportSettings>
    <ResourceTypes>
        <telerik:ResourceType DataSourceID="SqlDataSource1" ForeignKeyField="UserID" KeyField="UserID" Name="Assigned" TextField="Assigned" />
    </ResourceTypes>
    <ResourceStyles>                                                                                             
        <telerik:ResourceStyleMapping Type="Assigned" Text="DW" ApplyCssClass="CatCheckBox1" BackColor="#3366FF" />
        <telerik:ResourceStyleMapping Type="Assigned" Text="NR" ApplyCssClass="rsCategoryBlue"/>
        <telerik:ResourceStyleMapping Type="Assigned" Text="JK" ApplyCssClass="rsCategoryDarkGreen"/>
        <telerik:ResourceStyleMapping Type="Assigned" Text="MG" ApplyCssClass="rsCategoryGreen"/>
        <telerik:ResourceStyleMapping Type="Assigned" Text="NSG" ApplyCssClass="rsCategoryDarkRed"/>
        <telerik:ResourceStyleMapping Type="Assigned" Text="AR" ApplyCssClass="rsCategoryOrange"/>
        <telerik:ResourceStyleMapping Type="Assigned" Text="NN" ApplyCssClass="rsCategoryPink"/>
        <telerik:ResourceStyleMapping Type="Assigned" Text="AMK" ApplyCssClass="rsCategoryRed"/>
        <telerik:ResourceStyleMapping Type="Assigned" Text="EN" ApplyCssClass="rsCategoryViolet"/>
        <telerik:ResourceStyleMapping Type="Assigned" Text="SD" ApplyCssClass="rsCategoryYellow"/>                            
    </ResourceStyles>
    <Localization AdvancedNewAppointment="New Schedule" AdvancedEditAppointment="Edit Schedule" AdvancedFrom="Received Date" AdvancedSubjectRequired="Please provide a schedule subject" AdvancedTo="Promised Date" ContextMenuAddAppointment="New Schedule" HeaderAddAppointment="Add Schedule" HeaderAgendaAppointment="Schedule" HeaderDay="1 Day" HeaderWeek="7 Day" />
    <TimelineView HeaderDateFormat="dd-MM-yy" NumberOfSlots="7" ShowInsertArea="False" />
    <WeekView UserSelectable="False" />
    <DayView UserSelectable="False" />
    <MultiDayView ReadOnly="True" ShowHoursColumn="False" />
    <MonthView UserSelectable="False" VisibleAppointmentsPerDay="3" />
    <AgendaView ReadOnly="True" ResourceMarkerType="Bar" />
    <AppointmentContextMenuSettings EnableDefault="False" />
    <TimeSlotContextMenuSettings EnableDefault="False" />
    <Reminders Enabled="True" /> 
</telerik:RadScheduler>

Thanks

Mark
Top achievements
Rank 1
 answered on 16 Apr 2015
1 answer
78 views
I need to provide a drag/drop mapping between elements of two lists or even two trees by dragging.
Does telerik provide anything like what is asked in this post: http://forums.asp.net/p/1169599/2157868.aspx#2157868?
 I don't want to drop elements from one tree to another but instead allow the user to "connect" elements of two different trees via a line. I found a similar question in a thread from 2009 that didn't have any satisfactory replies but I was hoping that the answers may have changed in the last 5 years.  Thanks!
Aneliya Petkova
Telerik team
 answered on 16 Apr 2015
2 answers
254 views
I have a rad grid that I bind with 2 data tables.  I need to add a custom row and merge the cells of that row, add a background color and text that spans the row.  Any suggestions on how to accomplish this?
Mark
Top achievements
Rank 1
 answered on 16 Apr 2015
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?