Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
119 views
Hi Everyone,

I ran into a problem and was wondering if anyone have a solution.  I created a Radgrid, populate the grid with an EntityDataSource with Automatic CRUD. Everything works great expect I notice a huge paging issue.  If my PageSize="5" and I have 6 records which will give me two pages.  If I go to page 2 and delete the 6th row/item the RadGrid  show the grid as empty. It doesn't go to page 1 and display the remaining 5 rows. If I hit the refresh button on the grid, still not working.  I have to reload the page before it display the 5 record in the grid.  I try putting the grid in a RadAjaxPanel, still no luck.  If I used SqlDataSource, it work fine without any problems.  Is there something that I'm missing?

Anthony
Viktor Tachev
Telerik team
 answered on 17 Oct 2014
1 answer
250 views
Hi, 
I am using "UI for ASP.Net AJAX Q2 2014", Telerik.Web.UI.dll version is 2014.2.618.45, Visual studio 2013 and developing a website.
One of my requirement is to display pdf file with Agree/Do not Agree buttons. 
I am thinking to display pdf file contents in RadEditor ( editing disabled ).
I have pdf file stored into SQL Server database field and I am reading from database and converting to byte[].
Now I want to assign this byte[] to RadEditor so that it displays pdf text as it is with formatting. 
Can you tell me how should I assign byte[] to RadEditor to display that text? 

I will disable editing to it will just look like text, and will provide Agree/Do not agree button so I can capture button click and go accordingly. 
I will be putting this RadEditor in a webform, with above buttons, and will open up that form as Modal form using RadWindow, so user will need to click Agree to continue process. 

Thanks in advance, 


Marin Bratanov
Telerik team
 answered on 17 Oct 2014
2 answers
68 views
AutoCompleteBox loses its highlighting when the itemsource collection changes. To reproduce this issue type in the AutoCompleteBox and while it’s active and the popup is open, trigger a collection change event. The highlighting will automatically disappear, now if the collection changes again the highlighting reappears. This keeps toggling back and forth.

Attached is the screenshot.

Below are the code snippets.

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading;
using Telerik.Windows.Controls;
 
namespace HighlightMatchingItemsText
{
    public class Country
    {
        public string Name { get; set; }
        public string Capital { get; set; }
    }
 
    public class ViewModel : ViewModelBase
    {
        private ObservableCollection<Country> countries;
 
        public ViewModel()
        {
            this.Countries = new ObservableCollection<Country>()
            {
                new Country() { Name = "Australia", Capital = "Canberra" },
                new Country() { Name = "Bulgaria", Capital = "Sofia" },
                new Country() { Name = "Canada", Capital = "Ottawa" },
                new Country() { Name = "Denmark", Capital = "Copenhagen" },
                new Country() { Name = "France", Capital = "Paris" },
                new Country() { Name = "Germany", Capital = "Berlin" },
                new Country() { Name = "India", Capital = "New Delhi" },
                new Country() { Name = "Italy", Capital = "Rome" },
                new Country() { Name = "Norway", Capital = "Oslo" },
                new Country() { Name = "Russia", Capital = "Moscow" },
                new Country() { Name = "Spain", Capital = "Madrid" },
                new Country() { Name = "United Kingdom", Capital = "London" },
                new Country() { Name = "United States", Capital = "Washington, D.C." },
            };
 
            var o = System.Reactive.Linq.Observable.Start(() =>
            {
                //starts on a background thread.
                while (true)
                {
                    Thread.Sleep(6000);
                    this.Countries = new ObservableCollection<Country>()
                    {
                        new Country() { Name = "Australia", Capital = "Canberra" },
                        new Country() { Name = "Bulgaria", Capital = "Sofia" },
                        new Country() { Name = "Canada", Capital = "Ottawa" },
                        new Country() { Name = "Denmark", Capital = "Copenhagen" },
                    };
                    Console.WriteLine("Collection Changed");
                }
            });
 
        }
 
         public ObservableCollection<Country> Countries
        {
            get { return this.countries; }
            set
            {
                if (this.countries != value)
                {
                    this.countries = value;
                    this.OnPropertyChanged(() => this.Countries);
                }
            }
        }
    }
}

<UserControl x:Class="HighlightMatchingItemsText.Example"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:local="clr-namespace:HighlightMatchingItemsText"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300" Width="300">
    <UserControl.DataContext>
        <local:ViewModel />
    </UserControl.DataContext>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <TextBlock Text="Type A in the autocomplete box, Australia gets highlighted. Keep the drop down open and wait for 6 seconds, the collection changes and the highlighting dissappears.
                   Wait for another 6 seconds, the collection changes and the highlighting reappaers. This keeps toggling. "
                   TextWrapping="Wrap"
                   FontWeight="Bold"
                   Margin="20"/>
        <telerik:RadAutoCompleteBox x:Name="AutoComplete"
                                    Grid.Row="1"
                                    Margin="20"
                                    ItemsSource="{Binding Countries}"
                                    TextSearchPath="Name"
                                    TextSearchMode="Contains"
                                    AutoCompleteMode="Suggest"
                                    >
        </telerik:RadAutoCompleteBox>       
    </Grid>
</UserControl>


Vladi
Telerik team
 answered on 17 Oct 2014
1 answer
128 views
Hello,

