Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
164 views
Hi

I am using a Telerik Rad Grid with Drag and drop functionality for rows. but when I select multiple rows and drag out of the grid, it shows a large empty box dragging additionally to the selected rows.

Anybody came across this issue before? Any solution to overcome this issue would be very helpful.

Thanks
Malinda
Tsvetina
Telerik team
 answered on 05 Jul 2012
2 answers
148 views
I was wondering is someone could give me hand converting this GridView code to work with the RadGrid control.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
  
<!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">
    <div>
        <asp:Button ID="Button1" runat="server" Text="Get Values" OnClick="Button1_Click" />
        <asp:GridView ID="GridView1" runat="server">
        </asp:GridView>
    </div>
    </form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
public partial class _Default : System.Web.UI.Page
{
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        TemplateField templateField = new TemplateField();
        GridView1.Columns.Add(templateField);
        templateField.ItemTemplate = new MyCheckBoxTemplate();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            GridView1.DataSource = new string[] { "a", "b", "c" };
            GridView1.DataBind();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        foreach (GridViewRow row in GridView1.Rows)
        {
            bool isChecked = ((CheckBox)row.FindControl("CheckBox1")).Checked;
            Response.Write("RowIndex " + row.RowIndex + ": " + isChecked + "<br />");
        }
    }  
}
  
public class MyCheckBoxTemplate : ITemplate
{
    void ITemplate.InstantiateIn(Control parent)
    {
        CheckBox cb = new CheckBox();
        cb.ID = "CheckBox1";
        parent.Controls.Add(cb);
    }
}
Sizo
Top achievements
Rank 1
 answered on 05 Jul 2012
1 answer
111 views
 *sigh* It's embarrassing enough that I discover I was putting the PageSize on the wrong element but there does not seem to be a way of deleteing this post.
Tsvetoslav
Telerik team
 answered on 05 Jul 2012
5 answers
181 views
I am attempting to use the RadSocialShare control to allow users of my web site to tell others about the link. I have used the following code:

<telerik:RadSocialShare ID="RadSocialShare1" runat="server" CssClass="emailwrapper" Skin="Sitefinity" EnableEmbeddedSkins="true" >
<MainButtons>
<telerik:RadSocialButton SocialNetType="SendEmail" ToolTip="Email" CustomIconUrl="Images2/product/emailtofriend.png"/>
</MainButtons>
</telerik:RadSocialShare>

I am getting the following message when I attempt to send an email:

"Ooops!:( An error has occurred!"

I have got a section in my web.config for

  <system.net>
    <mailSettings>
      <smtp from="customerservices@mywebaddress.com" deliveryMethod="Network">
        <network host="myisprelayserver.net" port="25" defaultCredentials="true" />
      </smtp>
    </mailSettings>
  </system.net>

These settings work when I send mail in code using SmtpClient.Send() in another part of my application

Does anyone have any ideas why I might be getting this error?
Zbysek
Top achievements
Rank 1
 answered on 05 Jul 2012
3 answers
96 views
I'm working with a RadSlider, is it possible to have the maximum value as a LONG instead of an INT?
Slav
Telerik team
 answered on 05 Jul 2012
1 answer
108 views
Hello,

I have a button outside of the Grid which should close any opened insert and edit forms. For insert forms this works without any problem:

if (m_grid.MasterTableView.IsItemInserted)
{
    GridEditFormInsertItem insertItem = (GridEditFormInsertItem)m_grid.MasterTableView.GetInsertItem();
    insertItem.FireCommandEvent("PerformInsert", String.Empty);
}

But for the edit item it doesn't work correctly:

if (m_grid.EditItems.Count > 0)
{
     m_grid.EditItems[0].FireCommandEvent("Update", String.Empty);
}

The GridSaveCommand event is called, but when I try to access my EditForm, it doesn't get found when updating (control will be null). When inserting, it works perfectly. What am I doing wrong when updating?

MyControl control = (MyControl )e.Item.FindControl("MyControl");

Thanks!
Shinu
Top achievements
Rank 2
 answered on 05 Jul 2012
0 answers
233 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
84 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
219 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
76 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?