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

Hi

 I have a TileList that consists of 3 groups (yesterday, today, tomorrow) displayed horizontally, each with a group header tile. 'Yesterday' is on the left, 'Today' is center, 'Tomorrow' is on the right.  I want to scroll horizontally to the 'today' group on pageLoad. Anchors don't seem to work or only vertically. Any ideas how to accomplish this?

Thank you

rugydp
Top achievements
Rank 1
 answered on 19 Aug 2015
5 answers
67 views

Hi all,

I have 2 differents ways to create grids in my asp.net page, in aspx and programmatically, so 4 of those grids are programatically because the numbers of columns are dynamic and other 4 has static columns so i defined in aspx.

There is some incompatibility with this?, the static grids lose the events, i have a delete command an never fires if there is some code in Page_Init event, if i comment that code, the events works,

 

Thanks

Eyup
Telerik team
 answered on 19 Aug 2015
3 answers
102 views

I have a FormView in the main page.  A button would allow me to do some processing and then bind a new datasource to the FormView.

I couldn't get it to work though.  I am wondering is it because the formview is sitting in one AjaxPanel while the RadWindow has its own AjaxPanel.  I tried to use AjaxManager but same thing.

 Any sample would be appreciated.

 Thanks

Danail Vasilev
Telerik team
 answered on 19 Aug 2015
4 answers
159 views
I wonder if someone could help me solve this issue:

I need to have a Datalist (for layout purposes etc.) inside a RadGrid in a Parent/Child relationship.

Hi,

For some reason the parent/child link does not quite work for me. In the Northwind database when I click on say OrderID 10248 -it also populates the order details of OrderID 10248 to all the other OrderID's (i.e. 10249, 10250 etc.). What I am doing wrong...?

Thanks in advance!

/J

The sample code is included below:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" 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">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.Core.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.jQuery.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.jQueryInclude.js">
            </asp:ScriptReference>
        </Scripts>
    </telerik:RadScriptManager>
    <div>
         
        <telerik:RadGrid ID="RadGrid1" runat="server" CellSpacing="0"
            DataSourceID="SqlDataSource1" GridLines="None">
<MasterTableView AutoGenerateColumns="False" DataKeyNames="OrderID"
                DataSourceID="SqlDataSource1">
 
<ParentTableRelation>
                <telerik:GridRelationFields DetailKeyField="OrderID"
                    MasterKeyField="OrderID" />
                    </ParentTableRelation>
    <NestedViewTemplate>
        <asp:DataList ID="DataList1" runat="server" DataKeyField="OrderID"
            DataSourceID="SqlDataSource2">
            <ItemTemplate>
                OrderID:
                <asp:Label ID="OrderIDLabel" runat="server" Text='<%# Eval("OrderID") %>' />
                <br />
                ProductID:
                <asp:Label ID="ProductIDLabel" runat="server" Text='<%# Eval("ProductID") %>' />
                <br />
                UnitPrice:
                <asp:Label ID="UnitPriceLabel" runat="server" Text='<%# Eval("UnitPrice") %>' />
                <br />
                Quantity:
                <asp:Label ID="QuantityLabel" runat="server" Text='<%# Eval("Quantity") %>' />
                <br />
                Discount:
                <asp:Label ID="DiscountLabel" runat="server" Text='<%# Eval("Discount") %>' />
                <br />
<br />
            </ItemTemplate>
        </asp:DataList>
    </NestedViewTemplate>
     
    <NestedViewSettings DataSourceID="SqlDataSource2">
        <ParentTableRelation>
            <telerik:GridRelationFields DetailKeyField="OrderID"
                MasterKeyField="OrderID" />
        </ParentTableRelation>
    </NestedViewSettings>
 
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
 
<RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>
 
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
 
    <Columns>
        <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32"
            FilterControlAltText="Filter OrderID column" HeaderText="OrderID"
            ReadOnly="True" SortExpression="OrderID" UniqueName="OrderID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="CustomerID"
            FilterControlAltText="Filter CustomerID column" HeaderText="CustomerID"
            SortExpression="CustomerID" UniqueName="CustomerID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="EmployeeID" DataType="System.Int32"
            FilterControlAltText="Filter EmployeeID column" HeaderText="EmployeeID"
            SortExpression="EmployeeID" UniqueName="EmployeeID">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="OrderDate" DataType="System.DateTime"
            FilterControlAltText="Filter OrderDate column" HeaderText="OrderDate"
            SortExpression="OrderDate" UniqueName="OrderDate">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="RequiredDate" DataType="System.DateTime"
            FilterControlAltText="Filter RequiredDate column" HeaderText="RequiredDate"
            SortExpression="RequiredDate" UniqueName="RequiredDate">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ShippedDate" DataType="System.DateTime"
            FilterControlAltText="Filter ShippedDate column" HeaderText="ShippedDate"
            SortExpression="ShippedDate" UniqueName="ShippedDate">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ShipVia" DataType="System.Int32"
            FilterControlAltText="Filter ShipVia column" HeaderText="ShipVia"
            SortExpression="ShipVia" UniqueName="ShipVia">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="Freight" DataType="System.Decimal"
            FilterControlAltText="Filter Freight column" HeaderText="Freight"
            SortExpression="Freight" UniqueName="Freight">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ShipName"
            FilterControlAltText="Filter ShipName column" HeaderText="ShipName"
            SortExpression="ShipName" UniqueName="ShipName">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ShipAddress"
            FilterControlAltText="Filter ShipAddress column" HeaderText="ShipAddress"
            SortExpression="ShipAddress" UniqueName="ShipAddress">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ShipCity"
            FilterControlAltText="Filter ShipCity column" HeaderText="ShipCity"
            SortExpression="ShipCity" UniqueName="ShipCity">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ShipRegion"
            FilterControlAltText="Filter ShipRegion column" HeaderText="ShipRegion"
            SortExpression="ShipRegion" UniqueName="ShipRegion">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ShipPostalCode"
            FilterControlAltText="Filter ShipPostalCode column" HeaderText="ShipPostalCode"
            SortExpression="ShipPostalCode" UniqueName="ShipPostalCode">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="ShipCountry"
            FilterControlAltText="Filter ShipCountry column" HeaderText="ShipCountry"
            SortExpression="ShipCountry" UniqueName="ShipCountry">
        </telerik:GridBoundColumn>
    </Columns>
 
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
</EditFormSettings>
</MasterTableView>
 
<FilterMenu EnableImageSprites="False"></FilterMenu>
        </telerik:RadGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
            ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
            SelectCommand="SELECT * FROM [Orders]"></asp:SqlDataSource>
 
        <asp:SqlDataSource ID="SqlDataSource2" runat="server"
            ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
            SelectCommand="SELECT OrderID, ProductID, UnitPrice, Quantity, Discount FROM [Order Details] WHERE (OrderID = @OrderID)">
            <SelectParameters>
                <asp:Parameter Name="OrderID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>



Eyup
Telerik team
 answered on 19 Aug 2015
1 answer
139 views

Hello,

 

I am having trouble programmatically accessing a DataList control from within a NestedViewTemplate. I need to be able to pass a parent-grid data key item to an SQL connection and then data bind the results to the DataList in the code-behind. However, I am unable to find the DataList control and bind to it. Do you have any relevant information to assist me?

 

Thanks,

Bethany

Eyup
Telerik team
 answered on 19 Aug 2015
3 answers
131 views

Hi,

     I've specific set of requirements for Bubble Chart. How can I add average X and Y lines to bubble chart as shown in the attached image. Is this something possible in Telerik HTML Chart? Is there a hack which can draw these average lines.

Thanks

MT

 

Danail Vasilev
Telerik team
 answered on 19 Aug 2015
1 answer
91 views

I did this using your this answer .......
But I try to implement update functionality like below 

 

    transport : {
                        update: {
                           
                            url: function (item) {
                               
                                return "myURL" + item.id;
                            },
                            contentType: "application/json; charset=utf-8",
                            dataType: "json",
                            type: "put"
                        }
                    }

 

But when I press update button It did not trigger  the update function..

Where should I look at ??

 

Thank you

 

Boyan Dimitrov
Telerik team
 answered on 19 Aug 2015
1 answer
82 views

I have a master view with two child views.  I would like to have command buttons on the master row which cause an expand to happen to one or the other child tables.  When I handle the ItemCommand event, I hide set all detail tables to Visible=False but they are still visible on the output.

I've tried setting the expanded and visibility of the detail tables right within the ItemCommand event like this:

 

if (e.CommandName == "ExpandSomething")
{
    item.Expanded = true;
    foreach (var table in MyGrid.MasterTableView.DetailTables)
        if (table.Name != "Something")
            table.Visible = false;
}
 

Then I thought maybe the hiding needed to be done later in the event cycle so I tried it like this: 

 

private string _activeChildView = null;
protected void ShowSingleChildTable(string name) //this is called from item command
{
    _activeChildView = name;
}
 
private void Page_PreRender(object sender, EventArgs e)
{
    if (_activeChildView != null)
        foreach (var table in AdminGrid.MasterTableView.DetailTables)
            if (table.Name != _activeChildView)
                table.Visible = false;
}

Neither way works - both grids are always visible.

