Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
94 views
Hello,
I am using a Rad Editor control on my webpage. I am using custom CSS file to populate the styles classes in "Apply CSS" drop down. The issue i am facing is IE specific. In my CSS file i have some classes defined as

h3,.style1{
font-weight: bold;
font-size: 14px;
color: #000000;
}


This works fine in all browsers except in IE, it displays two classes :-
style1 - this refers to h3,.style1
style1 - this refers to .style1

Please let me know how can i fix this.

Thanks
Sumit
Ianko
Telerik team
 answered on 13 Sep 2013
1 answer
115 views
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 System.Data.SqlClient;
using System.Drawing;
using System.Collections;
using Telerik.Web.UI;
using System.IO;
using System.Web.Services;
 
namespace My_Workshop.A4f
{
    public partial class DataSource : System.Web.UI.Page
    {
        public AllClass AllClass = new AllClass(); SqlConnection con = AllClass.dbConnection();
        //获取页码
        public void getcnt()
        {
            AllClass.SearchDef Def = new AllClass.SearchDef();
            Def.AssPat = this.RadAssPat; Def.Business = this.RadBusi; Def.ProSeries = this.RadPro; Def.PtoTyp = this.RadPtoTyp;
            Def.Disposal = this.RadDisposal1; Def.DefMat = this.RadDefMat; Def.STimd = this.TxtSTim.Text; Def.OTimd = this.TxtOTim.Text;
            Def.ProCode = this.RadProCode; Def.Modul = this.RadModul; Def.CusCode = this.RadCusCode; Def.CityOffice = this.RadCityOffice;
            Def.PlantCode = this.RadPlantCode; Def.OilWay = this.RadOilWay.Text; Def.AssPlant = this.RadAssPlant1;
            Def.AssPatCod = this.RadPat; Def.STima = this.TxtSTima.Text; Def.OTima = this.TxtOTima.Text;
            string sc = "select count(*) from tbDef where(1=1) " + AllClass.getwdd(Def);
            ViewState["cnt"] = AllClass.ExecuteScalar(sc, con).ToString();
        }
        //显示
        public void show(int currentpage)
        {
            AllClass.SearchDef Def = new AllClass.SearchDef();
            Def.AssPat = this.RadAssPat; Def.Business = this.RadBusi; Def.ProSeries = this.RadPro; Def.PtoTyp = this.RadPtoTyp;
            Def.Disposal = this.RadDisposal1; Def.DefMat = this.RadDefMat; Def.STimd = this.TxtSTim.Text; Def.OTimd = this.TxtOTim.Text;
            Def.ProCode = this.RadProCode; Def.Modul = this.RadModul; Def.CusCode = this.RadCusCode; Def.CityOffice = this.RadCityOffice;
            Def.PlantCode = this.RadPlantCode; Def.OilWay = this.RadOilWay.Text; Def.AssPlant = this.RadAssPlant1;
            Def.AssPatCod = this.RadPat; Def.STima = this.TxtSTima.Text; Def.OTima = this.TxtOTima.Text;
            int pagesize = this.RadDataPager1.PageSize;
            string sw = AllClass.getwdd(Def);
            string s = "select top " + pagesize +
    "DefID,MendDat,Business,OilSystem,CusNam,AssDat,AssPlant,DefMat,ProSeries,AssPatCod,AssPat,Disposal,Modul,PlantNam from tbDef where DefID not in(select top " + pagesize * (currentpage) +
    " DefID from tbDef where(1=1) " + sw + "order by DefID desc)" + AllClass.getwdd(Def) + "order by DefID desc";
            AllClass.showdata0(s, con, this.RadGrid2);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ((Label)(this.Page.Master.FindControl("LblSitMap"))).Text = "故障明细管理";
                this.TxtOTim.Text = DateTime.Now.ToString("yyyy-MM-dd");
                this.TxtSTim.Text = DateTime.Now.ToString("yyyy-01-01");
                DataTable dtt = new DataTable();
                this.RadGrid2.MasterTableView.NoMasterRecordsText = "欢迎您!";
                this.RadGrid2.DataSource = dtt;
                this.RadGrid2.DataBind();
                dtt.Dispose();
            }
 
 
        }
 
