Telerik Forums
UI for ASP.NET AJAX Forum
18 answers
306 views
Hi,

Would you provide a sample for RadGrid Q1 2010 Export and Grouping together?
I tried to build a page with your drag-&-drop column header grouping, then export the grouped grid data to excel.

Thanks

daniel
Daniel
Telerik team
 answered on 22 Aug 2014
1 answer
66 views
Dear friends,

i had a issue of Report Viewer displaying blank page in IE10 and i solved using this code

Response.AppendHeader("X-UA-Compatible", "IE=edge");

in master page.

after using this code, i have issue of datepicker and time picker controls Cssclass have been changed badly.
if i remove this code,  telerik control looks fine. but report viewer showing blank page.

what to do to show telerik control to look good..
Marin Bratanov
Telerik team
 answered on 22 Aug 2014
6 answers
306 views
I'm getting the following error when trying to aggregate an AutoGenerated column: Column 'UnitPrice' does not belong to table. I've created a very simple app to reproduce the problem. I need to know if I'm coding things in the wrong places, or if this is a problem with the grid itself.

ASPX Page

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_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></title>

 

</

 

head>

 

<

 

body>

 

 

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

 

 

<asp:ScriptManager ID="aspScript" runat="server">

 

 

</asp:ScriptManager>

 

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"

 

 

SelectCommand="SELECT [ProductID], [ProductName], [SupplierID], [CategoryID], [UnitsInStock], [UnitPrice] FROM [Products]">

 

 

</asp:SqlDataSource>

 

 

<telerik:RadGrid ID="grdTemplate" runat="server" DataSourceID="SqlDataSource1"

 

 

AutoGenerateColumns="true" ShowGroupPanel="True" Skin="Office2007" Height="500" Width="100%"

 

 

OnColumnCreated="grdTemplate_ColumnCreated">

 

 

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

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="True" />

 

 

</ClientSettings>

 

 

<MasterTableView AutoGenerateColumns="true" TableLayout="Fixed" ShowFooter="true" ShowGroupFooter="true" />

 

 

</telerik:RadGrid>

 

 

</form>

 

</

 

body>

 

</

 

html>

Code Behind

 

using

 

System;

 

 

 

using

 

System.Collections.Generic;

 

 

 

using

 

System.Web;

 

 

 

using

 

System.Web.UI;

 

 

 

using

 

System.Web.UI.WebControls;

 

 

 

using

 

Telerik.Web.UI;

 

 

 

public

 

partial class _Default : System.Web.UI.Page

 

{

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

// Add the expression

 

 

 

 

grdTemplate.MasterTableView.GroupByExpressions.Add(

GridGroupByExpression.Parse("SupplierID Group By SupplierID"));

 

}

 

protected void grdTemplate_ColumnCreated(object sender, GridColumnCreatedEventArgs e)

 

{

 

// Determine the column type

 

 

 

 

 

if (e.Column is GridBoundColumn && e.Column.UniqueName == "UnitPrice")

 

{

 

// Set the column aggreagate

 

 

 

 

(e.Column

as GridBoundColumn).Aggregate = GridAggregateFunction.Sum;

 

}

}

}

Kostadin
Telerik team
 answered on 22 Aug 2014
3 answers
91 views
Hi,
I need to create a RadPivotGrid dynamically and export it.
I have an export scheduler that run in background and has to generate an excel of a PivotGrid an send it by email.
I have to do this within a Web Service but I don't know if it is possible.

Any suggestion?

Thanks a lot!
Kostadin
Telerik team
 answered on 22 Aug 2014
2 answers
155 views
Hello guys,

I am using the RadGrid component in order to display my data: ideally I would like to sort the item by the field "EventID" and I've used the following code in order to achieve that:

<SortExpressions>
        <telerik:GridSortExpression FieldName="EventID" SortOrder="Descending" />
 </SortExpressions>

Which works just fine.

In my scenario I am editing one of the grid item in a modal window and, when the item is submitted,  I want to refresh the parent page who contains the grid.  

In order to do that I am using the following code:

RadAjaxManager manager = RadAjaxManager.GetCurrent(this.Page);
manager.ResponseScripts.Add("CloseWindowReload('" + gridReloadCommand + "','" + ((itemID == null) ? "-1" : itemID.ToString()) + "');");

Which does refresh the parent page and the grid correctly, but the latter is not sorted by descending anymore . 

Do you have any advice for me?

Regards
Gavin


Gavin Pollock
Top achievements
Rank 1
 answered on 22 Aug 2014
6 answers
80 views
I am using UI for ASP.NET for AJAX Q2 2014 in a web project.

We are using RadEditor for creating content items for HTML email newsletters.

I am using the code below to set the set the editor filters on the Page_Load event but the editor is still rendering and saving styles instead of attributes.

