Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
75 views
Hello,

I fill a
treeview with a ObjectDataSource object. It may be that the ObjectDataSource object does not return a record supplies. Should this be the case, then, a node can be displayed. How can I realize something like that?

<telerik:RadTreeView ID="RadTreeView1" Runat="server" DataFieldID="LayoutID"
                  DataFieldParentID="ParentID" DataSourceID="ObjectDataSource1"
                  DataTextField="LayoutName" DataValueField="LayoutArt"
                  onnodedatabound="RadTreeView1_NodeDataBound" 
                    Width="100%" oncontextmenuitemclick="RadTreeView1_ContextMenuItemClick">


Hope you can understand me.
  • No record from DataSource - own node to be displayed
  • Records available from DataSource - no separate node


Best regards
Reiner

Bozhidar
Telerik team
 answered on 25 Jan 2012
1 answer
54 views
The issue that I am seeing is when I add another calendar to my scheduler, it does not populate in the advanced form calendar drop down until a total refresh (cntrl + f5) is done on the page.  I can see the resources getting returned when doing a postback refresh from the getResources javascript call.  Is there a way to ensure the edit drop down is refreshed upon a partial post back?  My server side code for the post back is below (The code is not totally optimized yet, as I am just trying to figure out why this is happening).

<telerik:RadScheduler runat="server" ID="rsMySchedule" SelectedView="DayView"
                FirstDayOfWeek="Sunday" LastDayOfWeek="Saturday" Reminders-Enabled="false"
                Skin="Windows7"
                MonthView-VisibleAppointmentsPerDay="10"
                StartEditingInAdvancedForm="false"
                ShowAllDayRow="true"
                EnableDescriptionField="true"
                AppointmentStyleMode="Default"
                EnableExactTimeRendering="true"
                OverflowBehavior="Expand"
                OnClientAppointmentDataBound="rsMySchedule_appointmentsDataBound"
                OnClientResourcesPopulating="rsMySchedule_resourcePopulating"
                OnClientAppointmentsPopulating="rsMySchedule_appointmentsPopulating"
                OnClientRequestFailed = "rs_MySchedule_clientRequestFailed"
                WeekView-UserSelectable="true"
                MultiDayView-UserSelectable="false"
                TimelineView-UserSelectable="false" >
                <AdvancedForm Modal="true" />
                <WebServiceSettings Path="~/Services/SchedulerWebService.asmx" />
                <TimeSlotContextMenuSettings EnableDefault="true" />
                <AppointmentContextMenuSettings EnableDefault="true" />
            </telerik:RadScheduler>

private void InitializeResources()
{
    var resources = GetUserCalendars(CurrentUserID);
    SchedulerWebService oService = new SchedulerWebService();
 
    var rsxTypes = oService.GetResourceTypes(null);
    rsMySchedule.Resources.Clear();
    if (!IsPostBack) rsMySchedule.ResourceTypes.AddRange(rsxTypes);
 
    rsMySchedule.Resources.AddRange(
        resources
            .Select(rsx => new Telerik.Web.UI.Resource(rsx.Type, rsx.Key, rsx.Text))
            .ToList()
            );
}
Ivana
Telerik team
 answered on 25 Jan 2012
3 answers
63 views
Created a theme from Black using the Style Builder.

Everything looks great except for we have a selected row on an Alternate Row that has an AlternateRow Style.

