Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
316 views

I've to populate the RadDatePicker from database. From database, i am accessing the data value as string. I am having problem to set that value to RadDatePicker.

Form sample ::

<table>
    <tr>
        <td>Date of Birth : </td>
        <td>
            <telerik:RadDatePicker ID="dtp_DOB" runat="server"></telerik:RadDatePicker>
        </td>
    </tr>      
</table>

in code behing page ::

DataTable dt = GetPersonalDetails(p_id);
 
if (dt != null && dt.Rows.Count > 0)
{
    DataRow dr = dt.Rows[0];       
    string DOB_ = dr["DateOfBirth"].ToString();
    dtp_DOB.SelectedDate = ????
}

How to show the date retrieved from database to RadDatePicker? Please help.

Maria Ilieva
Telerik team
 answered on 30 Jun 2015
2 answers
61 views

Hi,

In RadEditor  Add to dictionary not showing up for few words in firefox and chrome. We are using word leachate in our application.  

Even in the demo page not recognized that. Please let me know how to fix that.

 

Please find the attached screenshot for the reported issue.

Ianko
Telerik team
 answered on 30 Jun 2015
2 answers
42 views

We have an issue using Chrome where the rotator show empty image on showNext with left navigation, right works fine but when clicking left again two times the empty/white space appears and it wont restart from index 0 when navigating left. please see site below,

http://www.mrplant.se/

<div style="position:relative;">
<div ID="rotatorRight" style="display:none;" onclick="navigate('Right'); return false;"></div>
<div ID="rotatorLeft" style="display:none;" onclick="navigate('Left'); return false;"></div>
<div class="rotatorContainer">
    <telerik:RadRotator ID="RadRotator1" runat="server" PauseOnMouseOver="false" OnClientItemShowing="slideShowHandler" OnClientLoad="rotatorLoad" SlideShowAnimation-Type="CrossFade" SlideShowAnimation-Duration="8000" FrameDuration="4000" ScrollDuration="1200" ScrollDirection="Left" RotatorType="AutomaticAdvance" Visible="false">
        <ItemTemplate>
            <asp:Image ID="Image1" runat="server" ImageUrl='<%# Container.DataItem %>' AlternateText=""/>
        </ItemTemplate>
    </telerik:RadRotator>
</div>
</div>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
    function rotatorLoad(sender, eventArgs)
    {
        var count = sender.get_items().length;
        var rotatorRight = document.getElementById('rotatorRight');
        var rotatorLeft = document.getElementById('rotatorLeft');
 
        if (count < 2 || count == null || count == 'undefined') {
            rotatorRight.style.display = 'none';
            rotatorLeft.style.display = 'none';
        }
        else if (count > 0)
        {
            rotatorRight.style.display = 'block';
            rotatorLeft.style.display = 'block';
        }
    }
 
    function navigate(navigation)
    {
        var rotator = $find("<%=RadRotator1.ClientID %>");
 
        switch (navigation)
        {
            case "Right":
                rotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Right);
                break;
            case "Left":
                rotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Left);
                break;
        }
    }
 
    function slideShowHandler(sender, args)
    {
        var count = sender.get_items().length;
        var currentIndex = args.get_item().get_index() + 1;
        var rotatorRight = document.getElementById('rotatorRight');
        var rotatorLeft = document.getElementById('rotatorLeft');
 
        if (!sender.isScrollingForward())
        {
            if (currentIndex == 1)
            {
                rotatorRight.style.visibility = 'none';
            }
            else
            {
                rotatorRight.style.visibility = 'visible';
            }
        }
 
        if (count == 1) {
            rotatorLeft.style.visibility = 'none';
            rotatorRight.style.visibility = 'none';
        }
 
        if (currentIndex == count)
        {
            rotatorLeft.style.visibility = 'none';
        }
        else
        {
            rotatorLeft.style.visibility = 'visible';
        }
 
    }
</script>
</telerik:RadCodeBlock>
 

 

public partial class ucImageRotator : System.Web.UI.UserControl
{
    private string path;
 
    public string Path
    {
        get { return path; }
        set { path = value; }
    }
 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (path != "")
        {
            string virtualPath = "~/images/rotators/" + path;
            RadRotator1.DataSource = GetFilesInFolder(virtualPath);
            RadRotator1.DataBind();
        }
    }
 
    protected List<string> GetFilesInFolder(string path)
    {
        string physicalPathToFolder = Server.MapPath(path);
        List<string> virtualPathsCollection = new List<string>();
 
        if (Directory.Exists(physicalPathToFolder))
        {
            string[] physicalPathsCollection = System.IO.Directory.GetFiles(physicalPathToFolder);
             
            foreach (String file in physicalPathsCollection)
            {
                string virtualPath = VirtualPathUtility.AppendTrailingSlash(path) + System.IO.Path.GetFileName(file);
                if (System.IO.Path.GetExtension(file) == ".png")
                {
                    System.Drawing.Image objImage = System.Drawing.Image.FromFile(file);
                    int width = objImage.Width;
                    int height = objImage.Height;
                    RadRotator1.Height = height;
                    RadRotator1.Width = width;
                    virtualPathsCollection.Add(virtualPath);
                }
            }
            if (virtualPathsCollection.Count > 0)
            {
                this.Visible = true;
                RadRotator1.Visible = true;
            }
            else
            {
                this.Visible = false;
                RadRotator1.Visible = false;
            }
        }
        return virtualPathsCollection;
    }
}

 

 

 

