Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
147 views
An extra column, or what seems to be a column, is being rendered on the far left...This could be a css issue perhaps? I am fairly new and an Intern. Check out the screen shot I have provided.

Any help is greatly appreciated! 
Daniel
Top achievements
Rank 1
 answered on 17 Jun 2014
2 answers
131 views
Hi guys,
I have node editing enabled on my treeview. Is there any way to disable editing on clicking the node itself.
I have editing working as standard and with a button at the moment but I want it working with the button only.
Thanks,
Tommy
Princy
Top achievements
Rank 2
 answered on 17 Jun 2014
10 answers
705 views
Hello:

I have a fairly simple page which pulls the MasterTableView data from one dataset and the DetailTables data from another dataset.

Exporting to Excel with hierarchy works in normal Excel mode. However, a new requirement is that the parent headers have background shading. Using ExcelML will not export with the hierarchy; only the parent rows get exported.

I am using version 2008.01.0618.20 currently after upgrading from 2008.01.0415.20.

The ASPX page looks like this:
<MasterTableView DataKeyNames="fooData" Name="fooName" HierarchyLoadMode="ServerBind" HierarchyDefaultExpanded="true" AllowPaging="true" UseAllDataFields="true" CanRetrieveAllData="true"
  <DetailTables> 
    <telerik:GridTableView runat="server" Name="Details" DataKeyNames="fooDetail" Width="100%" HierarchyDefaultExpanded="true"
      <ParentTableRelation> 
        <telerik:GridRelationFields DetailKeyField="fooDetail" MasterKeyField="fooData" /> 
      </ParentTableRelation> 
      <Columns> 
 
Etc...



And, in the code-behind:

RadGrid.ExportSettings.FileName = "fooData" 
RadGrid.ExportSettings.Excel.Format = GridExcelExportFormat.ExcelML 
RadGrid.ExportSettings.IgnorePaging = "true" 
RadGrid.ExportSettings.ExportOnlyData = "true" 
 
'This code block worked for regular Excel export 
For Each gi As GridItem In RadGrid.Items 
  gi.Expanded = True 
Next 
 
RadGrid.MasterTableView.ExportToExcel() 

This code worked perfectly for regular Excel but not for ExcelML.
The only difference is that I added the following line, which is required:
RadGrid.ExportSettings.ExportOnlyData = "true"

Thank You,
Romany
Asutosh
Top achievements
Rank 1
 answered on 17 Jun 2014
3 answers
246 views
Hi.

I have stumbled over a bug (Atleast i think its one).
I want to expert my nested table view into excel. (excel-format: ExcelML)
Word, CSV and Excel with format Html works fine.

But ExcelML crashes with a null exception.

ASPX.Page:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestGrid.aspx.cs" Inherits="TestGrid" %>
 
<!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="ScriptManager" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadGrid runat="server" ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource"
        EnableLinqExpressions="false">
        <ExportSettings HideStructureColumns="true" ExportOnlyData="true" IgnorePaging="true"
            Excel-Format="ExcelML" />
        <PagerStyle Mode="NumericPages" AlwaysVisible="true" />
        <GroupingSettings CaseSensitive="false" />
        <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true"
            DataKeyNames="ID, PARENT_ID" CommandItemDisplay="Top" AllowMultiColumnSorting="True"
            EditMode="InPlace" HierarchyLoadMode="Client" FilterExpression="PARENT_ID = 0 or PARENT_ID IS NULL">
            <CommandItemTemplate>
                <asp:Button  ID="ExportToExcelButton" runat="server"
                    CommandName="ExportToExcel" Text="Export to Excel" />
                <asp:Button  ID="ExportToWordButton" runat="server"
                    CommandName="ExportToWord" Text="Export to Word" />
                <asp:Button  ID="ExportToCsvButton" runat="server"
                    CommandName="ExportToCsv" Text="Export to Csv" />
            </CommandItemTemplate>
            <SelfHierarchySettings ParentKeyName="PARENT_ID" KeyName="ID" MaximumDepth="0" />
            <Columns>
                <telerik:GridBoundColumn DataField="ID" />
                <telerik:GridBoundColumn DataField="PARENT_ID" />
                <telerik:GridBoundColumn DataField="NAME" />
            </Columns>
        </MasterTableView>
    </telerik:RadGrid>
    </form>