        protected void tb_ButtonClick(object sender, Telerik.Web.UI.RadToolBarEventArgs e)
        {
            switch (e.Item.Text)
            {
                case "查询":
                    getcnt();
                    show(this.RadDataPager1.CurrentPageIndex);                    
                    break;
                default:
                    break;
            }
        }
        protected void RadGrid2_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
            {              
                e.Item.Attributes.Add("OnDblClick", "window.radopen('DataView/DefDetail.aspx?DefID=" +
                    this.RadGrid2.MasterTableView.DataKeyValues[e.Item.ItemIndex]["DefID"]+ "', 'RadWindow1');");
            }
        }
         
 
        protected void RadDataPager1_TotalRowCountRequest(object sender, RadDataPagerTotalRowCountRequestEventArgs e)
        {
            e.TotalRowCount = Convert.ToInt32(ViewState["cnt"]);
        }
        protected void RadDataPager1_PageIndexChanged(object sender, RadDataPagerPageIndexChangeEventArgs e)
        {
            show(e.NewPageIndex);
        }
 
        string GenerateButtonText(string argument)
        {
            return String.Format("<span>{0}</span>", int.Parse(argument) + 1);
        }
 
        protected void RadDataPager1_FieldCreated(object sender, RadDataPagerFieldCreatedEventArgs e)
        {
            if (e.Item.Field is RadDataPagerButtonField && (e.Item.Field as RadDataPagerButtonField).FieldType == PagerButtonFieldType.Numeric)
                foreach (IButtonControl ctrl in e.Item.Controls)
                    ctrl.Text = GenerateButtonText(ctrl.CommandArgument);
        }
 
    }
}
public void showdata0(string s, SqlConnection con, RadGrid gv)
        {
            DataTable dt = AllClass.dt(s, con);
            gv.DataSource = dt;
            gv.DataBind();
            dt.Dispose();
        }
I got this Exception"RegisterRequiresControlState can only be called before and during PreRender."but asp:gridview works well
Daniel
Telerik team
 answered on 13 Sep 2013
1 answer
104 views
An error is found when calling client side method resetZoom on the Chart control.  Up to version 2013.2.611.45 everything was working fine but since the apply of the release 2013.2.903.45 the function call return an error.

Unhandled exception at line 15, column 16485 in http://localhost:49162/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=radScriptManager_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:c9cbdec3-c810-4e87-846c-fb25a7c08002:ea597d4b:b25378d2;Telerik.Web.UI,+Version=2013.2.903.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:57d8db9c-03e9-4d79-85fa-5fff26620928:16e4e7cd:86526ba7:874f8ea2:ed16cbdc:f7645509:24ee1bba:e330518b:2003d0b8:1e771326:c8618e41:f46195d3:aa288e2d:19620875:cda80b3:383e4ce8:a51ee93e:59462f1:7165f74:7918c3fa
 
0x800a139e - JavaScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
 
Details: Error parsing near '
 
 
 
<html xmlns="htt'.
Thanks in advance
Stephane
Petar Kirov
Telerik team
 answered on 13 Sep 2013
4 answers
111 views
Hello all.

I want the user to select a master data record (in a RadWindow) and fill most of the grid fields from that selection. At the moment it is solved by having an additional button outside the grid. Technically okay and working. But it is quite ugly and the user won't understand why there are buttons (save and refresh) inside and one outside.

The solution "put all buttons outside the grid" is not the elegant way. So I studied the documentation http://www.telerik.com/help/aspnet-ajax/grid-batch-editing.html

But I found no way to intercept, modify or override the add new record buttons behaviour.

Is there really no elegant way to have a custon insert routine?

Kind regards
Bernd
Bernd
Top achievements
Rank 2
 answered on 13 Sep 2013
2 answers
283 views
ASP .NET AJAX Q3 2012

I have a simple grid with a MasterTableView, some columns at that level, and then a child DetailTable/GridTableView.
I need a modal popup on the child GridTableView. 
I set this on the GridTableView:  EditMode=PopUp and <EditFormSettings EditFormType="AutoGenerated" PopUpSettings-Modal="true"></EditFormSettings>