I'm trying to get the value of a GridBoundColumn of a row after I've hit the "edit" button for that particular row.  The reason I want to do this is because I have several RadComboBoxes that need to have its values preselected after I get the datasource and the databind done for each combo box.  Is there a way to do this, or is there another event after the ItemCreate command where I can set the SelectValue of a RadComboBox?
Eyup
Telerik team
 answered on 17 Oct 2014
1 answer
99 views
In my Ragdrid, on click of Add New record, I added a template with a textbox and a button. In the textbox, after typing first 4 letters of a name, it should give matching name suggestions just like google does. For this purpose, in the onPrerender of the user control which contains the text box and button, I have added 
  
 AjaxControlToolkit.ToolkitScriptManager.RegisterClientScriptBlock(this, typeof(string), this._TbName.ClientID, "NameSearch('" + this._TbName.ClientID +"');", true);


But the NameSearch method is never called. Whereas, if the text box is placed outside the radgrid, this method is called!
Is there some other approach which needs to be used when this is being done in the add new record template?
Radoslav
Telerik team
 answered on 17 Oct 2014
1 answer
100 views
My problem is that when I try to filter a table based on a value in RadComboBox, no event is fired. In order to even click on the combo box, its necessary to set the RenderMode of the combo box to native or else you cannot click the combo box. Any suggestions?                 

      <FilterTemplate>
                                <telerik:RadComboBox ID="radComboBoxLastName" DataSourceID="TeacherLastNameDDL" DataTextField="TeacherLastName" DataValueField="TeacherLastName"
                                    AppendDataBoundItems="true" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("TeacherLastName").CurrentFilterValue %>'
                                    runat="server" MaxHeight="200px" RenderMode="Native" OnClientSelectedIndexChanged="TeacherLastNameChanged" AutoPostBack="true">
                                    <Items>
                                        <telerik:RadComboBoxItem Text="All" Selected="true" />
                                    </Items>
                                </telerik:RadComboBox>
                                <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
                                    <script type="text/javascript">
                                        function TeacherLastNameChanged(sender, args) {
                                            var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                            tableView.filter("TeacherLastName", args.get_item().get_value(), "EqualTo");
                                        }
                                    </script>
                                </telerik:RadScriptBlock>
                            </FilterTemplate>



Pavlina
Telerik team
 answered on 16 Oct 2014
1 answer
212 views
Hi,

We have a small issue when focus is set on a RadNumericTextBox on the client when using Firefox.
Source:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="input.aspx.vb" Inherits="TestaTredjepartWeb.input" %>
 
<!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>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="s" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadNumericTextBox ID="aa" runat="server" Value="10000000">
        </telerik:RadNumericTextBox><br /><br />
        <asp:Button ID="btnSetFocus" runat="server" Text="Set Focus" OnClientClick="$find('aa').focus(); return false;" />
    </div>
    </form>
</body>
</html>

When pressing the "Set Focus" button, the input gets focus and selects all the text.
So far everything is OK, but when clicking in the textbox after this (to edit the value at the clicked position), nothing happens (seems to select all text again).
But when clicking the texbox a second time, the expected behavior happens (all text is not selected and the cursor is at the clicked position).

This only happens in Firefox, in IE it is working as expected!

Regards
Andreas
Konstantin Dikov
Telerik team
 answered on 16 Oct 2014
7 answers
549 views
Is there any way to create a stacked bar chart without explicitly creating different series? We have a table that returns three columns; Category, Status, and a numeric value. We'd like to have the chart show each category as a stacked bar, with the status items stacked together; however, we don't know up front how many different status values will exist in the result set. The original RadChart control supported this, but we can't figure out any way to do it within the RadHTMLChart.
Danail Vasilev
Telerik team
 answered on 16 Oct 2014
1 answer
187 views
Hello,

I have configured the Telerik editor to display the RadEditorStatistic module in the toolbar.xml file (<modules>
<module name="RadEditorStatistics" dockingZone="Bottom" enabled="true" visible="true" dockable="true" />
</modules>). However, the word and character count statistics does not show up at the bottom of the editor only with the design mode setting. I need to configure both design and preview mode to enable the character and word count display. Is the prerequisite to have preview mode setting enabled to display the word and character count?

Thanks,
Chuck 
Dobromir
Telerik team
 answered on 16 Oct 2014
1 answer
103 views
HI,

I have (In a rather compex asp.net page)  a grid inside an asp.net Panel .
The hierachy look like that:

...
<telerik:RadMultiPage  runat="server" ID="xxx" SelectedIndex="0" Height="100%" Width="100%">
<telerik:RadPageView  ID="xxx" runat="server" Height="100%" >
<telerik:RadAjaxPanel  ID="xxxl" runat="server"  Height="100%" Width="100%" LoadingPanelID="xxx">
<telerik:RadGrid  ID="xxx" runat="server"   ../



What I want is that the grid should have a FIXED height of say 500px. If there are more rows in the grid than one can Show in the 500px grid , vertical scrollbars should be displayed.

Of course the first I tried was to set the HEIGHT of the grid to height="500". Unfortunately this property has (in my case) no effect of the height of the grid.

What I currently get is that the height of the grid is determined by the number of rows that gets bound to the grid. If there are e.g. many rows bound to the grid the height of the grid is very very heigh, regardless of the height I set via the height property.

What am I doig wrong ? How can I force the grid to have a FIXED height of say 500 px asnd force the grid to Display vertical scrollbars if necessary ??

Hope one can help.

Best regards
Hans-Juergen 



Galin
Telerik team
 answered on 16 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?