Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
226 views
Hi,

I have an error when clicking on any of the buttons in a pop up.

Here is the scenario:

I have a pop up (JQuery pop up) wuich contains a Repeater.
The Repeater has a column which contains Edit buttons.
When  click on Edit button, another pop up opens.

In this pop up we have some buttons and a RadComboobx.

When we click on any of the buttons or change the combo value. I am getting the bellow error:

******************************************
<error errorId="bf74c476-13ac-4da5-bf5c-95d79e24b04a" application="/" host="AIA3D050IBA" type="System.ArgumentException" message="Invalid JSON primitive: {"enabled":true,"emptyMessage":"","minValue":1,"maxValue":70368744177664}." source="System.Web.Extensions" detail="System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: Invalid JSON primitive: {"enabled":true,"emptyMessage":"","minValue":1,"maxValue":70368744177664}. at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer) at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) at System.Web.Script.Serialization.JavaScriptSerializer.DeserializeObject(String input) at Telerik.Web.UI.RadWebControl.LoadPostData(String postDataKey, NameValueCollection postCollection) at Telerik.Web.UI.RadInputControl.LoadPostData(String postDataKey, NameValueCollection postCollection) at Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.queue_request_aspx.ProcessRequest(HttpContext context) in c:\Documents and Settings\sradavelli\Local Settings\Temp\Temporary ASP.NET Files\root\b1d35cf8\b00004d1\App_Web_z0cnhrqi.0.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)" 

******************************************

Note: I have placed the pop up DIV in an UpdatePanel control.

Any one have any Ideas why this is happening.

Sri
Top achievements
Rank 1
 asked on 05 Jul 2012
1 answer
77 views
Hi all,

I have a gridcalculated column to which I am showing aggregate in the footer. I want to show a tooltip for the aggregate inorder to make the user understand what is the data showing in the footer. Please provide some solutions.

Thanks in advance.
Shinu
Top achievements
Rank 2
 answered on 05 Jul 2012
1 answer
207 views
I'm getting a compiler error (cannot resolve symbol) when I try to reference the Telerik.WebControls namespace. I'm using Telerik.Web.UI file version 2011.3.115.35.

Was this code recently introduced in a newer version?
Iana Tsolova
Telerik team
 answered on 05 Jul 2012
1 answer
73 views
I have a grid with a number of columns. The data seems to be coming back fine from my datasource, as I have an accurate row count when paging is enabled. However, all columns are blank. When I view source, I see the markup generated by the InstantiateIn, but no data. It seems either the DataBinding event handler is not hooked up OR the grid is being defined (along with the event handlers) AFTER the data comes back and binds. I have followed the demos to the "T" and can't seem to get this to work. This is all embedded in a SharePoint visual web part. Thanks for any ideas/tips/solutions.

public class Name : ITemplate
{
    #region ITemplate Members
 
    public void InstantiateIn(Control container)
    {
        // open main container
        container.Controls.Add(new LiteralControl("<div class=\"related-rm-eb-results-gridview-name\">"));
 
        using (var nameLiteral = new Literal())
        {
            nameLiteral.ID = "Name";
            nameLiteral.DataBinding += NameDataBinding;
            container.Controls.Add(nameLiteral);
        }
 
        // close main container
        container.Controls.Add(new LiteralControl("</div>"));
    }
 
    #endregion
 
    public void NameDataBinding(object sender, EventArgs e)
    {
        using (var nameLiteral = sender as Literal)
        {
            if (nameLiteral != null)
            {
                var item = nameLiteral.NamingContainer as GridDataItem;
                if (item != null)
                {
                    var entity = item.DataItem as DataContracts.Entity;
                    if (entity != null)
                        nameLiteral.Text = entity.Name;
                }
            }
        }
    }
}
Marin
Telerik team
 answered on 05 Jul 2012
