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

When I type a long paragraph until the vertical scroll bar appears and then press enter key the scroll bar jumps up and I need to scroll it down to continue typing. It happens when the NewLineMode is set "P". It works fine NewLineMode is set to "Br".

Ianko
Telerik team
 answered on 04 Jan 2017
2 answers
637 views
I know you can hide columns client-side using masterTableView.hideColumn(columnIndex). However, this leads to very difficult to maintain code since column ordinals can change frequently. Is there a way to find a column by UniqueName or DataField client side and then call .hide() or show() functions, or set_visible() , or something to that effect?
Albert Shenker
Top achievements
Rank 1
Veteran
Iron
 answered on 03 Jan 2017
2 answers
134 views

I have the following Combobox setup on my page:

<telerik:RadComboBox ID="cbxDup" runat="server" Width="350px" DropDownWidth="375px" Height="340px"
    Skin="Default" HighlightTemplatedItems="True" MarkFirstMatch="true"
    AutoPostBack="True" EnableLoadOnDemand="True" EnableVirtualScrolling="True">
    <HeaderTemplate>
        <h2>Codes</h2>
    </HeaderTemplate>
    <ClientItemTemplate>
        <ul class="Main">
            <li><span> #= Text # </span></li>
            <span> #= Attributes.Description # </span>
        </ul>
    </ClientItemTemplate>
    <WebServiceSettings Method="LoadComboBox" Path="SysProf-Add.aspx" />
</telerik:RadComboBox>

 

With the following server code:

<WebMethod()>
Public Shared Function LoadComboBox(ByVal context As RadComboBoxContext) As RadComboBoxData
    Dim data As DataTable = Nothing
    Dim comboData As New RadComboBoxData()
 
    Try
        data = GetData()
 
        Dim itemOffset As Integer = context.NumberOfItems
        Dim endOffset As Integer = Math.Min(itemOffset + 100, data.Rows.Count)
        comboData.EndOfItems = endOffset = data.Rows.Count
 
        Dim result As New List(Of RadComboBoxItemData)(endOffset - itemOffset)
 
        For Each dr As DataRow In data.Rows
            Dim itemData As New RadComboBoxItemData()
            itemData.Value = dr.Item(0)
            itemData.Text = dr.Item(1)
            itemData.Attributes.Add("Description", dr.Item(2))
            result.Add(itemData)
        Next
 
        comboData.Message = GetStatusMessage(endOffset, data.Rows.Count)
 
        comboData.Items = result.ToArray()
 
        Return comboData
    Catch ex As Exception
        Return Nothing
    End Try
End Function

 

What I would like to do is access the Description attribute in the cbxDup.SelectedIndexChanged event?  

 

Thanks in advance

Steve

SSirica
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 03 Jan 2017
1 answer
677 views

Hi everybody, I hope someone of you can give a hand. I will post some sample code however they are pretty much what I am trying to do.

I have a button which executes both client side (OnClientClicking) and server side (OnClick) events. The point is that from the client side I execute a PageMethod in order to get the result of a calculation. Up to this point everything is OK but here comes the tricky part.

I need to check for the result in order to determine if it is greater than some value. If this condition is true then I ask the user to confirm if he wishes to continue, so if the user says YES then the code continues executing OnClick event but if user says NO then OnClick must not be executed.

I have tried passing teleriks args as a parameter but it is not working (OnSuccess function receives it as null). I do this in order to call args.set_cancel() method.

Here is the code at client side

01.function btnCallback_Clicking(sender,args)
02.{
03.    var num = parseInt( prompt("Enter an integer number", "1") );
04.
05.    PageMethods.multiply(num, function (response, args){ TheSuccess(response, args); });
06.}
07.
08.function TheSuccess(response, args)
09.{
10.    //alert(' TheSuccess: \nResult obtained was: ' + response);
11.    if (response > 70) {
12.        var cancel = !confirm("Result obtained was greater than 70 ¿Continue?");
13.        args.set_cancel(cancel);
14.    }
15.}

 

Here is the code at server side

01.[System.Web.Services.WebMethod]
02.public static int multiply(int num)
03.{
04.   int res = num * num;
05.   return res;
06.}
07. 
08.protected void btnCallback_Click(object sender, EventArgs e)
09.{
10.   string extra = "User agreed to do this";
11.   btnCallback.Text = extra;
12.}

 

Any ideas about how to achieve this.

Thanks in advance.

 

Niko
Telerik team
 answered on 03 Jan 2017
1 answer
197 views

