Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
215 views

Good afternoon everyone, I am trying to make a donut chart and I have managed to fill it with the values of a datatable, the problem I have is when showing the legends, it always gives me the same value to show. How can I make the labels show as they should be? Thank you

 

 

Arturo
Top achievements
Rank 1
 answered on 29 May 2020
19 answers
1.7K+ views

Has anyone encountered this error with RadGrid (2009Q3)?

[KeyNotFoundException: The given key was not present in the dictionary.]

System.ThrowHelper.ThrowKeyNotFoundException() +28

System.Collections.Generic.Dictionary`2.get_Item(TKey key) +7456108

Telerik.Web.UI.RadGrid.LoadClientState(Dictionary`2 clientState) +138

Telerik.Web.UI.RadCompositeDataBoundControl.LoadPostData(String postDataKey, NameValueCollection postCollection) +123

Telerik.Web.UI.RadCompositeDataBoundControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +13

System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +693

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743

Doncho
Telerik team
 answered on 29 May 2020
11 answers
2.3K+ views
Hi,

We are using Rad Grid which has a detail table per row in master table. We have an event ItemDataBound for master table but can't find this event for child/detail table. How can I use that?

Thanks
JGoswami
Top achievements
Rank 1
 answered on 29 May 2020
10 answers
627 views

I have a grid with a template column that contains values from two datafields.
How do I get the filtering to work on this column?

<telerik:GridTemplateColumn UniqueName="Name" HeaderText="Name" >
 <ItemTemplate>
   <asp:Label ID="lblFirstName" runat="server" Text='<%# Eval("FirstName") %>'></asp:Label
   <asp:Label ID="lblLastName" runat="server" Text='<%# Eval("LastName") %>'></asp:Label>
 </ItemTemplate>
</telerik:GridTemplateColumn>
Eyup
Telerik team
 answered on 29 May 2020
4 answers
182 views
I am trying to insert/edit items in the TreeList using a pop-up usercontrol.And when finish insert/update, user control can not close .Please tell me how to close Popup user control.Thank u .

Here is my code in User control :

<telerik:RadButton ID="btnInsert" runat="server" Text="Insert"   Width="75px"
                CommandName ="PerformInsert"
                Visible ="<%#DataItem is Telerik.Web.UI.TreeListInsertionObject %>"
                onclick="btnInsert_Click">
                <Icon PrimaryIconCssClass ="rbSave" />
        </telerik:RadButton>
        <telerik:RadButton ID="btnSave" runat="server" Text="Save"   Width="75px"
                CommandName ="Update"
                Visible ="<%#!(DataItem is Telerik.Web.UI.TreeListInsertionObject) %>"
                onclick="btnSave_Click">
              <Icon PrimaryIconCssClass ="rbSave" />
        </telerik:RadButton>
        <telerik:RadButton ID="btnCancel" runat="server" Text="Cancel"  Width="75px"
                CommandName ="Cancel"  CausesValidation="False">
                 <Icon PrimaryIconCssClass ="rbCancel" />
</telerik:RadButton>

Oscar
Top achievements
Rank 1
 answered on 28 May 2020
1 answer
181 views

When looking at the FireFox Developer it doesnt seem the value from the browser autocomplete is filling in the values. Even though the screen shows the value in box, the inspector does not show any value. Where is this value? I need to capture that value on the client-side markup. If i select the address list from the browser prefill, it fills in the controls correctly. Referencing screen shots:  I can see the "DG3123" in the inspector and the zip displays "59332", but the inspector shows the zip as "". So no value. If i click on the control, it received focus and fills in the zip value of "59332". Please advise how to workaround this issue. As stated, i need to capture this before moving to the next step in the wizard, as its making the validation value.

 

Please see my screen shots.

 

Thanks!

Attila Antal
Telerik team
 answered on 28 May 2020
1 answer
99 views

I'm using the following ClientDataSource to bind a radgrid. 

<telerik:RadClientDataSource runat="server" ID="clientDataSourceGrid">
    <ClientEvents OnCommand="dataSourceCommand" OnRequestStart="requestStart"  OnRequestEnd="requestEnd"  />
    <DataSource>
        <WebServiceDataSourceSettings>
            <Select Url="../../api/apd" RequestType="Get" />
            <Insert Url="../../api/apd" RequestType="Post" />
            <Update Url="../../api/apd" RequestType="Put" />
            <Delete Url="../../api/apd" RequestType="Delete" />
        </WebServiceDataSourceSettings>
    </DataSource>
    <Schema>
        <Model ID="APDId">
            <telerik:ClientDataSourceModelField FieldName="AM" DataType="String" />

 

The Web API action to do the update is as follows:

 

public void PutAPD(int id, APD apd)
  {
 
        // Do the update ....
 
        // How can I return a message in case something goes wrong in the update?
 
  }