3 answers
138 views
I am probaly missing something but how does one expand child items of a child of a root item when the child is clicked when using a databound radpanel?
<telerik:RadPanelBar ID="RadPanelBar1" Runat="server" DataFieldID="DataFieldID"
    DataFieldParentID="DataFieldParentID"
    DataNavigateUrlField="DataNavigateUrlField" DataSourceID="sds_ITC_MenuConsole"
    DataTextField="DataTextField" DataValueField="DataTextField" Width="250px"
    PersistStateInCookie="True" Skin="WebBlue" ExpandMode="MultipleExpandedItems">
    <DataBindings>
        <telerik:RadPanelItemBinding SelectedImageUrlField="ImageURL"
            ExpandedImageUrlField="ImageURL" HoveredImageUrlField="ImageURL"
            ImageUrlField="ImageURL" />
        <telerik:RadPanelItemBinding ImageUrlField="ImageURL" />
    </DataBindings>
</telerik:RadPanelBar>


Root 32 NULL Network Operations Center ~/ITC_Console/noc/noc.aspx
Child 33 32 NOC Tools NULL
Child Item 34 33 Server Room Check Log ~/ITC_Console/noc/server_room_check_log.aspx
Child Item 35 33 Master Projects ~/ITC_Console/noc/master_projects.aspx
Child Item 36 33 Projects ~/ITC_Console/noc/projects.aspx
Child Item 37 33 Tasks ~/ITC_Console/noc/tasks.aspx
Child Item 38 33 Parts on Order ~/ITC_Console/noc/parts.aspx
Child Item 39 33 Procedures Calendar ~/ITC_Console/noc/procedures/procedures.aspx
Child Item 40 33 NOC Notes ~/ITC_Console/noc/noc_notes/noc_notes.aspx





Peter
Telerik team
 answered on 05 Jul 2012
1 answer
85 views
Hi,

I have a Chart set up to use rotated labels on the X axis:

      chartAxis.Appearance.LabelAppearance.RotationAngle = 45;
      chartAxis.Appearance.LabelAppearance.Position.Auto = false;
      chartAxis.Appearance.LabelAppearance.Position.AlignedPosition = AlignedPositions.Top;
      chartAxis.AutoScale = false;

The result is very much like the demo that can be seen here:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/chartandtooltip/defaultcs.aspx?product=chart

The actual x-axis labels don't line up with their corresponding points. Is there a way to shift or align the labels so the top of the text is level with the point marker for the correct point.

Regards
Liz
Evgenia
Telerik team
 answered on 05 Jul 2012
6 answers
108 views
Hi,

I was wondering if the AJAX Q2 2012 is compatible with VS 2012 RC as I am having issues.

many thanks,

Francis
Aylin
Telerik team
 answered on 05 Jul 2012
1 answer
168 views
Hi I urgantly need some help
I have a RadGrid with myltiple Fields of which 2 is DateTimeColumns
I use the NeedDataSource to get data from a DataTable in the Database.
I need the EndDate Column to be able to Take nulls and Display Nulls When Returned from Database.
I can Insert Send Null Values To the Database When Inserting. But When I Need to Get The Null Date Back From The Database
I keep getting the Error: Specified cast is not valid.  regarding the DateTime of EndDate.

