Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
97 views
Here is my scenerio. I have a 2 column combobox. Column 1 holds an ID number, column 2 holds a name. The combobox text/value properties are set to the ID number so the ID number will display in the combobox. We have a client that wants the ID number to display but would like to search by the name in column 2. I know how to do the items requested event using the combobox text (e.text) as the search value. How do you use data from the 2nd column as the search criteria and have the combobox auto fill as a user starts typing a name. Is this even possible?
dhuss
Top achievements
Rank 1
 answered on 03 Apr 2014
7 answers
645 views

Hi All,

I have a custom web part which includes RAD Chart control.
This web part is used in WSS 3.0.

I want to save current chart to image file (png or so).

Basically I want see this as a button in the chart webpart that sends on the click a image of the current chart to client side.

Please suggest a solution.

Thanking you in anticipation.

Regards,
LJ
Marin Bratanov
Telerik team
 answered on 03 Apr 2014
1 answer
140 views
I have a problem -- and a bone to pick.

First of all, I don't recall reading about a change to the Indent/Outdent behaviour in any of the release notes over the last few years. I have 10's of customers who have edited 10's of thousands of pages of content that all relay on the blockquote method of indentation. Now the editor doesn't support it. This is frustrating to no end.

Secondly, your current method is flawed. If I indent and then create a new paragraph, the next paragraph caries on the same indent level. This is great for persisting classes and other formatting options, but unexpected for an indentation.