My question is: how can I return a message from PutAPD back to the client? I want to be able to inform the user in case the update failed.

My 

 

                    


Eyup
Telerik team
 answered on 28 May 2020
1 answer
173 views

Hi,

i have a high subMenu (vertical) in my asp.net web page ; if this subMenu has more items than the height of screen (scrollbar...), when hovering the bottom items, sub items opening are placed in the middle of the screen and not in front of the hovering item.

I think the sub items do not show lower than the initial screen.

I have this problem in Edge and Chrome, not in FireFox nore IE.

Can you help me to fix this bug ?

Thanks in advance, kind regards.

Doncho
Telerik team
 answered on 28 May 2020
3 answers
114 views
Hide  Timeline views.
bassam
Top achievements
Rank 1
Veteran
 answered on 27 May 2020
2 answers
253 views

We have a need to be able to select from ~15,000 rows and need to use the RadGrid virtualization for a continuous grid instead of the "paging" mechanism.  We have encountered 2 issues that hopefully you can assist with. 

Issue 1:

When a user scrolls down in the grid - say row 5000, and they select a row, the code-behind does not receive the correct values that are displayed to the user but instead the value of the row as initially set - guessing since the grid doesn't really change, just the values. You can see this behavior in the sample code provided by setting a break in RadGrid1_ItemCommand and looking at the values coming into the method vs what is displayed to the user at that row.  

Issue 2:

The scroll position is not maintained even when setting  - ClientSettings-Scrolling-SaveScrollPosition="true".

Attached is a screen capture of the issues and code from captures to verify.

Is it possible to correct these issues or workaround???

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SimpleGridVirtual.aspx.cs" Inherits="UX.SimpleGridVirtual" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
 
        <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="false" Skin="Silk" />
        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1"></telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel" LoadingPanelID="RadAjaxLoadingPanel1" CssClass="demo-container">
 
            <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="true" AllowPaging="true" PageSize="10000" AllowMultiRowSelection="true"
                AllowSorting="true" OnNeedDataSource="RadGrid1_NeedDataSource" ClientSettings-Selecting-AllowRowSelect="true" OnItemCommand="RadGrid1_ItemCommand" ClientSettings-Scrolling-SaveScrollPosition="true">
                 
                <ClientSettings ReorderColumnsOnClient="true" AllowColumnsReorder="true" ColumnsReorderMethod="Reorder" EnablePostBackOnRowClick="true">
                    <Virtualization EnableVirtualization="true" InitiallyCachedItemsCount="2000" ItemsPerView="100" />
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="500px" />
                    <Resizing AllowColumnResize="true" />
                </ClientSettings>
                 
                <MasterTableView>
                    <Columns>
                        <telerik:GridClientSelectColumn UniqueName="UserSelect" HeaderStyle-Width="100px"></telerik:GridClientSelectColumn>
                        <telerik:GridBoundColumn UniqueName="Column" HeaderText="Column" HeaderStyle-Width="300px" DataField="Column" Visible="true"></telerik:GridBoundColumn>
                        <telerik:GridBoundColumn UniqueName="Date" HeaderText="Date" HeaderStyle-Width="300px" DataField="Date"></telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
             
            </telerik:RadGrid>
        <asp:ListBox Height="300px" Width="300px" runat="server" ID="RowClickedStatus">
 
        </asp:ListBox>
 
        </telerik:RadAjaxPanel>
 
    </form>
</body>
</html>
 
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace UX
{
    public partial class SimpleGridVirtual : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            System.Diagnostics.Debug.WriteLine("Get DataSource");
            RadGrid1.DataSource = GetDataSource();
        }
 
        private DataTable GetDataSource()
        {
            if (Session["datasource"] == null)
            {
                DataTable dt = new DataTable();
                dt.Columns.Add("Column", typeof(string));
                dt.Columns.Add("Date", typeof(string));
                for (int i = 0; i < 10000; i++)
                {
                    dt.Rows.Add("Row " + i.ToString(), DateTime.Now.AddDays(i) + "_" + i.ToString());
                }
                Session["datasource"] = dt;
            }
            return Session["datasource"] as DataTable;
        }
 
        protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if ((string.Compare(e.CommandName, "RowClick", true) == 0) && (e.Item != null))
            {
                DataTable GridItems = Session["VirtualizationDataSource"] as DataTable;
                List<string> SelectedItems = (List<string>)Session["CurrentSelections"];
 
                string ColumnValue = e.Item.Cells[3].Text;
                RowClickedStatus.Items.Add(ColumnValue);
                System.Diagnostics.Debug.WriteLine("Got Value: " + ColumnValue);
                string DateValue = e.Item.Cells[4].Text;
            }
        }
    }
}

 

 

Van
Top achievements
Rank 1
Iron
Iron
 answered on 27 May 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?