Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
103 views
I have a page with a DataList and a RadTreeView and now I should allow drag'n drop from datalist's items to the treeview. I wonder what is the best approach to do this:
1/ using custom javascript
2/ replacing the DataList with a RadListView, to do the same as this: http://demos.telerik.com/aspnet-ajax/listview/examples/itemdragdrop/defaultcs.aspx

What is the easiest and fastest method?
Dimitar Terziev
Telerik team
 answered on 17 Jul 2013
1 answer
295 views
<telerik:RadHtmlChart runat="server" Width="400px" Height="300px" ID="RadHTMLChart1" DataSourceID="SqlDataSource2" >
             <Legend>
                 <Appearance Position="Top">
                 </Appearance>
             </Legend>
             <PlotArea>
                  <Series >
                        
                       <telerik:PieSeries DataFieldY="SumPeopleServed" Name="People Served" StartAngle="90"  >
                       
                       </telerik:PieSeries>
                  </Series>
                   
             </PlotArea>
             <ChartTitle Text="% Samples by RDS">
              <Appearance>
              <TextStyle FontSize="16px"></TextStyle>
              </Appearance>
             </ChartTitle>
        </telerik:RadHtmlChart>
          
    
       
 
   <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:cnPanDMSWEB_dead %>" SelectCommand="Select RDSNUm, Sum(PeopleServed) as 'SumPeopleServed' from mcop_OrderEntry Where TransDate >= @StartDate and TransDate <= @EndDate Group By RDSNum">
       <SelectParameters>
           <asp:ControlParameter ControlID="dtStartDate" DefaultValue="7/1/2013" Name="StartDate" PropertyName="SelectedDate" />
           <asp:ControlParameter ControlID="dtEndDate" DefaultValue="7/31/2013" Name="EndDate" PropertyName="SelectedDate" />
       </SelectParameters>
   </asp:SqlDataSource>



I'm trying to get a RadHTMLChart in PieChart mode to generate the legend from a column in a SQL-Generated dataset

Here is the example of the dataset:

RDSNum SumPeopleServed
----------------------------------------------------
1 834989
8888 36956
9999 641836


Attached is a snapshot of the control that correctly shows the "SumPeopleServed" values in the pie chart.

But, I can't seem to get the "RDSNum" to show in the legend so that the user can see what each color represents.

I don't see anything in the 'Config Wizard" that allows me to set the column used for the legend, much like the "Y-axis" column to be used for the pie chart values....

And I examples I see for SQL-Databound stuff for piecharts seem to have the legend values assigned at design-time, which doesn't help me.  

Can anyone point me in the right direction?  I'm sure I'm missing something really really dumb... I can't image a control like this would have the ability to use values dynamically generated from a dataset, but then have to have the legend pre-defined at design-time...


Jay



Stamo Gochev
Telerik team
 answered on 17 Jul 2013
2 answers
124 views
Hello,

I am currently working on a RadGrid that has several dynamic columns, but I'm having some trouble with the paging. Paging seems to work fine, except when you attempt to navigate back to the first page. When you navigate back to the first page, the grid still shows the data of the last page you were on.

I have added a sample project and a screenshot of the problem that can be used to reproduce the problem. Follow these steps to reproduce the problem:
1. Navigate to page 3
2. Navigate to page 1
The grid now shows both pages as selected and is still showing the data of page 3.

public partial class Index : Page
    protected void Page_Init(object sender, EventArgs e) {
        this.CreateGrid();
    }
 
    private void CreateGrid() {
        RadGrid grid = new RadGrid();
        grid.ID = "gvBenchmark";
        grid.AutoGenerateColumns = false;
        grid.Skin = "Metro";
        grid.AllowSorting = true;
        grid.AllowPaging = true;
        grid.PageSize = 15;
        grid.SortingSettings.SortToolTip = String.Empty;
 
        GridBoundColumn idColumn = new GridBoundColumn();
        idColumn.HeaderText = "ID";
        idColumn.UniqueName = "ID";
        idColumn.DataField = "ID";
        grid.Columns.Add(idColumn);
 
        GridBoundColumn ageColumn = new GridBoundColumn();
        ageColumn.HeaderText = "Age";
        ageColumn.UniqueName = "Age";
        ageColumn.DataField = "Age";
        grid.Columns.Add(ageColumn);
 
        grid.DataSource = this.GetData();
        grid.DataBind();
 
        pnGrid.Controls.Add(grid);
    }
 
    private IList<Person> GetData() {
        IList<Person> persons = new List<Person>();
        for (int i = 0; i < 100; i++) {
            Person p = new Person();
            p.Age = i + 10;
            p.ID = i;
            persons.Add(p);
        }
 
        return persons;
    }
}
 
