Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
237 views
I was recently playing around with the Sitefinity demo and I really love the way you can drag and drop controls onto the page from that sidebar. I was wondering how you implemented the drag and dropping part?
I am trying to implement this on a project of my own, I am attempting to drag a div (it doesn't have to be a div it could be almost anything) from a RadWindow and drop it in a RadDock or RadDockZone on the RadWindow's parent page. I did some research on dragging and dropping div's and stuff with javascript but from what I've read that won't work for me at all because I am trying to do it across windows. Any suggestions would be greatly appreciated.
Georgi
Telerik team
 answered on 04 Nov 2010
1 answer
115 views
Using fiddler and viewing whats being posted during an ajax post i can see the view state and then all the __event hidden fields. After that i can see the id's of controls and values e.g. ctl00_BodyContent_ConsentTree_ClientState=%7b%....

Why are the ctl00_BodyContent_ConsentTree_ClientState... etc being added to whats being posted back?

Are these controls duplicated in the viewstate thats being posted back?

Can we send the post without them?

I have read the article http://www.telerik.com/help/aspnet/ajax/ajxtelerikajax.html and viewed the text below. 

So if we didn't post back the ctl00_BodyContent_ConsentTree_ClientState....etc we wouldn't be able to access there current values?

http://www.telerik.com/help/aspnet/ajax/ajxtelerikajax.html
Persistence of form values - all form values are sent to the server for processing during the AJAX request and are persisted between AJAX requests. All form controls can be referenced in the code-behind as if a postback occurred. This feature guarantees that your AJAX-enabled applications will not be limited to mere rendering of controls with AJAX, but can cover even the most complex scenario.  
Cori
Top achievements
Rank 2
 answered on 04 Nov 2010
1 answer
84 views
I add the following style in my aspx change but it did not reflect the new icon in editor.
<style type="text/css">
.reToolbar.Vista .TemplateManager
{
  background-image
: url(MyImage.gif) !important;
}
<
/style>
Please help me regarding this.
Rumen
Telerik team
 answered on 04 Nov 2010
1 answer
83 views
On my radgrid (2009q3), I have paging turned on.

I have a requirement that states when the users hovers mouse pointer over the page number, that it should display a tooltip showing the contents of the sorted column on that page.  When it is a group of pages (11-20), it should display the contents of the sorted column on the first page of the group.

With this functionality, they can navigate to the desired page with less clicking and paging.

I do not find such a feature in the radgrid, can someone suggest a way to accomplish this?

TIA.
Veli
Telerik team
 answered on 04 Nov 2010
4 answers
136 views
hey everyone

I am using a grid and template form for editing grid items.I have created a panel for editing items that is visible on external button btnEdit_Click.tha problem is with my code when i select a row and click on edit,i am trying to get the id of the row been selected.But its giving error-

Object reference not set to an instance of an object.

my code is--
protected void btnEdit_Click(object sender, EventArgs e)
       {
           if (RadGrid1.SelectedItems.Count != 0)
           {
               //Guid g = new Guid(txtName.Text);
               txtName.Focus();
               pnlExternalForm.Visible = true;
               RadGrid Grid = (this.FindControl("RadGrid1") as RadGrid);
               string UID = Convert.ToString(Grid.SelectedValues["UID"]);//this shows no row is selected
               string query = "SELECT * FROM Entry where UID=" + UID;
               GetProductInfoForEdit(query, UID);
               LoadData();
           }
       }
       private void GetProductInfoForEdit(string query, string UserID)
       {
           DataSet ds = GetInventoryForm(query);
           txtName.Text = Convert.ToString(ds.Tables[0].Rows[0]["Name"]);
           txtMailText.Text = Convert.ToString(ds.Tables[0].Rows[0]["Mail Text"]);
           txtMailSubject.Text = Convert.ToString(ds.Tables[0].Rows[0]["Mail Subject"]);
           lblUID.Text = UserID;
           LoadData();
       }
my primary key column is UID.

Thanks
Amit
Princy
Top achievements
Rank 2
 answered on 04 Nov 2010
1 answer
101 views
I have developed a screen similar to http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/editondblclick/defaultcs.aspx. I want to make it work in such a way that the cell value is saved  when a click is made anywhere on the page.I am able to edit the cell by double cliking the cell. I am able to save the edited value when i click on a grid row. When i click on any area apart from the grid, the value is not getting saved. I want to make it work in such a way that the cell captures value when a click s made anywhere on the page. Please help me asap.

Awaiting your reply,
Baarat
Mira
Telerik team
 answered on 04 Nov 2010
3 answers
141 views
Hi,

after adding the RadFormDecorator to my project MasterPage, I've noticed this strange behavior: in every DropDownList that doesn't have any element, the word 'undefined' is displayed.

Here's a simple page that shows this behavior:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="DropDownList_undefined._Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form action="Default.aspx" runat="server">
        <telerik:RadScriptManager runat="server" id="sm1"></telerik:RadScriptManager>
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="all" />
         
        <asp:DropDownList runat="server" ID="ddlEmpty" Width="150px"></asp:DropDownList>
        <asp:DropDownList runat="server" ID="ddlPopulated" Width="150px">
            <asp:ListItem Text="Item1" Value="Item1"></asp:ListItem>
            <asp:ListItem Text="Item2" Value="Item2"></asp:ListItem>
        </asp:DropDownList>       
    </form>
</body>
</html>

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
 
 
namespace DropDownList_undefined
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
    }
}

