Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
114 views
Hello .
First Let me talk about my Problem . I have an Grid and I want a Column of CheckBoxes that when You click On an Input/Button (Or checkbox in Header) ,All of CheckBoxes Checked,ClientSidely Not ServerSidely.There are some Pages in Telerik.com But Unfortunately I didn't Understand :-) Like this :
http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/selecting/row-selection/defaultcs.aspx
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/functionality/selecting/selecting-rows/client-side-selecting-with-a-click
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/functionality/selecting/selecting-rows/client-side-selecting-multiple-rows
It's Complicated
. Please Send me a Complete and simple Solution .for example Simple Grid with Minimum Items and Required Methods, properties and any Changes that we Need.
Thanks in Advance
Mahdi
Top achievements
Rank 1
 answered on 11 Nov 2015
1 answer
188 views

Hi I am not able to solve this error The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

 

this is my script

 

<body>
 

    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager2" runat="server" />
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxManager EnableAJAX="true" ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="FormView1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="FormView1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>


     <telerik:RadScriptBlock  ID="RadScriptBlock1" runat="server">
        <script type="text/javascript">
            var FormName = "frmPerformMaintRecurringAS";
            var FormId = 71;
            var UserId = '<%= Session["UserId"] %>';
            EntityID = FormId;
            var tabstrip;
        </script>
    </telerik:RadScriptBlock>​

 

 

what am doing wrong?

Sam
Top achievements
Rank 1
 answered on 11 Nov 2015
14 answers
458 views

I'm using Chrome 11 / Firefox 4 (2010.3.1317.40) and suddenly the ajax updates started working in a strange way.
Looking at inspector:

Uncaught Error: SYNTAX_ERR: DOM Exception 12:
On Telerik.Web.UI.WebResource.axd: 1136

The line is this one:

}if(d[b].indexOf("{")!=-1){e.insertRule(d[b]+"}",e.cssRules.length);
Telerik.Web.UI.WebResource.axd:1136Uncaught Error: SYNTAX_ERR: DOM Exception 12
After this the page crashes, no refresh / recompile helps in solving this problem. Is this a bug?
Ahmed
Top achievements
Rank 1
 answered on 11 Nov 2015
1 answer
131 views

Hi all

 I have a pop up modal window, which itself has a further pop up window.

I have Teleriks script to refresh the underlying window:

 And for the first pop up its works fine, problem is I have the same script on the second pop up, but the GetRadWindow() returns oWindow is undefined.

What do I need to do to get the GetRadWindow() to find both the original page and the first pop up?

function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
}
 
function CloseAndRebind(args) {
  GetRadWindow().BrowserWindow.refreshGrid();
  GetRadWindow().Close();
}

 

Marin Bratanov
Telerik team
 answered on 11 Nov 2015
3 answers
215 views

I have an issue where the menu var we have is no longer showing the drop downs (see video) Any ideas why it wouldn't be showing?

 http://screencast.com/t/g2hlqXN8XET 

 

Below is the code for the menu

 

<telerik:RadMenu ID="RadMenuMaster" runat="server" Style="top: 0px; left: 0px; z-index: 2900"
                        OnClientItemOpened="itemOpened">
                        <Items>
                            <telerik:RadMenuItem runat="server" Text="New Cars &amp; Quotes" Width="160px" Owner="RadMenuMaster">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Vehicle Assistance" Width="160px" Owner="RadMenuMaster">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="End Of Agreement" Width="160px" Owner="RadMenuMaster">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Driver Assistance" Width="160px">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Your Scheme" Width="160px" Owner="RadMenuMaster">
                            </telerik:RadMenuItem>
                            <telerik:RadMenuItem runat="server" Text="Contact Us" Width="157px" Owner="RadMenuMaster">
                            </telerik:RadMenuItem>
                        </Items>
                    </telerik:RadMenu>​

Ivan Danchev
Telerik team
 answered on 11 Nov 2015
4 answers
144 views
Hi,

we evaluate the RadGrid as our new standard Grid. Everytime I export my grid to pdf (csv, word and excel works well) I get this error:

System.InvalidCastException: Unable to cast object of type 'Telerik.Web.Apoc.Layout.BlockArea' to type 'Telerik.Web.Apoc.Layout.AreaContainer'. at Telerik.Web.Apoc.Fo.Flow.BlockContainer.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.TableCell.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.TableRow.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.AbstractTableBody.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.Table.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.Block.Layout(Area area) at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area, Region region) at Telerik.Web.Apoc.Fo.Flow.Flow.Layout(Area area) at Telerik.Web.Apoc.Fo.Pagination.PageSequence.Format(AreaTree areaTree) at Telerik.Web.Apoc.StreamRenderer.Render(PageSequence pageSequence) at Telerik.Web.Apoc.Fo.FOTreeBuilder.EndElement() at Telerik.Web.Apoc.Fo.FOTreeBuilder.Parse(XmlReader reader)