Christian
Top achievements
Rank 1
 answered on 30 Jun 2015
1 answer
154 views

The onclick to the code behind event handler only fires if autopostback='true' is set for the tilelist apparently, but this disables the navigateurl's on the other tiles, how do I use both in the same tilelist, I tried AutoPostBack="true" on the tile with the onclick but no joy.

<telerik:RadTileList ID="RadTileList1" runat="server" TileRows="1" Width="1000px" ScrollingMode="None" >
<Groups>
<telerik:TileGroup>
<telerik:RadImageAndTextTile runat="server" ImageHeight="100px" ImageWidth="100px" NavigateUrl="student-Program-progress.aspx" Target="_self" Text="Gradebook">
</telerik:RadImageAndTextTile>
<telerik:RadImageAndTextTile runat="server" ImageHeight="100px" ImageWidth="100px" NavigateUrl="/Help/MyPage.htm" Target="_blank" Text="Help" BackColor="#f8b617">
</telerik:RadImageAndTextTile>
<telerik:RadImageAndTextTile ID="TextTileProfile" Name="TextTileProfile" runat="server" ImageHeight="100px" ImageWidth="100px" NavigateUrl="/MyPage-UserInfo.aspx" Target="_blank" Text="Profile" BackColor="#f37928">
</telerik:RadImageAndTextTile>
<telerik:RadImageAndTextTile ID="tileLogout" runat="server" ImageHeight="100px" ImageWidth="100px" OnClick="btnLogout_Click" Text="Logout" BackColor="#03953f" AutoPostBack="true">
</telerik:RadImageAndTextTile>
</telerik:TileGroup>
</Groups>
</telerik:RadTileList>

Marin Bratanov
Telerik team
 answered on 30 Jun 2015
0 answers
83 views

how can i use Telerik controls to send list of files (some of them are PDF and some PNG and JPG) to printer?

it's a web form. i have the files name, printer name (not the default printer) and need to do it silently without opening dialogs.

the main issue is the PDF files without adobe reader installed.

 thanks

Lina
Top achievements
Rank 1
 asked on 30 Jun 2015
4 answers
77 views

Hi,

We recently added row group functionality to our grids and we and our users are very happy with it.

In the grids in our applications grouping on some types of column is not allowed. It is not visible for the user by the hover style of the grouping panel grouping on the dragged column is not allowed until the column is dropped and the postback to the web-server is happened.

 In my case columns are resizable and reorderable also.

 It should be nice to disallow these column from been dropped and by adding style to the mouse cursor and/or the drop indicator of the grouppanel when GridTemplateColumn.Groupable=false.

Erik
Top achievements
Rank 1
 answered on 30 Jun 2015
2 answers
217 views
The current version of RadMediaPlayer depends on YouTube API 2.0, however YouTube deprecated the YouTube API v2.0 – Playlists which caused the RadMediaPlayer’s YouTube Playlist functionality stop working and the page to return 410 response. More information you can find here:
https://developers.google.com/youtube/2.0/developers_guide_protocol_playlists

For the official Q2 2015 release we will migrate the media player to the latest 3.0 version of the YouTube API:
https://developers.google.com/youtube/v3/getting-started

Eyup
Telerik team
 answered on 30 Jun 2015
4 answers
82 views

Hi,

We recently added row group functionality to our grids and we and our users are very happy with this.

Only thing that bothers us is the drop functionality on the grouppanel. We have multiple issues/wishes to make the drop functionality of the grouppanel much more intuitive. Especially when the RadGrid is already grouped on multiple columns.

1) Possiblity to drag the next column to group on the position/order where you want the grouping of the grid to come up with. E.g. drag the next column between the first and the second grouping column. 
2) Related to this case, the drop marker indicated the new column to group will be added in front, but the column is added to the end of the grouped columns.

3) The marker to indicate where the user will drop an existing grouping column is shown at the begin and the end of the group column connector between groups:

3. a)  Except in front of the first group column. Can the same behaviour be added to the end of the last grouped column?
3. b)  The drop indicator on the group column connector should not be shown at the side of the connector where the dragged column is at to inform the user nothing will happen/change when you drop it here.
3. c)  Because the connector is very small it is not clear to new users where the column is dropped when it is dropped on the connector.

All of these cases can be reproduced on the RadGrid Grouping demo on your site:
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/grouping/grouping/defaultcs.aspx

Please let me know about possible solution to these items...

Erik
Top achievements
Rank 1
 answered on 30 Jun 2015
1 answer
47 views
Is it possible to use different repetable background images for each bar in a bar chart to visual represent different bars (data)? I have in some instances 5-8 different bars (data) that needs to be displayed and I can't rely on just color. I have to use bar charts.
Danail Vasilev
Telerik team
 answered on 30 Jun 2015
1 answer
92 views

Is it possible to make AsyncUpload add the necessary properties to <input file>-tag, ref: http://www.w3schools.com/tags/att_input_accept.asp

, so that this will be the rendered html: <input type="file" tabindex="0" class="ruFileInput" name="radasyncUpload_1file0" id="radasyncUpload_1file0" size="23" accept="image/*"> 

When uploading from a smartphone it would be better to go directly to the Gallery.

Hristo Valyavicharski
Telerik team
 answered on 30 Jun 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?