In playing around with different events, I've found that the DataBinding event is the only place that setting the visibility to false works, but unfortunately that fires before the ItemCommand so I can't figure out if a detail button was pressed.

Kostadin
Telerik team
 answered on 19 Aug 2015
1 answer
165 views

Hi Team,

I have created a Radgrid dynamically which has a "GridNumericColumn" for numeric operation, also I set its properties like "DecimalDigits = 4" ,"DataFormatString = "{0:f4}"" AllowRounding = false and KeepNotRoundedValue = true;

My intention is, the user should not allow to enter more than 4 decimals in edit mode. but It allowing the user to enter more than 4 decimals in edit mode!

Is there any possibility to restrict alow  more than 4 decimals  ?

Note : My grid has more numeric columns with different decimals.(example 2, 3 and 4 ,like 12.12 , 23.234 and   12.1234)

Regards,

Ramesh.

Eyup
Telerik team
 answered on 19 Aug 2015
3 answers
519 views

Hello Team,
I am using Radgrid, that is having more then 160,000 records with 46 columns. The version I am using is ASP.NET AJAX Q3 2013 SP2 (version 2013.3.1324). Excel version is 2013. Export to excel is not working and generate 'System.OutOfMemoryException". I believe Excel 2013 worksheet size hold close to a million rows. Is there any workaround ? See snippet of my code below. I created the grid dynamically

Can anyone help me out with this? Is there any limitation exporting excel or csv from Radgrid with this record size? 

Thanks

Dan​

     private void CreateDetailGrid()
        {
            GridDetailResults.ID = "GridDetailResults";
            GridDetailResults.Columns.Clear();
            GridDetailResults.AutoGenerateColumns = false;
            GridDetailResults.GridLines = GridLines.Both;
            GridDetailResults.AllowSorting = GridDetailResults.AllowPaging = GridDetailResults.AllowSorting = true;
            GridDetailResults.AllowFilteringByColumn = true;
            GridDetailResults.Skin = "Default";
            GridDetailResults.HeaderStyle.Font.Underline = false;
            GridDetailResults.GroupingSettings.CaseSensitive = false;
            GridDetailResults.EnableLinqExpressions = false;
            GridDetailResults.Height = new Unit("400px");

            //Mastertableview settings
            GridDetailResults.MasterTableView.EnableNoRecordsTemplate = true;
            //GridDetailResults.MasterTableView.ShowHeader = true;
            GridDetailResults.MasterTableView.ShowHeadersWhenNoRecords = false;
            GridDetailResults.MasterTableView.CommandItemSettings.ShowExportToExcelButton = true;
            GridDetailResults.MasterTableView.CommandItemSettings.ShowExportToCsvButton = true;
            GridDetailResults.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
            GridDetailResults.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = false;
            GridDetailResults.MasterTableView.CommandItemSettings.ShowRefreshButton = false;

            // paging style
            GridDetailResults.MasterTableView.PagerStyle.AlwaysVisible = true;
            GridDetailResults.MasterTableView.PagerStyle.PageSizeControlType = PagerDropDownControlType.RadDropDownList;

            // Export setting
            GridDetailResults.ExportSettings.HideStructureColumns = true;
            GridDetailResults.ExportSettings.UseItemStyles = true;
            GridDetailResults.ExportSettings.IgnorePaging = true;          
            GridDetailResults.ExportSettings.OpenInNewWindow = true;
            GridDetailResults.ExportSettings.Excel.Format = GridExcelExportFormat.Html;            
            GridDetailResults.ExportSettings.ExportOnlyData = true;


            //Events
            GridDetailResults.NeedDataSource += GridDetailResults_OnNeedDataSource;


            GridDetailResults.ItemStyle.BackColor = Color.FromName("#DFDFDF");
            GridDetailResults.HeaderStyle.BackColor = Color.FromName("#FFFFFF");
            GridDetailResults.HeaderStyle.ForeColor = Color.FromName("#767676");
            GridDetailResults.AlternatingItemStyle.BackColor = Color.FromName("#FFFFFF");
            GridDetailResults.HeaderStyle.HorizontalAlign = HorizontalAlign.Left;
            GridDetailResults.FilterItemStyle.HorizontalAlign = HorizontalAlign.Left;

            GridDetailResults.ClientSettings.Scrolling.AllowScroll = true;
            GridDetailResults.ClientSettings.Scrolling.SaveScrollPosition = true;
            GridDetailResults.ClientSettings.Scrolling.UseStaticHeaders = true;
            GridDetailResults.ClientSettings.Scrolling.FrozenColumnsCount = 2;                 


            if (AllDimTable == null)
                AllDimTable = BusMethods.GetAllDimList();

 

Maria Ilieva
Telerik team
 answered on 19 Aug 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?