The example code provided here (http://www.telerik.com/forums/blockquote-for-indent-setting) does not stand up to testing either. If the blockquotes are in a div or table cell, then the HTML gets jammed; not to mention that the example code adds the style AND the blockquote element.

It would have been awesome if you had given us an option (e.g. the newline settings).
Ianko
Telerik team
 answered on 03 Apr 2014
1 answer
469 views
Hello,


I'm trying to add to radcomobobox icons but its not working

​<telerik:RadComboBox ID="rcbJobType" runat="server" EmptyMessage="Select Job Type" Width="248px">
<Items>
<telerik:RadComboBoxItem Text="Select Job Type" Value="Select Job Type" />
<telerik:RadComboBoxItem Text="Long Term" Value="Long Term" />
<telerik:RadComboBoxItem Text="Short Term" Value="Short Term" />
<telerik:RadComboBoxItem Text="Last Minute" Value="Last Minute" />
</Items>
</telerik:RadComboBox>


occurs on pageload
Protected Sub IconAttached()
Dim imgDir As New DirectoryInfo(Server.MapPath(Globals.gRootRelativeSecureURL("/Images/Layout/offDuty.png")))
For Each file As FileInfo In imgDir.GetFiles("*.png")
Dim item As New RadComboBoxItem(file.Name.Replace(".png", ""))
item.ImageUrl = "Img/" + file.Name
rcbEditJobType.Items.Add(item)

Next

****************using class for SecureURL for getting the image
               = "<img src='" + Globals.gRootRelativeSecureURL("/Images/Layout/offDuty.png") + "' border=""0"" align=""absmiddle"">"
End Sub
Nencho
Telerik team
 answered on 03 Apr 2014
3 answers
94 views
Can the upload warnings be configured to display as a radwindow?   

The FileExplorer has a windowmanager, why shouldn't any warnings be displayed as javascript alerts.  (ie: File Exists, File Size/Extension)

Peter
Vessy
Telerik team
 answered on 03 Apr 2014
3 answers
152 views
I would like to restrict the number of a files that can be uploaded at a time to 5.

I reviewed this posting and applied this code:
http://www.telerik.com/forums/limit-number-of-files-to-be-uploaded

rfeExplorer.Upload.MaxFileInputsCount = 5

But the upload modal allows an unlimited number of files to be selected.

Peter
Vessy
Telerik team
 answered on 03 Apr 2014
1 answer
93 views
Currently we would like to use the RadTileList in a Master/Detail situation. This means that dependent upon the selected tile in the master-tilelist, the detail-tilelist is rendered.

This application scenario works rather well, but fails in the following situation:
1. Open page
-- Ensure nothing is selected and only master items are visible.

2. Click/select a master item, e..g A
-- Ensure that after postback "A" is selected and no detail item is selected.

3. Click/select a detail item, e.g. 2
-- Ensure that after postback "2" is selected

4. Click/select another master item, e.g. B
-- Ensure that after postback "B" is selected and no detail item is selected.

5. Click/select a detail item, e.g. "4"
-- Ensure that after postback "4" is selected <-- BUG, event of TileClick/Selectionchange is not firing and thus is the selection not persisted.

To reproduce this, I've created a new Telerik Web Application (which I cannot currently attach?).

This new web application contains the following implementation of Default.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div>
        <telerik:RadTileList runat="server" ID="tlMaster" AutoPostBack="true" DataSourceID="ldsMaster" SelectionMode="Single" OnTileClick="tlMaster_TileClick" OnSelectionChanged="tlMaster_SelectionChanged">
            <DataBindings>
                <CommonTileBinding TileType="RadContentTemplateTile" Shape="Square" DataNameField="Name" />
                <ContentTemplateTileBinding>
                    <ContentTemplate>
                        <%#DataBinder.Eval(Container.DataItem, "Description")%>
                    </ContentTemplate>
                </ContentTemplateTileBinding>
            </DataBindings>
        </telerik:RadTileList>
        <asp:LinqDataSource runat="server" ID="ldsMaster" OnSelecting="ldsMaster_Selecting"></asp:LinqDataSource>
    </div>
    <div>
        <telerik:RadTileList runat="server" ID="tlDetail" AutoPostBack="true" DataSourceID="ldsDetail" SelectionMode="Single" OnTileClick="tlDetail_TileClick">
            <DataBindings>
                <CommonTileBinding TileType="RadContentTemplateTile" Shape="Square" DataNameField="Name" />
                <ContentTemplateTileBinding>
                    <ContentTemplate>
                        <%#DataBinder.Eval(Container.DataItem, "Description")%>
                    </ContentTemplate>
                </ContentTemplateTileBinding>
            </DataBindings>
        </telerik:RadTileList>
        <asp:LinqDataSource runat="server" ID="ldsDetail" OnSelecting="ldsDetail_Selecting"></asp:LinqDataSource>
    </div>
    </form>
</body>
</html>

And the following implementation of Default.aspx.cs:
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
using System.Collections.Generic;
using System.Linq;
 
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        /* Test case to reproduce issue:
         * 1. Open default.aspx
         * 2. Click/select a master item, e.g. "A"
         * 3. Click/select a detail item, e.g. "2"
         * 4. Click/select another master item, e.g. "B"
         * -- Currently no detail item is selected. That's good.
         * 5. Click/select a detail item, e.g. "4"
         * BUG: Click/Select event is not fired and thus is the selection not persisted.
         */
 
        if (!Page.IsPostBack)
        {
            this.tlMaster.DataBind();
        }
    }
 
    protected void tlMaster_TileClick(object sender, TileListEventArgs e)
    {
        foreach (var tile in this.tlMaster.GetSelectedTiles())
        {
            tile.Selected = false;
        }
 
        e.Tile.Selected = true;
        this.tlDetail.DataBind();
    }
 
    protected void tlMaster_SelectionChanged(object sender, TileListDataEventArgs e)
    {
        this.tlDetail.DataBind();
    }
 
    protected void ldsMaster_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        e.Result = new List<MasterData>
        {
            new MasterData("A", "A"),
            new MasterData("B", "B"),
            new MasterData("C", "C")
        };
    }
 
    protected void tlDetail_TileClick(object sender, TileListEventArgs e)
    {
        foreach (var tile in this.tlDetail.GetSelectedTiles())
        {
            tile.Selected = false;
        }
 
        e.Tile.Selected = true;
    }
 
    protected void ldsDetail_Selecting(object sender, LinqDataSourceSelectEventArgs e)
    {
        var selectedTiles = this.tlMaster.GetSelectedTiles();
        if (selectedTiles.Any())
        {
            var data = new List<DetailData>
            {
                new DetailData("A", "1", "1"),
                new DetailData("A", "2", "2"),
                new DetailData("A", "3", "3"),
                new DetailData("A", "4", "4"),
                new DetailData("A", "5", "5"),
                new DetailData("B", "1", "1"),
                new DetailData("B", "2", "2"),
                new DetailData("B", "3", "3"),
                new DetailData("B", "4", "4"),
                new DetailData("B", "5", "5"),
                new DetailData("C", "1", "1"),
                new DetailData("C", "2", "2"),
                new DetailData("C", "3", "3"),
                new DetailData("C", "4", "4"),
                new DetailData("C", "5", "5")
            };
 
            var selectedTile = selectedTiles.Single();
 
            e.Result = data
                .Where(dd => dd.Master == selectedTile.Name);
        }
        else
        {
            e.Result = Enumerable.Empty<DetailData>();
        }
    }
 
    private class MasterData
    {
        public string Name { get; private set; }
        public string Description { get; private set; }
 
        private MasterData() { }
        public MasterData(string name, string description)
        {
            this.Name = name;
            this.Description = description;
        }
    }
 
    private class DetailData
    {
        public string Master { get; private set; }
        public string Name { get; private set; }
        public string Description { get; private set; }
 
        private DetailData() { }
        public DetailData(string masterName, string name, string description)
        {
            this.Master = masterName;
            this.Name = name;
            this.Description = description;
        }
    }
}