I'm using the RadGrid the ASP.NET AJAX Q1 2010 version (Telerik.Web.UI Trial Version 2010.1.309.20).

Can anyone confirm my problem and suggest a solution?

Appreciate your help! Kind regards,
Michael
 
aspx:

<%

@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ExportGridDateTimeColumnError._Default" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml" >

 

<

 

head runat="server">

 

 

<title>Untitled Page</title>

 

</

 

head>

 

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<div>

 

 

 

<script type="text/javascript">

 

 

function onRequestStart(sender, args) {

 

 

if (args.get_eventTarget().indexOf("ExportToExcelButton") >= 0 ||

 

args.get_eventTarget().indexOf(

"ExportToWordButton") >= 0 ||

 

args.get_eventTarget().indexOf(

"ExportToPdfButton") >= 0 ||

 

args.get_eventTarget().indexOf(

"ExportToCsvButton") >= 0) {

 

args.set_enableAjax(

false);

 

}

}

 

</script>

 

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

 

 

</telerik:RadScriptManager>

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >

 

 

<ClientEvents OnRequestStart="onRequestStart" />

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"/>

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

<telerik:AjaxSetting AjaxControlID="RadGrid1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Vista">

 

 

</telerik:RadAjaxLoadingPanel>

 

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" Width="1024px" Skin="Vista"

 

 

AllowSorting="true"

 

 

AllowFilteringByColumn="true"

 

 

AllowPaging="true" PageSize="10"

 

 

ShowHeader="true"

 

 

ShowFooter="true"

 

 

ShowGroupPanel="true"

 

 

OnItemCommand="RadGrid1_ItemCommand">

 

 

<ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True">

 

 

<Selecting AllowRowSelect="True"></Selecting>

 

 

<Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="False"></Resizing>

 

 

</ClientSettings>

 

 

<GroupingSettings ShowUnGroupButton="true" />

 

 

<ExportSettings IgnorePaging="true" OpenInNewWindow="true">

 

 

<Pdf PageHeight="297mm" PageWidth="210mm" PageTitle="PDF Export Test" />

 

 

</ExportSettings>

 

 

 

<MasterTableView Width="80%" CommandItemDisplay="Top">

 

 

<PagerStyle Mode="NextPrevNumericAndAdvanced" />

 

 

<CommandItemSettings

 

 

ShowExportToWordButton="true"

 

 

ShowExportToExcelButton="true"

 

 

ShowExportToCsvButton="true"

 

 

ShowExportToPdfButton="true"

 

 

/>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

 

</div>

 

 

</form>

 

</

 

body>

 

</

 

html>

 


cs:

using

 

System;

 

using

 

System.Collections;

 

using

 

System.Configuration;

 

using

 

System.Data;

 

using

 

System.Linq;

 

using

 

System.Web;

 

using

 

System.Web.Security;

 

using

 

System.Web.UI;

 

using

 

System.Web.UI.HtmlControls;

 

using

 

System.Web.UI.WebControls;

 

using

 

System.Web.UI.WebControls.WebParts;

 

using

 

System.Xml.Linq;

 

namespace

 

ExportGridDateTimeColumnError

 

{

 

public partial class _Default : System.Web.UI.Page

 

{

 

protected void Page_Load(object sender, EventArgs e)

 

{

RadGrid1.DataSource = getDemoData();

}

 

public DataTable getDemoData()

 

{

 

DataTable dt = new DataTable();

 

 

DataColumn myDataColumn;

 

 

Random rnd = new Random();

 

myDataColumn =

new DataColumn();

 

myDataColumn.DataType =

Type.GetType("System.String");

 

myDataColumn.ColumnName =

"Guid";

 

dt.Columns.Add(myDataColumn);

myDataColumn =

new DataColumn();

 

myDataColumn.DataType =

Type.GetType("System.Int32");

 

myDataColumn.ColumnName =

"number";

 

dt.Columns.Add(myDataColumn);

myDataColumn =

new DataColumn();

 

myDataColumn.DataType =

Type.GetType("System.DateTime");

 

myDataColumn.ColumnName =

"date";

 

dt.Columns.Add(myDataColumn);

 

for (int i = 0; i < 1000; i++)

 

{

AddDataRowToTable(System.

Guid.NewGuid().ToString(), rnd.Next(), DateTime.Now, dt);

 

}

 

return dt;

 

}

 

private void AddDataRowToTable(string guid, int number, DateTime date, DataTable dataTable)

 

{

 

DataRow row;

 

row = dataTable.NewRow();

row[

"guid"] = guid;

 

row[

"number"] = number;

 

row[

"date"] = date;

 

dataTable.Rows.Add(row);

}

 

protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)

 

{

 

if (e.CommandName == Telerik.Web.UI.RadGrid.ExportToExcelCommandName ||

 

e.CommandName == Telerik.Web.UI.

RadGrid.ExportToWordCommandName ||

 

e.CommandName == Telerik.Web.UI.

RadGrid.ExportToCsvCommandName ||

 

e.CommandName == Telerik.Web.UI.

RadGrid.ExportToPdfCommandName)

 

{

ConfigureExport();

}

}

 

public void ConfigureExport()

 

{

RadGrid1.ExportSettings.ExportOnlyData =

false;

 

RadGrid1.ExportSettings.IgnorePaging =

true;

 

RadGrid1.ExportSettings.OpenInNewWindow =

true;

 

}

}

}