When I click the edit icon for a row in the GridTableView, the modal popup appears, but the background is NOT greyed-out, and the controls "behind" the popup are available to the user. The popup is NOT modal.

If I instead change things so the MasterTableView has EditMode=PopUp and the EditFormSettings are at the MasterTableView level (just like your demos) the popup opens and displays as it should, modally and with the grey background.

Please validate that this is a bug, how I can get it fixed or if there is a work around or other ways to achieve what I'm trying to do.


Deborah
Top achievements
Rank 1
 answered on 13 Sep 2013
2 answers
106 views

We recently updated our ASP.NET AJAX controls from version 2012.03.1017.0 to 2013.02.717.0. Something that I noticed is that a telerik:GridBoundColumn with Visisble="false" would still bind and be accessible from the code behind with the older control, but no longer binds with the new control. Is this a known change or perhaps an unintended side effect?

By the way, the fix for this in our case was easy- we simply used a datakey instead of a hidden bound column.

Thank you.
Trey
Top achievements
Rank 1
 answered on 13 Sep 2013
3 answers
134 views
In IE10 when I include a LoadingPanel in either RadAjaxPanel or RadAjaxManager, a button click that should produce an AJAX callback, does nothing. If I switch to compatibility view, then the button click works properly. (I saw the sticky, but it seems to be directed at older browsers.)

Below is a simplified page that demonstrated the problem using both a LoadingPanel and RadAjaxPanel .

<asp:ScriptManager ID="ScriptManager1" runat="server" EnableTheming="True"></asp:ScriptManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server"></telerik:RadAjaxLoadingPanel>

   
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" style="margin:40px;" LoadingPanelID="RadAjaxLoadingPanel1" >

    RadAjaxPanel test:

    <asp:Button id="Button1" runat="server" text="Test 1" onclick="Button1_click" />

    <br /> <br /> <asp:Label ID="timestamp1" runat="server"></asp:Label>

</telerik:RadAjaxPanel>

 

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

   <AjaxSettings>

     <telerik:AjaxSetting AjaxControlID="Button2">

       <UpdatedControls>

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

       </UpdatedControls>

     </telerik:AjaxSetting>

   </AjaxSettings>

</telerik:RadAjaxManager>

<asp:panel ID="AjaxPanel" runat="server" style="margin:40px;">

     RadAjaxManager test:

     <asp:Button id="Button2" runat="server" text="Test 2" onclick="Button2_click" />

     <br /><br />

     <asp:Label ID="timestamp2" runat="server"></asp:Label>

</asp:panel>

 

And here's the codebehind for the buttons:

Sub Button1_click(ByVal sender As Object, ByVal e As System.EventArgs)

   timestamp1.Text += "<br>" & Now

End Sub

Sub Button2_click(ByVal sender As Object, ByVal e As System.EventArgs)

   timestamp2.Text += "<br>" & Now

End Sub

This page works in Chrome, FF, older versions of IE, and IE10 compatibility view, but not in plain IE10. As soon as I remove the LoadingPanel, then it also works in plain IE10.

I assume I've overlooked something simple. But I can't find it. Any help would be appreciated!

Cheri
 

 

 

 

 

Deyan Enchev
Telerik team
 answered on 13 Sep 2013
2 answers
329 views
I am using Chart to create a small sparkline chart in a grid column.  Works great but I can't figure out how to get a truly transparent background on the chart.  I am setting colors thusly:

chart.PlotArea.Appearance.FillStyle.MainColor =

Color.Transparent;

 

chart.PlotArea.Appearance.FillStyle.SecondColor =

Color.Transparent;

 


But when the chart is displayed on an alternating color row the background of the chart is white, not transparent.
Venelin
Telerik team
 answered on 13 Sep 2013
4 answers
248 views
Hi,

I'm following this example http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/exporting/defaultcs.aspx#qsf-demo-source
and put the relevant code into my project.
I can't see the export buttons appearance!