</body>
</html>

ASPX.CS Code Page:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Telerik.Web.UI;
 
    public partial class TestGrid : System.Web.UI.Page
    {
 
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        private DataTable GetDataTable()
        {
            DataTable returnValue = new DataTable();
 
            returnValue.Columns.Add("ID");
            returnValue.Columns.Add("PARENT_ID");
            returnValue.Columns.Add("NAME");
 
            DataRow row = returnValue.NewRow();
            row["ID"] = 1;
            row["PARENT_ID"] = 0;
            row["NAME"] = "Parent A";
            returnValue.Rows.Add(row);
 
            row = returnValue.NewRow();
            row["ID"] = 2;
            row["PARENT_ID"] = 1;
            row["NAME"] = "Child A";
            returnValue.Rows.Add(row);
 
            row = returnValue.NewRow();
            row["ID"] = 3;
            row["PARENT_ID"] = 1;
            row["NAME"] = "Child B";
            returnValue.Rows.Add(row);
 
            row = returnValue.NewRow();
            row["ID"] = 4;
            row["PARENT_ID"] = 1;
            row["NAME"] = "Child C";
            returnValue.Rows.Add(row);
 
            row = returnValue.NewRow();
            row["ID"] = 5;
            row["PARENT_ID"] = 0;
            row["NAME"] = "Parent B";
            returnValue.Rows.Add(row);
 
            return returnValue;
        }
 
        protected void RadGrid1_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = GetDataTable();
        }
    }

Asutosh
Top achievements
Rank 1
 answered on 17 Jun 2014
1 answer
225 views
I have a RadPanel on my page:

            <telerik:RadPanelBar runat="server" ID="RadPanelBar1" ExpandMode="MultipleExpandedItems" Width="95%">
            </telerik:RadPanelBar>        

I dynamically add RadPanelItems to it in code behind that have a custom user control in it:
   foreach(xxx)
  {
                    RadPanelItem newPanelItem = new RadPanelItem("Header Text");
                    RadPanelItem childPanelItem = new RadPanelItem();

                    childPanelItem.Controls.Add(LoadControl("xxx.ascx"));
                    ctrl.LoadData();

                    newPanelItem.Items.Add(childPanelItem);
                    newPanelItem.Width = Unit.Percentage(100);
                    RadPanelBar1.Items.Add(newPanelItem);
  }

The LoadData method fills a grid in the user control. In my development this creates 5 collapsible RadPaneltems as expected. However, the width of the PanelBar isn't working correctly. As you can see it's set to 95% but when I run it seems to collapse down to the size of the header text. When I expand on of the panel items, the width indeed increases to the size of the panel item content (based on the grid). It's like the PanelBar can't figure out it's width based on its PanelItems because they are dynamically added.

Without setting the width to a fixed size, how can I get the PanelBar to fill 95% of its container so it doesn't shrink?
Nencho
Telerik team
 answered on 17 Jun 2014
1 answer
169 views
HI,

IS there any way to download rad chart and HTML chart in Excel using Rad grid 
Danail Vasilev
Telerik team
 answered on 17 Jun 2014
1 answer
94 views
Hi,
I am new to RAD controls, I have to create application having bellow functinality
1. RAD grid having 4 RAD combo columns and 1 Lable columns
2. RAD combo of column 2 will depend on value selected in RAD combo of column 1 and Column 3 will depend on value selected in column 1 & 2 
3. User should be able to add new row (single row) and should be able to do batch update
4. Databinding will be done on code behind.

Please let me know how to do this.