This is my Form Code:
<telerik:RadGrid ID="rgParameters" runat="server"
          AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True"
          AlternatingItemStyle-BackColor="white" GridLines="None"
          GroupingEnabled="False" Width="100%" Height="500px"
          AutoGenerateColumns="False"
          ondeletecommand="rgParameters_DeleteCommand"
          oninsertcommand="rgParameters_InsertCommand"
          onneeddatasource="rgParameters_NeedDataSource"
          onupdatecommand="rgParameters_UpdateCommand"
          oniteminserted="rgParameters_ItemInserted">
          <AlternatingItemStyle BackColor="White" />
          <MasterTableView Caption="Parameters"
              CommandItemDisplay="TopAndBottom"
              DataKeyNames="ScheduleParaID,StartDate,EndDate,WeekScheduled,WEPHScheduled"
              ShowFooter="true">
              <Columns>
                  <telerik:GridBoundColumn AllowFiltering="False" AllowSorting="False"
                      DataField="ScheduleParaID" HeaderText="ScheduleParaID"
                      ReadOnly="true" UniqueName="ScheduleParaID" Visible="False">
                  </telerik:GridBoundColumn>
                  <telerik:GridDateTimeColumn AllowFiltering="False" DataField="StartDate"
                      HeaderText="Start Date" UniqueName="StartDate" DataFormatString="{0:dd/MM/yyyy}">
                  </telerik:GridDateTimeColumn>
                  <telerik:GridDateTimeColumn AllowFiltering="False" DataField="EndDate"
                      HeaderText="End Date" UniqueName="EndDate" DataFormatString="{0:dd/MM/yyyy}" Reorderable="True">
                  </telerik:GridDateTimeColumn>
                  <telerik:GridNumericColumn AllowFiltering="False" DataField="WeekScheduled"
                      HeaderText="Trains Scheduled (Week Days)" UniqueName="WeekScheduled" AllowRounding="False">
                  </telerik:GridNumericColumn>
                  <telerik:GridNumericColumn AllowFiltering="False" DataField="WEPHScheduled"
                      HeaderText="Train Scheduled (WE and Public Holidays)" UniqueName="WEPHScheduled"  AllowRounding="False">
                  </telerik:GridNumericColumn>
              </Columns>
              <EditFormSettings EditFormType="AutoGenerated"></EditFormSettings>
          </MasterTableView>
      </telerik:RadGrid>

This is my Code Behind part one.
protected void rgParameters_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            TrainOperationParameters tparam = new TrainOperationParameters();
            rgParameters.DataSource = tparam.Select();
            tparam = null;  
        }

This is my Code Behind For My DataEntity
[DataObjectMethod(DataObjectMethodType.Select, true)]
        public List<TrainOperationParameters> Select()
        {
            List<TrainOperationParameters> list = new List<TrainOperationParameters>();
            DataTable dt;
 
            try
            {
                dt = DataMethods.ReturnMultipleRowResultSet("[IM].[GetTrainOpParameters]", String.Empty);
                if (dt.Rows.Count > 0)
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        TrainOperationParameters param = new TrainOperationParameters();
                        param.ScheduleParaID = Convert.ToInt32(dr["TrainOpParaID"]);
                        param.StartDate = (DateTime)dr["StartDate"];
                        param.EndDate = ((DateTime)dr["EndDate"]);
                        param.WeekScheduled = Convert.ToInt32(dr["WeekScheduled"]);
                        param.WEPHScheduled = Convert.ToInt32(dr["WEPHScheduled"]);
                        list.Add(param);
                    }
                }
            }
            catch (Exception)
            {
 
                throw;
            }
            finally
            {
                dt = null;
            }
 
            return list;
        }

Any Advice on why I keep Getting the Error and how I might be able to Fix it.
Andrey
Telerik team
 answered on 05 Jul 2012
2 answers
178 views
Hello,

I have a little problem with RadGrid and 2 columns of type GridDateTimeColumn.
 
Extract data from the database server and bind it to the RadGrid.

There are two GridDateTimeColumn columns. I set both to have PickerType="DateTimePicker" as property. Also set EditMode="InPlace" for the RadGrid.
I put this RadGrid in aspx page which uses MasterPage. When the page loaded and I put the RadGrid into edit mode the columns look like ( before.png). When I press on the horisontal scroll in the RadGrid these two columns change there position. Please see the attached photo ( after.png). It looks like these two columns have absolute position? Any ideas how to fix that?

If I change RadGrid's property EdidMode to "PopUp" and after that change I press on RadGris's vertical scroll this problem does not exists. But I have many columns so this edit mode does not works for me.