I added this   
<script type="text/javascript">
        function onRequestStart(sender, args) {
            if (args.get_eventTarget().indexOf("ExportTo") >= 0) {
                args.set_enableAjax(false);
            }
        }
 </script>

and this in my Radgrid:

                <telerik:RadGrid ID="RadGrid3" runat="server" CellSpacing="0" AllowFilteringByColumn="True"
                    DataSourceID="dsMaterial" GridLines="None" AllowPaging="True" Skin="Default" AutoGenerateColumns="false" OnItemCommand="RadGrid3_ItemCommand">
                    <ClientSettings>
                        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                    </ClientSettings>
                    <ExportSettings IgnorePaging="true" OpenInNewWindow="true">
                    </ExportSettings>
                    <MasterTableView DataSourceID="dsMaterial" DataKeyNames="IDMaterial">
                        <DetailTables>
                            <telerik:GridTableView DataKeyNames="IDMaterial" DataSourceID="dsMaterialExtra" runat="server" AllowFilteringByColumn="false">
                                <ParentTableRelation>
                                    <telerik:GridRelationFields DetailKeyField="IDMaterial" MasterKeyField="IDMaterial">
                                    </telerik:GridRelationFields>
                                </ParentTableRelation>
                                <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true"
                                    ShowExportToCsvButton="true" ShowExportToPdfButton="true">
                                </CommandItemSettings>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="TopArticle" HeaderText="Top Article">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="MaterialGroup" HeaderText="Material Group">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="Replaceability" HeaderText="Replaceability">
                                    </telerik:GridBoundColumn>
                                </Columns>
                            </telerik:GridTableView>
                        </DetailTables>
                        <CommandItemSettings ExportToPdfText="Export to PDF" ShowExportToPdfButton="true" ShowExportToCsvButton="true"
                            ShowExportToExcelButton="true" ShowExportToWordButton="true" />
                        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" Visible="True"
                            Created="True">
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridBoundColumn DataField="OldNumber" FilterControlAltText="Filter OldNumber column"
                                HeaderText="Old material number" SortExpression="OldNumber" UniqueName="OldNumber"
                                CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="NewNumber" FilterControlAltText="Filter NewNumber column"
                                HeaderText="New material number" SortExpression="NewNumber" UniqueName="NewNumber"
                                CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="TopArticle" FilterControlAltText="Filter TopArticle column"
                                HeaderText="Top article" SortExpression="TopArticle" UniqueName="TopArticle"
                                AllowFiltering="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="MaterialGroup" FilterControlAltText="Filter MaterialGroup column"
                                HeaderText="Group" SortExpression="MaterialGroup" UniqueName="MaterialGroup"
                                AllowFiltering="false">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Replaceability" FilterControlAltText="Filter Replaceability column"
                                HeaderText="Replaceability" SortExpression="Replaceability" UniqueName="Replaceability"
                                AllowFiltering="false">
                            </telerik:GridBoundColumn>
                        </Columns>
                        <EditFormSettings>
                            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                            </EditColumn>
                        </EditFormSettings>
                        <PagerStyle PageSizeControlType="RadComboBox" />
                    </MasterTableView>
                    <PagerStyle PageSizeControlType="RadComboBox" />
                    <FilterMenu EnableImageSprites="False">
                    </FilterMenu>
                </telerik:RadGrid>

Code behind:

        protected void RadGrid3_ItemCommand(object sender, 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()
        {
            //Do some further config here
        }



What is missing?

Cheers,
Per
Per
Top achievements
Rank 1
 answered on 13 Sep 2013
4 answers
221 views
QR
Hi,
I've tested your QR Code Generator.
If i set an ECI Encoding, the QR Code doesn't work on Windows Phone with standard bing QR Code Scanner. If i set ECI Encoding to None all works fine. On Android or IOS Devices there aren't any problems.
Windows Phone is supporting different Encoding Types. I testet it on http://zxing.appspot.com/generator/ and this is working fine (UTF-8, or ISO-8859-1).
Any idea why this is not working?

Is it also possible that you implement UTF-8 encoding?

BR

Marin
Telerik team
 answered on 13 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?