Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
70 views
Hi

This isn't specifically for the Telerik guys, rather the community. Does anyone have any ideas how I would query the database to find either recurring events, or rooms that don't have events, when taking into consideration recurring events?

Andy
Boyan Dimitrov
Telerik team
 answered on 28 Nov 2014
5 answers
416 views
Hi

I've created a completely standard, empty web project in VS 2012 / 2013 - and the 2013 version doesnt allow me to see the png sprites and style sheets that _should_ be served by WebResource.axd. The Telerik.Web.UI.WebResource.axd requests seem to work just fine. 

In both projects I've referenced the Bin45 versions of Telerik.Web.UI.dll and Telerik.Web.UI.Skins.dll, located in the "dependencies" folder, but deleted to save file size in the upload.

In the 2013 version I have removed a reference to System.Core (probably irrelevant) and I have aligned the minor differences between the two project's web.config files. None of the changes I made caused any differences whatsoever.

I'm attaching screenshots of the 2012/2013 differences.

This is a copy of a support ticket I created, I'll post an answer here if I get one before the forum manages to fix the problem :o)

Here is the web.config that works in 2012, but not in 2013
<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  -->
<configuration>
    <!--
    For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.
 
    The following attributes can be set on the <httpRuntime> tag.
      <system.Web>
        <httpRuntime targetFramework="4.5" />
      </system.Web>
  -->
    <system.web>
        <compilation debug="true" targetFramework="4.5">
 
            <!-- this section is added because it was in the VS2013 solution -->
            <assemblies>
                <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
                <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
            </assemblies>
            <!-- end section added -->
        </compilation>
 
        <!-- this section is added because it was in the VS2013 solution -->
        <httpRuntime targetFramework="4.5" />
        <!-- end section added -->
        <pages controlRenderingCompatibilityVersion="4.0" />
        <httpHandlers>
            <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
        </httpHandlers>
    </system.web>
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <handlers>
            <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
        </handlers>
    </system.webServer>
</configuration>

The GridTest.aspx file
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridTest.aspx.cs" Inherits="EmptyVs2012withTelerik.GridTest" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
        </telerik:RadStyleSheetManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        </telerik:RadAjaxManager>
        <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" AllowPaging="True" CellSpacing="0" GridLines="None">
        </telerik:RadGrid>
     
    </div>
    </form>
</body>
</html>

And the GridTest.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace EmptyVs2012withTelerik
{
    public partial class GridTest : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var persons = new List<Person>();
 
            persons.Add(new Person() { FirstName = "Jan", LastName = "Hansen", Age = 37 });
            persons.Add(new Person() { FirstName = "Jannik", LastName = "Meibom", Age = 39 });
            persons.Add(new Person() { FirstName = "Anne", LastName = "Hansen", Age = 40 });
            persons.Add(new Person() { FirstName = "Jan", LastName = "Hansen", Age = 37 });
            persons.Add(new Person() { FirstName = "Jannik", LastName = "Meibom", Age = 39 });
            persons.Add(new Person() { FirstName = "Anne", LastName = "Hansen", Age = 40 });
            persons.Add(new Person() { FirstName = "Jan", LastName = "Hansen", Age = 37 });
            persons.Add(new Person() { FirstName = "Jannik", LastName = "Meibom", Age = 39 });
            persons.Add(new Person() { FirstName = "Anne", LastName = "Hansen", Age = 40 });
            persons.Add(new Person() { FirstName = "Jan", LastName = "Hansen", Age = 37 });
            persons.Add(new Person() { FirstName = "Jannik", LastName = "Meibom", Age = 39 });
            persons.Add(new Person() { FirstName = "Anne", LastName = "Hansen", Age = 40 });
            persons.Add(new Person() { FirstName = "Jan", LastName = "Hansen", Age = 37 });
            persons.Add(new Person() { FirstName = "Jannik", LastName = "Meibom", Age = 39 });
            persons.Add(new Person() { FirstName = "Anne", LastName = "Hansen", Age = 40 });
 
            RadGrid1.DataSource = persons;
        }
    }
 
    public class Person
    {
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public int Age { get; set; }
    }
}

Maria Ilieva
Telerik team
 answered on 28 Nov 2014
1 answer
131 views
Hi Team
We have defined a custom button column which is inherited from GridButtonColumn. On page load we can see the column and button in it. As soon as it gets data from an Ajax call. Data is populated into the grid but it clears all the contents in the custom button cell.This option is working fine in version 2013.3.1114.35 . As soon as I migrated to version 2014.3.1024.35 this problem popped up. Please help us to solve the issue.
I investigated and found that there is some change in the telerik populating the data into the cell.

In the previous version (i.e. 2013) cell is populating the data based on grid.data.ColumnType =="GridButtonColumn" so even if we inherited column from GridButtonColumn we manage to set the required ColumnType of masterTableView to GridButtonColumn on client side so that telerik grid databinding method behave as expected and displays button column.