Is there any way to avoid this?

Thanks
Georgi Tunev
Telerik team
 answered on 04 Nov 2010
1 answer
249 views
Dear Support,

I want to use Javascript Intellisense. On my master page I added the RadScriptManager (I'm using VS 2010) with the needed references. When I try to use the js intelisense everything works fine.

But how can I add this behaviour on content pages and embedded user controls? I can't add another RadScriptManager, becauce omly one is allowed. But there isn't a RadScriptManagerProxy.

How can I get out of this?

Thanks in advance.

Greetings
Christian

p.S: What means "Use ScriptManager CDN"? What's CDN?
T. Tsonev
Telerik team
 answered on 04 Nov 2010
1 answer
74 views
Hi,

Is there a way to cancel the edit command in gridCreateColumnEditorEvent? I have tried the following, but it is not working:

protected void grid_CreateColumnEditor(object sender,Telerik.Web.UI.GridCreateColumnEditorEventArgs e)
{
  
  if (//Some condition)
  {
    grid.MasterTableView.ClearEditItems();
  }
}


//HÃ¥kan
Shinu
Top achievements
Rank 2
 answered on 04 Nov 2010
7 answers
390 views
Hi

How do I access DataKeyValues in a button click event handler if the button is outside the RadGrid?

<telerik:RadGrid ID="RadgridDestination" runat="server" 
     AllowSorting="True"  ShowGroupPanel="True" 
     AutoGenerateColumns="False"
          Skin="Sunset" AllowPaging="True" GridLines="None">
  
        <GroupingSettings ShowUnGroupButton="True"  />
        <ClientSettings AllowDragToGroup="True" allowcolumnsreorder="True" 
            columnsreordermethod="Reorder" reordercolumnsonclient="True" >
        </ClientSettings>
          
  
<MasterTableView EditMode="InPlace" DataKeyNames="Destination_ID" GroupLoadMode="Client" >
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
  
    <Columns>
<telerik:GridButtonColumn CommandName="Select" Text="Edit"  ButtonType="ImageButton"
            UniqueName="column1" 
            ImageUrl="Images/Edit.gif">
        </telerik:GridButtonColumn>
  
    </Columns>
           <EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
</EditFormSettings>
</MasterTableView>
  
  
    </telerik:RadGrid>
  
  <asp:Button ID="btnPkNO" runat="server"  CausesValidation="false" Text="NO" />
Protected Sub btnPkNO_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnPkNO.Click
  
  DestID = RadgridDestination.SelectedValues("Destination_ID") 'I'm getting NullReferenceexception here
  
End Sub

Any help would be appreciated!!
Neelima


Marin
Telerik team
 answered on 04 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?