public class Person {
    public int Age { get; set; }
    public int ID { get; set; }
}
Vincent
Top achievements
Rank 1
 answered on 17 Jul 2013
11 answers
1.6K+ views
Hello,
I have a RadGrid with Export Settings - Excel Format=BIFF
When I export the grid, all my numbers are shown as Text in the created Excel sheet.
When I add the mso-number-format:\#\,\#\#0\.000 in the style sheet for the class I use, or I add it in the code-behind using code like in http://www.telerik.com/help/aspnet-ajax/grid-html-export.html this number format is ignored.
When I change the Excel Format to HTML, the numbers are shown as numbers in Excel, even without using the mso-number-format. I then get the warning that the XLS format is not recognized, but I can continue.
Telerik: Can you investigate/advise?
Best Regards,
Frank
Kostadin
Telerik team
 answered on 17 Jul 2013
1 answer
88 views
Hi,

I'm wondering if there are any known issues with using DropDownTree, HTML 5 Charts, Kendo Date Picker, and ComboBox on the same page?

I am getting this error in IE 10 and Chrome, I didn't check any other browser:

Unable to get property 'ie' of undefined or null reference

Telerik.Web.UI.WebResource.axd, line 7041 character 150

And that error is followed by:

Object doesn't support this action
Telerik.Web.UI.WebResource.axd, line 6 character 54851

 
The charts never load with data.


I don't see the error until the HTML 5 charts are dynamically added to the page after items are selected in the DropDownTree, ComboBox, and a date is picked in the Date Picker.
 
If I run the page in Compatibility View in IE 10 the charts load with data but, of course, the styling is all messed up. And, I get this error:

SCRIPT3: Member not found. 
Telerik.Web.UI.WebResource.axd, line 1871 character 23238



Thanks,
Eric
Kate
Telerik team
 answered on 17 Jul 2013
1 answer
81 views
Please find my sample project in the attachment. i have also included the database script for the project

http://www.4shared.com/get/5pSvIMoX/testRadGrid.html

I'm trying to do a simple radgrid bind. i've done it with two pages. 

please see default.aspx - the column filter options are showed when i click on the filter icon as i expected but in search.aspx i'm binding through a database data source then the column filtering options (contains, equals...) are not shown. 

error is shown in the console.

Uncaught TypeError: Cannot set property 'control' of undefined

Please let me know whats wrong with search.aspx radgrid column filtering
Andrey
Telerik team
 answered on 17 Jul 2013
1 answer
212 views
Is it possible to have the label ( "enter code here" )positioned above the text box?
Shinu
Top achievements
Rank 2
 answered on 17 Jul 2013
2 answers
200 views
I'm having a problem with RadGrid's page size dropdown being disabled after databinding. I'm using Telerik RadControls AJAX version 2013.1.514.45.

The scenario is as follows:-

The page contains :
1. RadAjaxManager and EnableAJAX=true
2. CustomValidator
3. RadWindow

So far, if I remove any one of the above, the problem disappears. In addition, if the RadGrid is bound when the page loads, the dropdown works too. But I'm binding it on button click (postback).

MasterPage:
<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="Main.master.vb" Inherits="RadGridProblem.Main" %>
 
<!DOCTYPE html>
<head runat="server">
    <title></title>
 
    <script src="Scripts/jquery-1.9.1.min.js"></script>
 
         
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="1800" EnableEmbeddedjQuery="false">
        </telerik:RadScriptManager>
 
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
        </asp:ContentPlaceHolder>
    </form>
</body>
</html>