But In new version even though we checked that columntype is set to GridButtonColumn in masterTableView button column data is cleared while binding data. We are not sure how to bring the same behaviour so that we can get the button column working because in new version (i.e. 2014 Q3) data bind internally calls "populateCell" method which gives a call to a function which is fired based on column type I think (i.e. a.Grid.GridBoundColumn or a.Grid.GridButtonColumn etc.)

We have implemented the following code while inheriting the GridButtonColumn .

i.e.

public override GridColumn Clone()

{

    RequiredGridBoundColumn requiredGridBoundColumn = new RequiredGridBoundColumn();

    requiredGridBoundColumn.CopyBaseProperties(this);

    return requiredGridBoundColumn;

}

Konstantin Dikov
Telerik team
 answered on 28 Nov 2014
1 answer
279 views
I'm trying to load a grid control with data from a stored procedure using entity framework and I'm getting the following error: " The ObjectContext instance has been disposed and can no longer be used for operations that require a connection".    I had been using the commented out code below, which works, but wanted to use Entity Framework to call the stored procedure.  I've tried the code with and without the databind() without any difference.  the code for one of the stored procedures.  I have several other calls to stored proc's, which are called to Entity Framework that work fine, but they return distinct data values.  Any help appreciated.

Tom

 {                  // Working code commented out  below 
                    //if (ViewMode == "Department")
                    //{
                    //    this.grdDutyCrew.DataSource = clsDept.GetAvailabilityDutyCrewByViewMode(clsDept.DeptID, StationID, Convert.ToDateTime(SelectedDate));
                    //}
                    //else
                    //{
                    //    this.grdDutyCrew.DataSource = clsDept.GetDutyCrewByDate(StationID, Convert.ToDateTime(SelectedDate));
                    //}
// Entity Framework Call:
                    using (var context = new sfhsEntities())
                    {
                        if (context.DatabaseExists())
                        {
                            if (ViewMode == "Department")
                            {
                                this.grdDutyCrew.DataSource = context.GetAvailabilityDutyCrewByViewMode(clsDept.DeptID, StationID, SelectedDate);
                            }
                            else
                            {
                                this.grdDutyCrew.DataSource = context.GetDutyCrewByDate(StationID, SelectedDate);
                            }
                        }
                        this.grdDutyCrew.DataBind();
                    }
                }
//One of the Called Stored Procedure:
  public DataSet GetDutyCrewByDate(int StationID, DateTime SelectedDate)
    {
        SqlDataAdapter da = new SqlDataAdapter();
        DataSet ds = new DataSet();
        if (Conn.ObjConn.State == ConnectionState.Connecting)
        {
            return null;
        }

        if (Conn.ObjConn.State != ConnectionState.Open)
        {
            Conn.GetConnection();
        }
        SqlCommand cmd = Conn.ObjConn.CreateCommand();
        cmd.CommandType = CommandType.StoredProcedure;
        cmd.CommandText = "GetDutyCrewByDate";
        cmd.Parameters.Add("@rc", SqlDbType.Int).Direction = ParameterDirection.ReturnValue;
        cmd.Parameters.Add("@StationID", SqlDbType.Int).Value = StationID;
        cmd.Parameters.Add("@SelectedDate", SqlDbType.DateTime).Value = SelectedDate;

        try
        {
            da.SelectCommand = cmd;
            da.Fill(ds);
             return ds;
        }
        catch (Exception ex)
        {
            ErrMsg = ex.Message;
            return null;
        }
        finally
        {
            if (Conn.ObjConn != null)
            {
                ((IDisposable)Conn.ObjConn).Dispose();
            }
        }
    }
Konstantin Dikov
Telerik team
 answered on 28 Nov 2014
5 answers
104 views
Hi Telerik Team ,

I have been trying hard to save the data in Radgrid as word, excel, pdf formats.
I am successful in doing that using the radgrid - Exporting method.
But along with save, it also exports due to which we get the popup asking to save or open the file.
We can use Response.Redirect(Request.UrlReferrer.ToString()) to prevent the popup. But it doesnot seem handy in my situation.

My question is is there any workaround. Can I try it using telerik report viewer object ?
Can we make the use of report viewer exporting functionality to achieve what I need to ?
Any solution to my problem would be appreciated.

Thanks in advance ,
Anurag
Kostadin
Telerik team
 answered on 28 Nov 2014
23 answers
1.3K+ views
Hai,

    I don't know what going with my rad combo box, i am had a user control which i am binding one rad combo box using a link list. i had setted if(!this.post back) bind the combo box, after when i a post back, items in the rad combo get disappeared, Is there any properties or anything to do reload data in the rad combo. I can't reload the original data, because i am using check box as item template. i need to show the checked check boxes inside it.

Please help me, it's not delivering what i  expected :)
Hiren
Top achievements
Rank 1
 answered on 28 Nov 2014
3 answers
80 views
I want to insert image from Editor, but Images Manager dialog box not show.
Please help me. I thinks something wrong in my style (css), but i can't fix it
Do Xuan
Top achievements
Rank 1
 answered on 28 Nov 2014