What's happening is it looks like there's a conflict between the Selected Row style and the AlternateRow style, the Selected Row style is never applied to it. I spent 5 hours yesterday working with the .css file for my grid to no avail (I'm not a CSS expert by a long shot so...).

What I did is I created multiple styles using Style Builder and all had the issue in common.

Does anyone know which css needs to be changed/applied.

Any documentation on the css used? I found some but it was for ASP.Net and not ASP.Net Ajax on the Telerik site.

Thanks
Galin
Telerik team
 answered on 25 Jan 2012
1 answer
56 views
I having the same problem explained in this post

http://www.telerik.com/community/forums/aspnet-ajax/grid/need-help-with-grid-scrollbar-and-browser-scrollbar.aspx

I searched the forums looking for the solution, but I can't find anything.

The problem is:
if I use

<ClientSettings>

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

</ClientSettings>

 

 

Then RadGrid shows the vertical/horizontal scrollbars on the RadGrid AND in the BROWSER WINDOW.
If you use the proposed solution on the above post (<body scroll="no" style="overflow: hidden">), then, if the radgrid rows go beyond the browser window size, then the radgrid is cut and you can't scrolldown, because the scrollbar is hidden.

How I can just show the RadGrid scrollbar and not the browser scrollbar at the same time?
Any work around ?

Thanks in advance

Jose


Galin
Telerik team
 answered on 25 Jan 2012
3 answers
168 views
Hi guys,

I'm evaluating the Telerik ASP.NET AJAX library and one issue that's somewhat of a deal breaker is the erratic behavior of the multi column combobox.

The combobox displays the names of people in the following format 'Last name,Firstname'
It works fine until I type a character after the comma. Then I don't get any results in the combobox dropdown.

So when I search for 'SMITH,J' my SQL query brings a few records into the datatable.  But they don't get displayed in the dropdown.

At the bottom of the dropdown, I have displayed the count of records and it shows the correct number there (e.g 3) but no rows appear.

here's some code from my ASPX page
You can view the live page at https://erxrequest.rnahealth.com/newAmos/Customer.aspx
(use the customer search combobox)

<telerik:RadComboBox ID="RadCmb_CustName" AllowCustomText="true" runat="server" Width="289px"
 Height="200px" EmptyMessage="Search for Customer..." EnableLoadOnDemand="true"
 ShowMoreResultsBox="true" EnableVirtualScrolling="true" CloseDropDownOnBlur="true"
 ChangeTextOnKeyBoardNavigation="true" CollapseAnimation-Type="InBack" ExpandAnimation-Type="InBack"
 IsCaseSensitive="true" Filter="Contains" HighlightTemplatedItems="true" OnClientItemsRequested="UpdateItemCountField"
 OnDataBound="RadCmb_CustName_DataBound" OnItemDataBound="RadCmb_CustName_ItemDataBound"
 LoadingMessage="Loading....." DropDownWidth="600px" OpenDropDownOnLoad="false"
ShowWhileLoading="true" ShowToggleImage="true" ShowDropDownOnTextboxClick="false"
 OnItemsRequested="RadCmb_CustName_ItemsRequested">

 <HeaderTemplate>
  <ul>
<li class="col4">Patient</li>
<li class="col1">Facility</li>
 <li class="col2">Room #</li>
<li class="col3">Date of Borth</li>
<li class="col3">Active/Deactive</li>
</ul>
</HeaderTemplate>
<ItemTemplate>
<ul>
<li class="col4">
<%# DataBinder.Eval(Container.DataItem, "CCUSNM") %></li>
<li class="col1">
 <%# DataBinder.Eval(Container.DataItem, "CNHABR") %></li>
<li class="col2">
  <%# DataBinder.Eval(Container.DataItem, "CRMNO") %></li>
 <li class="col3">
 <%# DataBinder.Eval(Container.DataItem, "CBRTHD") %></li>
<li class="col3">
 <%# DataBinder.Eval(Container.DataItem, "CRCDCD") %></li>
</ul>
</ItemTemplate>


Ivana
Telerik team
 answered on 25 Jan 2012
2 answers
683 views
Hi,,
I am using RadListBox, I want to get all values of listbox.
I am tying to use "get_items" method But it is showing foll. error.
Uncaught TypeError: Object [object Object] has no method 'get_items' 
 
ASPX code
<script type="text/javascript" charset="utf-8">
        $(document).ready(function() {
 
 $('#<%=btnViewAssignedSlots.ClientID %>').click(function() {
               var list = $('#<%= rdLstSource.ClientID %>');
                var items = list.get_items();
               var firstItem = items.getItem(0);
                alert(firstItem);
}
 
});
    </script>

<telerik:RadListBox runat="server" ID="rdLstSource" Height="200px" Width="230px"
                        AutoPostBackOnTransfer="false" AllowTransfer="true" TransferToID="rdLstDestination"
                        AllowTransferOnDoubleClick="true" EnableDragAndDrop="true" ButtonSettings-ShowTransferAll="true">
                        <Items>
                            <telerik:RadListBoxItem Text="Sunday" Value="1" />
                            <telerik:RadListBoxItem Text="Monday" Value="2"/>
                            <telerik:RadListBoxItem Text="Tuesday" Value="3"/>
                            <telerik:RadListBoxItem Text="Wednesday" Value="4"/>
                            <telerik:RadListBoxItem Text="Thursday" Value="5"/>
                            <telerik:RadListBoxItem Text="Friday" Value="6"/>
                            <telerik:RadListBoxItem Text="Saturday" Value="7"/>
                        </Items>
                    </telerik:RadListBox>

Please help me to solve.
Bozhidar
Telerik team
 answered on 25 Jan 2012
6 answers
205 views
Hi

I am using an edit form template within a radgrid. My edit form template is used to update Customer records. One of the fields in my customer table is TitleID which is a foreign key to the Titles table. This table contains records such as Mr, Mrs Miss etc. The form template contains a drop down list of these titles which is populated from the database. The SelectedValue property of the dropdown list is set to the TitleID of the current record. This is achieved like so

 <asp:DropDownList ID="cboTitle" runat="server" DataTextField="Title" DataValueField="TitleID" 
SelectedValue='<%# Bind("ContactTitleID") %>'     DataSource='<%# (GetTitles()) %>'>  
                </asp:DropDownList><br /> 

This code works fine for automatic updates. However when i try to perform an insert I get an error binding to the drop down list

'cboTitle' has a SelectedValue which is invalid because it does not exist in the list of items.  
Parameter name: value  

I understand what is causing this error. Naturally for an empty record the value for Bind("ContactTitleID") is an empty string whereas this is not one of the items in the drop down list of titles.

How can i overcome this whilst still performing automatic inserts and updates? I can populate the drop down list of titles and the selected value in the ItemDataBound event but then the SelectedValue property of the of the cboTitles dropdown list is not passed to the ContactTitleID field because this control is not bound to this field.

I think this problem is avoided in standard grids because they have different templates for inserts and updates.

Many thanks
Jhess
Top achievements
Rank 1
 answered on 25 Jan 2012
1 answer
107 views
Hello Telerik team,
 We have discovered an issue with the RadEditor in a RadMultiPage or a RadSplitter (RadControls For Asp.NET Ajax, version 2011.3.1305.40) . In our scenario, we are attaching a click event handler to the editor as soon as it loads. The click handler fires correctly when the editor is not nested within a splitter or a multipage. We require to have the editor within a RadPageView in a RadSplitter, so please advise us on how to fix this issue.
Below there is some test code we have used:
<telerik:RadCodeBlock ID="rcb" runat="server">
       <script type="text/javascript">
           //TEST SCENARIO1 - editor in RadMultiPage
           function EditorOnClientLoad(editor, args) {
               editor.attachEventHandler("onclick", function (e) {
                   alert('Editor clicked!');
               });
           }
            //TEST SCENARIO2 - editor in RadSplitter
           function Editor1OnClientLoad(editor, args) {
               editor.attachEventHandler("onclick", function (e) {
                   alert('Editor1 clicked!');
               });
           }
       </script>
   </telerik:RadCodeBlock>
 
 <%--TEST SCENARIO1--%>
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Office2007" MultiPageID="RadMultiPage1"
       SelectedIndex="0">
       <Tabs>
           <telerik:RadTab runat="server" Text="Description" Value="Description" PageViewID="RadPageView1">
           </telerik:RadTab>
           <telerik:RadTab runat="server" Text="Content" Value="Content" PageViewID="RadPageView2">
           </telerik:RadTab>
       </Tabs>
   </telerik:RadTabStrip>
   <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" Height="430px">
       <telerik:RadPageView ID="RadPageView1" runat="server">
           <div id="div1" runat="server" >
               <div id="div2" runat="server" >
                   ....
               </div>
           </div>
       </telerik:RadPageView>
       <telerik:RadPageView ID="RadPageView2" runat="server">
           <table cellpadding="0" cellspacing="5">
               <tr>
                   <td align="right" valign="middle">
                       Message
                   </td>
                   <td valign="middle">
                       <telerik:RadEditor ID="editorMessage" runat="server" Skin="Office2007" EnableResize="false"
                           OnClientLoad="EditorOnClientLoad">
                       </telerik:RadEditor>
                   </td>
               </tr>
           </table>
       </telerik:RadPageView>
   </telerik:RadMultiPage>
 
   <%--TEST SCENARIO 2--%>
   <telerik:RadSplitter ID="rs1" runat="server" Width="800px">
       <telerik:RadPane ID="rp1" runat="server">
           <telerik:RadEditor ID="RadEditor1" runat="server" Skin="Office2007" EnableResize="false"
               OnClientLoad="Editor1OnClientLoad">
           </telerik:RadEditor>
       </telerik:RadPane>
   </telerik:RadSplitter>

None of the above test scenarios fire the click handler of the RadEditor. Moreover, in the RadMultiPage scenario, Google Chrome shows an error when clicking the second tab:
  1. Uncaught TypeError: Cannot read property 'tagName' of null
    1. Telerik.Web.UI.Editor.Selection.getParentElementTelerik.Web.UI.WebResource.axd:11064
    2. a.RadEditor.getSelectedElementTelerik.Web.UI.WebResource.axd:11542
    3. a.RadEditor.getToolValueTelerik.Web.UI.WebResource.axd:11574
    4. Telerik.Web.UI.Editor.DefaultToolAdapter.setToolStateTelerik.Web.UI.WebResource.axd:8420
    5. Telerik.Web.UI.Editor.DefaultToolAdapter._onEditorSelectionChangeTelerik.Web.UI.WebResource.axd:8571
    6. Telerik.Web.UI.RadWebControl.raiseEventTelerik.Web.UI.WebResource.axd:779
    7. a.RadEditor.onParentNodeChangedTelerik.Web.UI.WebResource.axd:11530
    8. window.$telerik.window.TelerikCommonScripts.Telerik.Web.CommonScripts.repaintChildrenTelerik.Web.UI.WebResource.axd:96
    9. Telerik.Web.UI.RadPageView.showTelerik.Web.UI.WebResource.axd:3884
    10. Telerik.Web.UI.RadMultiPage._selectPageViewByIndexTelerik.Web.UI.WebResource.axd:3945
    11. Telerik.Web.UI.RadPageView._selectTelerik.Web.UI.WebResource.axd:3874
    12. Telerik.Web.UI.RadTab._selectPageViewTelerik.Web.UI.WebResource.axd:3040
    13. Telerik.Web.UI.RadTab.selectTelerik.Web.UI.WebResource.axd:3144
    14. Telerik.Web.UI.RadTab.clickTelerik.Web.UI.WebResource.axd:3092
    15. Telerik.Web.UI.RadTabStrip._clickTelerik.Web.UI.WebResource.axd:3556
    16. Telerik.Web.UI.EventMap._onDomEventTelerik.Web.UI.WebResource.axd:2489
    17. g

As a note, we have just upgraded our RadControls from version 2011.2.915  (the click handler of the editor worked fine with this version) to the latest version.
Please provide us with a solution to this problem.
Thank you.
Rumen
Telerik team
 answered on 25 Jan 2012
10 answers
484 views
Hello,

It would be nice to be able to display an empty text in a RadTextBox in password mode.

In the sample below, I setup a RadTextBox in Password mode (line 4) with an empty message (line 5).
<telerik:RadTextBox  
    ID="rtbPassword" 
    runat="server" 
    TextMode="Password" 
    EmptyMessage="Please enter your password" 
    Width="200px" 
    /> 
Unfortunately, when the text box is displayed I cannot read the empty message since it is written as a password => I just get a series of black dots.

Does anybody has an idea to fix this?

BR, Laurent
Edward
Top achievements
Rank 1
 answered on 25 Jan 2012
1 answer
81 views
Hi,
I have a RadUpload in a RadGrid.
I lose the  RadUpload value  when the postback  is generated by RadComboBox in RadGrid.
How can don't lose the RadUpload value?

Thanks.


Shinu
Top achievements
Rank 2
 answered on 25 Jan 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?