Dimitri
Top achievements
Rank 1
 answered on 11 Nov 2015
3 answers
140 views
I have used RadHtmlchart with navigation and plotted the couple of line chart on it. Data set for all the line chart is coming from the server side. Is there way to get all the data set of all the line chart covered under  navigation using the javascript (Client side) so that I can manipulate it put some extra info like Min and Max etc based on the navigation selection area.
Danail Vasilev
Telerik team
 answered on 11 Nov 2015
3 answers
93 views

I have created a very simple page to reproduce this error

This error is happening on ipad safari or chrome

you can also reproduce it on chrome by emulating Apple Ipad.

Once the page load, Select a radlistboxitem such as "2", now try to press the button. it won't postback.

Any help would be appreciated

<body>
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server" ID="sm1"></asp:ScriptManager>
    <div>
    Available
    <telerik:RadListBox runat="server" ID="lbUnselected"  Height="250px" SelectionMode="Multiple" AllowTransfer="true" TransferToID="lbSelected" AllowReorder="true" EnableDragAndDrop="true" />
    <br /><br />
     
    Selected
    <telerik:RadListBox runat="server" ID="lbSelected"  Height="250px" SelectionMode="Multiple" AllowTransfer="true" TransferToID="lbUnselected" AllowReorder="true" EnableDragAndDrop="true" />
    <br /><br />
    <asp:Button runat="server" ID="btnDo" Text="Do" />
 
    </div>
    </form>
</body>

and code behind

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not IsPostBack Then
        lbUnselected.Items.Add(New RadListBoxItem("1", "1"))
        lbUnselected.Items.Add(New RadListBoxItem("2", "2"))
        lbUnselected.Items.Add(New RadListBoxItem("3", "3"))
 
        lbSelected.Items.Add(New RadListBoxItem("4", "4"))
        lbSelected.Items.Add(New RadListBoxItem("5", "5"))
        lbSelected.Items.Add(New RadListBoxItem("6", "6"))
    End If
End Sub
 
Protected Sub btnDo_click(sender As Object, e As EventArgs) Handles btnDo.Click
    Dim here As String = ""
End Sub


Ivan Danchev
Telerik team
 answered on 11 Nov 2015
1 answer
79 views

Hello,

I have a RadComboBox that contains a list of entities. When the user makes a selection from the combo box an entity is retrieved in the code behind and two RadDatePickers are populated using a start date and an end date from the entities.

This all works fine but if the user makes a selection using the ​ENTER key then the datapickers will not be populated. This is only a problem on Chrome also. On Internet Explorer it is fine. I haven't tried other browsers.

What is strange is that the OnSelectedIndexChanged event always fires (regardless of browser and whether the selection is made with a mouse click or a key press).

My date pickers are wrapped in an update panel which I call Update() on after the datepickers have been populated (by setting the SelectedDate attributes to the start/end date value).

Please let me know if you require additional information and thanks in advance.

John.

 

Bozhidar
Telerik team
 answered on 11 Nov 2015
1 answer
162 views

Hi there -

I currently have a page implemented where a radgrid is on the page, allowing each data item to have a radbutton which will open a radwindow as a modal.  This Navigate URL is another aspx page, which in the Page_Load event does some database activity and generates a dynamic PDF as binary data, which it then writes out to the Response buffer of that child/report page.  The effect of this is having a dynamic PDF load in a modal.  This all works great.

However, this database query can take up to 8 seconds, and I wanted to give the user a loading panel (even simply spinning icon) in the radwindow until this data was ready, processed, and written to a byte array so it is ready for the response buffer.

What would be the best approach here?  I know it gets a bit tricky due to the nature of this type of content (PDF) and AJAX knowing when the page is done loading so wanted to ask some pros.

I was thinking perhaps I can simply have that child/report page that comes in the modal contain just a simple ASP Panel , and then perhaps after the Page_Load events has fired and it has the byte array ready with the PDF content then I can simply write it to the response buffer in there and then make the panel visible? 

I just wasn't sure the best approach.

 Any help is greatly appreciated!

Marin Bratanov
Telerik team
 answered on 11 Nov 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?