??
protected void SetEditorFilters()
{
    // DISABLE DEFAULT FILTERS
    txtContentHTML.ContentFilters = Telerik.Web.UI.EditorFilters.None;
 
    // SET DESIRED FILTERS
    txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.ConvertInlineStylesToAttributes);
    txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.FixEnclosingP);
    txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.FixUlBoldItalic);
    txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.IndentHTMLContent);
    txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.MakeUrlsAbsolute);
    txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.OptimizeSpans);
    txtContentHTML.EnableFilter(Telerik.Web.UI.EditorFilters.RemoveScripts);
     
}
Marin Bratanov
Telerik team
 answered on 22 Aug 2014
1 answer
167 views
Hello,

We are planning to deploy SharePoint 2013 solution using Telerik Web UI controls (Version: 2011.1.315.35). I have following doubts,

1. Is the specific version 2011.1.315.35 (free/community edition) is any more maintained (discontinued) or supported?
2. Do Telerik recommend version 2011.1.315.35 for SharePoint 2013 deployment?

Regards,
N.
Marin Bratanov
Telerik team
 answered on 22 Aug 2014
2 answers
138 views
Hi Telerik,

I am unable to disable the radsearchbox from javascript. Here is the code I used and cant find what is wrong with it.

var itembox= $find("<%= itemSearchBox.ClientID %>");
itembox.disable();

Thanks,
Freddy.
rajesh
Top achievements
Rank 1
 answered on 22 Aug 2014
2 answers
99 views
Hello everyone,

I am trying to implement a RadGrid that supports Batch editing. The main reason I want to implement this feature (EditMode="Batch") is to be able to add new records inline in the grid. I have been able to get the new record functionality that I desire, but it has broken the functionality that I implemented for both a double click and right click. Inline editing is not a requirement for me. Is there anyway to allow for inline additions of new records, while disabling the inline edit functionality in order to allow for right click and double click functionality of already added records?

RadGrid/MasterTableView ASPX:
<telerik:RadGrid ID="RadGridActionItem" runat="server" AllowSorting="True" AllowPaging="true"
    AllowFilteringByColumn="True" OnNeedDataSource="RadGridActionItem_NeedDataSource"
    OnPageIndexChanged="RadGridActionItem_PageIndexChanged" OnItemCreated="RadGridAction_ItemCreated"
    OnDeleteCommand="RadGridActionItem_DeleteCommand" OnInsertCommand="RadGridActionItem_InsertCommand"
    AllowMultiRowEdit="True" OnItemDataBound="RadGridActionItem_ItemDataBound" Width="80%"
    HorizontalAlign="Center" PageSize="15" EnableViewState="true" Skin="Windows7">
    <GroupingSettings CaseSensitive="false" />
    <MasterTableView AutoGenerateColumns="false" ShowFooter="true" DataKeyNames="Action_Item_Id"
        ClientDataKeyNames="Action_Item_Id" CommandItemDisplay="Top" Width="100%" HorizontalAlign="Center"
        EditMode="Batch">

Right Click Functionality (C#):
protected void RadMenu1_ItemClick(object sender, RadMenuEventArgs e)
{
    // Right click context menu selection event.
 
    int radGridClickRowIndex;
    string actionItemId;
    bool copied = true;
 
    // Get row index and Action_Item_Id associated with row
    radGridClickRowIndex = Convert.ToInt32(Request.Form["radGridClickedRowIndex"]);
    actionItemId = RadGridActionItem.MasterTableView.DataKeyValues[radGridClickRowIndex]["Action_Item_Id"].ToString();
 
    switch (e.Item.Text)
    {
        case "Copy":
            Response.Redirect("NewActionItem.aspx?ActionId=" + actionItemId + "&IsCopied=" + copied);
            break;
    }
}

DoubleClick Functionality (JS):
<script type="text/javascript">
    function RowDblClick(sender, args) {
        var dblClick;
        dblClick = true;
        var index = args.get_itemIndexHierarchical();
        var updateActionId = args.getDataKeyValue("Action_Item_Id");
        window.location.href = "NewActionItem.aspx?DblClick=" + dblClick + "&UpdateActionId=" + updateActionId;
    }
</script>

Once again, my main goal is to be able to add new records inline within the RadGrid while maintaining already implemented rightclick and doubleclick functionality. Any help I can get would be greatly appreciated. Thanks!

-Matt
Angel Petrov
Telerik team
 answered on 22 Aug 2014
11 answers
1.5K+ views
I have a grid which has 7 fixed width columns and I have enabled the ability to group these. However when I add a grouping by dragging the column to the Group header row, additional columns are added at the beginning of my grid, pushing my grid and data out to the right.

Id like to be able to prevent these columns from being added and just the group headers be shown as additional rows, either with or without the ability to expand or collapse.

I have attached an image of what is happening. The red section highlights the newly added column when I group, and the green section highlights the grid and its data being forced out to the right.

I have to set the width of the rows or they all come out the same size making the header row twice as tall as I want it. If there is an easy way to have the entire grid set to a width and the columns size automatically then please tell me how.
Eyup
Telerik team
 answered on 22 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?