Hi, I have implemented a custom FileBrowserContentProvider for Azure and customized the file bowser by following the steps on the “Editor - Customize Built-in Dialogs” article (http://demos.telerik.com/aspnet-ajax/editor/examples/externaldialogspath/defaultcs.aspx).

Everything is working well but the image editor is not rendered properly (check the attached files).

<telerik:RadEditor
    ID="RadEditor1"
    RenderMode="Classic"
    LocalizationPath="~/App_GlobalResources/Controls_Editor"
    ContentFilters="MakeUrlsAbsolute"
    DocumentManager-MaxUploadFileSize="11000000"
    OnFileUpload="RadEditor1_FileUpload"
    OnFileDelete="RadEditor1_FileDelete"
    ExternalDialogsPath="~/Controls/TelerikEditorDialogs/"
    runat="server">
    <Tools>
        <telerik:EditorToolGroup Tag="FileManagers">
            <telerik:EditorTool Name="ImageManager"></telerik:EditorTool>
            <telerik:EditorTool Name="DocumentManager"></telerik:EditorTool>
            <telerik:EditorTool Name="TemplateManager"></telerik:EditorTool>
        </telerik:EditorToolGroup>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="Bold"></telerik:EditorTool>
            <telerik:EditorTool Name="Italic"></telerik:EditorTool>
            <telerik:EditorTool Name="Underline"></telerik:EditorTool>
            <telerik:EditorSeparator></telerik:EditorSeparator>
            <telerik:EditorTool Name="ForeColor"></telerik:EditorTool>
            <telerik:EditorTool Name="BackColor"></telerik:EditorTool>
            <telerik:EditorSeparator></telerik:EditorSeparator>
            <telerik:EditorTool Name="FontName"></telerik:EditorTool>
            <telerik:EditorTool Name="RealFontSize"></telerik:EditorTool>
        </telerik:EditorToolGroup>
    </Tools>
</telerik:RadEditor>

Bozhidar
Telerik team
 answered on 03 Jan 2017
3 answers
53 views

Hi,

When i try to resize the columns using resize to fit option for more than 30 columns ,UI get freezes for few seconds.Please let me know if any body has any solution on this.

Vasil
Telerik team
 answered on 02 Jan 2017
21 answers
745 views
hello,
I just recently upgraded Rad Controls for ASP.NET AJAX from the Jan 14, 2010 (2009.3.1314) version to the Apr 15, 2010 (2010.1.415) version.  I am using a RadListBox that I was adding items to wrapped in a <span> tag for formatting purposes.  After the upgrade the span is rendered as text.  I looked briefly through the version history and didn't see anything mentioning this change specifically.  Is there something I can do in the latest version to pull this off?

Here's the listbox definition:
<telerik:RadListBox runat="server" ID="rlbOrderList" Width="495px" Height="320px" 
                                                AllowDelete="False" AllowReorder="False" Skin="Default" CssClass="cert" AutoPostBack="True" 
                                                OnSelectedIndexChanged="rlbOrderList_SelectedIndexChanged">  
                                            </telerik:RadListBox> 

Here is what I am adding to it:
foreach (eSolutions.HomeHealth.Core.ReadOnly.Order ord in ol)  
            {  
                rlbOrderList.Items.Add(new RadListBoxItem("<span class='" + ord.OrdersDisciplineCode + "'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><b>" + ord.OrdersDisciplineCode + ":</b>&nbsp;" + ord.OrderDescription.Trim(), rd.OrderID));  
 
            } 


I've attached screenshots of before and after the upgrade.

Thanks in advance for your response,
Bryan Smouse
Plamen
Telerik team
 answered on 02 Jan 2017
9 answers
498 views
Hi -

I have a RadListView bound to a datasource.  How can I have the first item automatically selected on page load?

Rod

hart
Top achievements
Rank 1
Veteran
 answered on 31 Dec 2016
18 answers
754 views
Hi everyone,

I'm trying to create a grid with filterchecklist .... I tried to enable the "FilterCheckListEnableLoadOnDemand" property for GridBoundColumn so i can use "OnFilterCheckListItemsRequested" event handler to load the items of the checklist.
However, "FilterCheckListEnableLoadOnDemand" is not supported by the trial version of telerik.web.ui that I downloaded from your site, so I can not use this property until i purchase the latest version of the library or is there some other reason why it does not work?

Thanks in advance.
Vasssek
Top achievements
Rank 1
 answered on 31 Dec 2016
18 answers
368 views

I'm trying to load treelist, everything works well but i always see "No Records To Display".

Here is the control:

<telerik:RadTreeList ID="trlProductGroups" runat="server" AllowPaging="true" PageSize="5"
       
DataKeyNames="ID" ParentDataKeyNames="PARENT_ID" AutoGenerateColumns="false"
       
OnInsertCommand="trlProductGroups_InsertCommand" OnNeedDataSource="trlProductGroups_NeedDataSource"
       
OnUpdateCommand="trlProductGroups_UpdateCommand" OnDeleteCommand="trlProductGroups_DeleteCommand">
       
<Columns>
           
<telerik:TreeListEditCommandColumn UniqueName="InsertCommandColumn" ButtonType="ImageButton"
               
HeaderStyle-Width="60px" ItemStyle-HorizontalAlign="Center" />
           
<telerik:TreeListEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton">
               
<ItemStyle CssClass="MyImageButton" />
           
</telerik:TreeListEditCommandColumn>
           
<telerik:TreeListButtonColumn UniqueName="DeleteCommandColumn" Text="Delete" CommandName="Delete"
               
ButtonType="ImageButton" />
           
<telerik:TreeListBoundColumn DataField="ID" UniqueName="ID" HeaderText="Grup ID"
               
ReadOnly="true" />
           
<%-- <telerik:TreeListTemplateColumn DataField="GROUP_NAME" UniqueName="GROUP_NAME" HeaderText="Grup Adı">
               
<EditItemTemplate>
                   
<asp:TextBox ID="txtGroupName" runat="server"></asp:TextBox>
               
</EditItemTemplate>
            </
telerik:TreeListTemplateColumn>--%>
           
<telerik:TreeListBoundColumn DataField="GROUP_NAME" UniqueName="GROUP_NAME" HeaderText="Grup Adı" />
           
<telerik:TreeListBoundColumn DataField="PARENT_ID" UniqueName="PARENT_ID" HeaderText="Ana Grup ID"
               
ReadOnly="true" />
       
</Columns>
   
</telerik:RadTreeList>


And here is the NeedDataSource Code:

 protected void trlProductGroups_NeedDataSource(object sender, TreeListNeedDataSourceEventArgs e)
       
{

           
WebAppTest.Objects.ProductGroups pGroups = new WebAppTest.Objects.ProductGroups();
           
DataTable dt = pGroups.SelectData(null, string.Empty);
            trlProductGroups
.DataSource = dt;
       
}

I can see the data in DataTable, but treelist wont load data. Is there any mistake i make?

Thanks

Kendo UI user
Top achievements
Rank 1
 answered on 31 Dec 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?