Shinu
Top achievements
Rank 2
 answered on 17 Jun 2014
3 answers
139 views
Hi,

I have an issue for grid footers being out of alignment when displayed in IE7. This affects IE7 only and is fine in all other versions of IE and all other browsers. The calculated footer is shown on three lines and in IE7 does not start until beyond the last grid column.

You can see the behaviour by logging into http:\\www.professtm.co.uk?token=demo555 using DGP and the password of DGP

Thanks
Pavlina
Telerik team
 answered on 17 Jun 2014
4 answers
153 views
Hi,
Is there a way to populate with telerik:GridDropDownColumn with a DataSet?
thanks
virendra
Princy
Top achievements
Rank 2
 answered on 17 Jun 2014
4 answers
356 views
The RadComboBox control is posting back twice in the following scenario.

-2 combo boxes
-both configured in checkbox mode
-both of which are configured to post back automatically
-AJAXified using the RadAjaxManager control with the first combo box having the second as an updated control (changing the selection in combo box one updates the items in combo box 2)
-empty message is set, oddly enough the problem doesn't happen when the empty message is not set

I did some stepping through the Telerik client code and can see that a postback is done twice for the TextChanged event, once when the _selectItemOnBlur method is called (even though it is checkbox mode) and then again after that.  When the control is working normally it doesn't do the second postback.  The effect of the second postback causes a full postback while the first is a partial.  The problem doesn't start until after the second change to checked list.

To reproduce:
-check 1, 2, and 3 in the 2nd combo box and click off the combo box so that it posts back
-uncheck 3 in the 2nd combo box and click off the combo box so that it posts back
-at this point it should do 2 post backs as seen by putting a breakpoint in the ramAjaxManager_OnRequestStart event handler or in the code behind (one of which is actually not even detected as postback by ASP.NET)


Controls version: 2013.2.717.40
Browser tested: IE 11


<telerik:RadAjaxManager ID="ramAjaxManager" ClientEvents-OnRequestStart="ramAjaxManager_OnRequestStart" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ddlTestOne">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ddlTestTwo" />
                    <telerik:AjaxUpdatedControl ControlID="ltrTest" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ddlTestTwo">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="ltrTest" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    
    <telerik:RadComboBox ID="ddlTestOne" EmptyMessage="Test 1" CheckBoxes="True" OnSelectedIndexChanged="lstTestOne_OnSelectedIndexChanged" AutoPostBack="True" runat="server" />                        
    <telerik:RadComboBox ID="ddlTestTwo" EmptyMessage="Test 2" CheckBoxes="True" OnSelectedIndexChanged="lstTestTwo_OnSelectedIndexChanged" AutoPostBack="True" runat="server" />                        

    <asp:Literal ID="ltrTest" runat="server" />  


        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindTestOneData();
                BindTestTwoData();
            }
        }

        protected void lstTestOne_OnSelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            ltrTest.Text = String.Format("lstTestOne_OnSelectedIndexChanged: Old text: {0}, New text: {1}", e.OldText, e.Text);
        }

        protected void lstTestTwo_OnSelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            ltrTest.Text = String.Format("lstTestTwo_OnSelectedIndexChanged: Old text: {0}, New text: {1}", e.OldText, e.Text);
        }

        public void BindTestOneData()
        {
            ddlTestOne.DataSource = Enumerable.Range(1, 8).Select(r => new { Value = r, Text = r });
            ddlTestOne.DataValueField = "Value";
            ddlTestOne.DataTextField = "Text";
            ddlTestOne.DataBind();            
        }

        public void BindTestTwoData()
        {
            ddlTestTwo.DataSource = Enumerable.Range(1, 8).Select(r => new { Value = r, Text = r });
            ddlTestTwo.DataValueField = "Value";
            ddlTestTwo.DataTextField = "Text";
            ddlTestTwo.DataBind();
        }
Princy
Top achievements
Rank 2
 answered on 17 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?