The Test page:
<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Main.Master"
    CodeBehind="Search3.aspx.vb" Inherits="RadGridProblem.GuestSearch3" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="cmdSearch">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlContent" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmdKembali">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlContent" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rgKonkordan">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgKonkordan" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
    <asp:Panel ID="pnlContent" runat="server">
 
        <asp:Panel ID="pnlForm" runat="server" DefaultButton="cmdSearch">
            <table class="Standard">
                <tr>
                    <td style="padding-top: 15px;">
                        Kata
                    </td>
                    <td>
                        <asp:TextBox ID="txtKata" runat="server" Width="200px" />
                        <asp:Button ID="cmdSearch" runat="server" Text="Cari" />
                        <asp:CustomValidator ID="cvSearchStr" runat="server" ControlToValidate="txtKata">
                        </asp:CustomValidator>
                    </td>
                </tr>
            </table>
            <hr />
        </asp:Panel>
 
        <asp:Panel ID="pnlResult" runat="server">
            <asp:Button ID="cmdKembali" runat="server" Text="Kembali" />
 
            <telerik:RadGrid ID="rgKonkordan" runat="server" AutoGenerateColumns="False" AllowPaging="True">
                <MasterTableView>
                    <Columns>
                        <telerik:GridTemplateColumn HeaderText="Kata">
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:HyperLink ID="lnkKata" runat="server" ForeColor="RoyalBlue" NavigateUrl="#" />
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
        </asp:Panel>
 
    </asp:Panel>
 
    <telerik:RadWindow ID="rwAsyncProcessWindow" runat="server" ShowContentDuringLoad="false" Width="500px"
        Height="400px" Behaviors="None" Modal="true" VisibleStatusbar="false" VisibleTitlebar="false">
    </telerik:RadWindow>
 
    <script type="text/javascript">
        function validateSearchStr(source, args) {
            args.IsValid = true;
        }
 
    </script>
 
</asp:Content>

Test page code behind:
Imports Telerik.Web.UI
 
Partial Public Class GuestSearch3
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            pnlResult.Visible = False
        End If
    End Sub
 
    Private Sub cmdSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdSearch.Click
 
        rgKonkordan.CurrentPageIndex = 0
        rgKonkordan.Rebind()
 
        pnlForm.Visible = False
        pnlResult.Visible = True
 
    End Sub
 
    Private Sub RadGrid1_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rgKonkordan.NeedDataSource
        Dim d As New List(Of Integer)
 
        For i As Integer = 1 To 100
            d.Add(i)
        Next
 
        rgKonkordan.DataSource = d
    End Sub
 
    Private Sub rgKonkordan_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgKonkordan.ItemDataBound
        If TypeOf e.Item Is GridDataItem Then
            Dim itm As GridDataItem = CType(e.Item, GridDataItem)
 
            Dim lnkKata As HyperLink = CType(itm.FindControl("lnkKata"), HyperLink)
            lnkKata.Text = "kata"
            lnkKata.Attributes.Add("onclick", String.Concat("viewKata('", 1 & "', '" & 1000 & "'); return false;"))
 
        End If
    End Sub
 
    Private Sub cmdKembali_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmdKembali.Click
        pnlForm.Visible = True
        pnlResult.Visible = False
    End Sub
 
End Class

Checking on the console, JS errors were thrown as shown in the attachment.

Please respond on how to solve this. Thanks.


Razak
Top achievements
Rank 2
 answered on 17 Jul 2013
3 answers
503 views
Hi there,

I met a problem when I'm using the RadGrid control.

I need select a text from a cell via mouse selection and copy it to clipboard via press ctl + c.  (A very common mouse selection)

However, after I clicked a cell, a entire row is selected, I am not able to select the text from the cell I clicked.
<ClientSettings AllowColumnsReorder="False" ReorderColumnsOnClient="False">
             <!-- Cell Text can be selected by mouse and copy to clipboard after I remove this row. -->
            <Selecting AllowRowSelect="True" CellSelectionMode="SingleCell" />
</ClientSettings>

I tried to remove AllowRowSelection = "True", the problem sloved. But I have to keep it.

Does anyone meet the same problem?

Thanks.

Jeremiah
Top achievements
Rank 1
 answered on 17 Jul 2013
0 answers
81 views
I'm using asp.net model binding and for the select method returning an IQueryable, when I sort a column and then change the grid's page, the content remains the same, How can I solve this problem?
David
Top achievements
Rank 1
 asked on 16 Jul 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?