Thanks in advance.
Mina
Top achievements
Rank 1
 answered on 05 Jul 2012
3 answers
218 views
I've got a WCF Data Service which is correctly publishing data (checked in the browser), yet when I hook it up to a RadTreeView or a RadMenu, nothing is rendered in the Browser...

My markup looks like this (generated by smart tags): 

<telerik:RadODataDataSource ID="RadODataSource1" runat="server">
  <Transport>
    <Read Url="http://localhost:8989/ODService.svc/" DataType="XML" />
  </Transport>
  <Schema>
    <telerik:DataModel ModelID="Thing" Set="Things">
      <telerik:DataModelField FieldName="Id" />
      <telerik:DataModelField FieldName="Name" />
      <telerik:DataModelField FieldName="Value" />
    </telerik:DataModel>
  </Schema>
</telerik:RadODataDataSource>
 
 
<telerik:RadTreeView ID="RadTreeView1" Runat="server" DataFieldID="Id" DataModelID="Thing" ODataDataSourceID="RadODataSource1"></telerik:RadTreeView>


The output in the browser when directed  to http://localhost:8989/ODService.svc/Things looks like this:

<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
  <title type="text">Things</title>
  <id>http://localhost:8989/ODService.svc/Things</id>
  <updated>2012-07-03T10:27:17Z</updated>
  <link rel="self" title="Things" href="Things" />
  <entry>
    <id>http://localhost:8989/ODService.svc/Things(0)</id>
    <title type="text"></title>
    <updated>2012-07-03T10:27:17Z</updated>
    <author>
      <name />
    </author>
    <link rel="edit" title="Thing" href="Things(0)" />
    <category term="RadApp.Data.Model.Thing" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/xml">
      <m:properties>
        <d:Id m:type="Edm.Int32">0</d:Id>
        <d:Name>Thing0</d:Name>
        <d:Value>e55187e0-1439-4ac8-984b-504236caf274</d:Value>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>http://localhost:8989/ODService.svc/Things(1)</id>
    <title type="text"></title>
    <updated>2012-07-03T10:27:17Z</updated>
    <author>
      <name />
    </author>
    <link rel="edit" title="Thing" href="Things(1)" />
    <category term="RadApp.Data.Model.Thing" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/xml">
      <m:properties>
        <d:Id m:type="Edm.Int32">1</d:Id>
        <d:Name>Thing1</d:Name>
        <d:Value>cfb491c8-9a07-4393-a539-5d7078cc9ded</d:Value>
      </m:properties>
    </content>
  </entry>
  <entry>
    <id>http://localhost:8989/ODService.svc/Things(2)</id>
    <title type="text"></title>
    <updated>2012-07-03T10:27:17Z</updated>
    <author>
      <name />
    </author>
    <link rel="edit" title="Thing" href="Things(2)" />
    <category term="RadApp.Data.Model.Thing" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <content type="application/xml">
      <m:properties>
        <d:Id m:type="Edm.Int32">2</d:Id>
        <d:Name>Thing2</d:Name>
        <d:Value>7daecdaa-4a69-4f61-87f6-55eaca455ccc</d:Value>
      </m:properties>
    </content>
  </entry>
</feed>

 
and finally, the source from the rendered web page where the control should be, looks like this:

<div id="RadTreeView1" class="RadTreeView RadTreeView_Clear">
    <input id="RadTreeView1_ClientState" name="RadTreeView1_ClientState" type="hidden" autocomplete="off" value="{"expandedNodes":[],"collapsedNodes":[],"logEntries":[],"selectedNodes":[],"checkedNodes":[],"scrollPosition":0}">
</div>


Is there something I'm doing wrong?

I can post up the code from the data classes or the context, but the fact that the service is outputting into the browser (as above) without problems, allowing me to correctly query it, would suggest that the problem isn't in the service itself.
Genady Sergeev
Telerik team
 answered on 05 Jul 2012
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?