2 answers
476 views
Hi,
I want to disable resize, delete, drag, rotate and edit of diagram/shape/connectors. I am using following code for stopping resize, edit and delete. But it is still getting resized, rotated and dragged. Please let me know how can I stop resize of shape and stop rotate and drag.

​<telerik:RadDiagram Resizable="false" Draggable="false" Enabled="false" Rotatable="false" ID="theDiagram" runat="server" EnableViewState="true" Width="890" Height="650">
<ClientEvents OnClick="diagram_onClick" />
<ShapeDefaultsSettings Editable="false" Resizable="false" Rotatable="false" Visual="visualTemplate">
</ShapeDefaultsSettings>
<LayoutSettings Enabled="false"></LayoutSettings>
</telerik:RadDiagram>

Thanks.
Nguyễn Duy Hải
Top achievements
Rank 1
 answered on 28 Nov 2014
2 answers
106 views
Anyone else get this warning in dev console for chrome 39

The specified value '11/24/2014' does not conform to the required format, 'yyyy-MM-dd'.

Also, the chart labels are now not aligned. This was never an issue in chrome 38.

See screenshot below.
Thien
Top achievements
Rank 1
 answered on 28 Nov 2014
6 answers
69 views
I am using ASP:TabContainer with ASP:Panel and ran into problem with refresh.  I could not refresh just the tab, only the only page - I really need just a tab refresh. 

So, I though I would tryRadTabStrip.

<%@ Register Src="~/Admin/GroupBasics.ascx" TagName="GroupBasicsCS" TagPrefix="uc" %>
<%@ Register Src="~/Admin/GroupForm.ascx" TagName="GroupFormCS" TagPrefix="uc" %>
<%@ Register Src="~/Admin/GroupMemberPage.ascx" TagName="GroupMembersPageCS" TagPrefix="uc" %>
<%@ Register Src="~/Admin/GroupMembers.ascx" TagName="GroupMembersCS" TagPrefix="uc" %>
...

    <telerik:RadTabStrip ID="GroupTabStrip" runat="server" OnClientTabSelecting="" AutoPostBack="false"  r Align="Justify" MultiPageID="GroupTabPV" SelectedIndex="0">
            <Tabs>
                <telerik:RadTab PageViewID="GroupBasicsPV"   Text="Group Basics"></telerik:RadTab>
                <telerik:RadTab PageViewID="GroupFormPV" Text="Group Form"></telerik:RadTab>
                <telerik:RadTab PageViewID="GroupMembersPagePV" Text="Group Members Page"></telerik:RadTab>
                <telerik:RadTab PageViewID="GroupMembersPV" Text="Group Members"></telerik:RadTab>
            </Tabs>
    </telerik:RadTabStrip>
      <telerik:RadMultiPage runat="server" ID="GroupTabPV" SelectedIndex="0">
            <telerik:RadPageView runat="server" ID="GroupBasicsPV">
                GroupBasicsPV
                <div class="contentWrapper">
                    <uc:GroupBasicsCS runat="server" ID="GroupBasicsCS" />
                </div>
            </telerik:RadPageView>
            <telerik:RadPageView runat="server" ID="GroupFormPV">
                GroupFormPV
                <div class="contentWrapper">
                    <uc:GroupFormCS runat="server" ID="GroupFormCS" />
                </div>
            </telerik:RadPageView>
 
            <telerik:RadPageView runat="server" ID="GroupMembersPagePV">
                GroupMembersPagePV
                <div class="contentWrapper">
                    <uc:GroupMembersPageCS runat="server" ID="GroupMembersPageCS" />
                </div>
            </telerik:RadPageView>

            <telerik:RadPageView runat="server" ID="GroupMembersPV">
                GroupMembersPV
                <div class="contentWrapper">
                    <uc:GroupMembersCS runat="server" ID="GroupMembersCS"/>
                </div>
            </telerik:RadPageView>
       </telerik:RadMultiPage>

With this setup if I try to open a RadEditor in the window I get a document not defined error:

Type.registerNamespace("Telerik.Web.UI.Editor");
Uncaught TypeError: Cannot read property 'document' of null 
in some Telerik code:
(function(a,b,c){b.RestorePoint=function(e,d){this.Window=e;
this.Document=e.document;
this.container=(d)?d:this.Document.body;

AND

when a do a refresh it not only refreshes the whole page, but it also changes the tab back to the first one.  It is also annoying that all the pages in the tabs are called on page creation before their tabs are clicked, potentially a huge waste of resources. 

There is might be a way to work around all this but the examples and documentation completely lack using an ascx collection. I would have thought a rather normal use.  I am probably doing it all wrong but I could only find one example with ascx's, TabStrip - Render Selected Page Only .  I probably need to control the tab strip more directly which I would pursue but the Document not defined error kind of kills using the TabStrip at all. 


Danail Vasilev
Telerik team
 answered on 27 Nov 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?