I hope you are able to identify why the event is not triggered. One thing that I already noted is that the control id differs before and after the postback (view attached files ctrl_id_before_postback and ctrl_id_after_postback): This might have to do something with the issue.

Stanimir
Telerik team
 answered on 03 Apr 2014
3 answers
140 views
Hi,

I have a RadGrid with two bound columns and a RadComboBox in EditItemTemplate of the Template Column.The Grid is in batch edit mode. When i press Add New Record and select an item in RadComboBox , the bound column(textboxes) should get populated with the selected value in RadComboBox.

Thanks.
Kostadin
Telerik team
 answered on 03 Apr 2014
1 answer
91 views
Hi,

I'm trying to implement grid filtering where my Data Sources is webapi.

I tried to follow the following: Take a Walk on the Client Side with WebAPI and WebForms – Part 2

The grid is working fine but I'm I having an issue when I'm trying to implement filtering, there is no GetNextPage() in the request in my ApiController

My project is an ASP.NET web forms project, .net 4.5

Here is my ApiController code:

[HttpGet]
public PageResult<SecuHostUser> Load_Users(ODataQueryOptions<SecuHostUser> options)
{
     
    var context = new ApplicationDbContext();
    var users= context.Users.AsQueryable();
    var results = options.ApplyTo(users);
    return new PageResult<SecuHostUser>(results as IEnumerable<SecuHostUser>, Request.GetNextPageLink(), users.ToList().Count);
 
 
}


Vasil
Telerik team
 answered on 03 Apr 2014
4 answers
203 views
Hi,

I was trying to use the client side script for image gallery set to work as light, I have couple of queries.

1. I have added a client script for OnImageLoaded, the script is not getting executed when the light box load the image on user click on the thumbnail. 

<telerik:RadImageGallery ID="RadImageGallery1" runat="server" AllowPaging="true"
DisplayAreaMode="LightBox" ImagesFolderPath="~\Images"
Skin="Glow" >
<ClientSettings>
<ClientEvents
OnImageLoaded="imageLoaded"  />
</ClientSettings>
</telerik:RadImageGallery>

function imageLoaded(sender, args) {
alert("ImageLoaded");
// var imageItem = args.get_item(); }

2. Can we add controls to the light box inside the image gallery similar to the AsyncUpload and get the value in the back end using GetFieldValue.

Thank you.

Regards,
Majid
Radoslav
Telerik team
 answered on 03 Apr 2014
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?