Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
87 views

Hi all
I have spent Alot time working with the edit radcotrol and I have followed the example in the documentation and I am have a hard time getting the radedit1.content to save
 there is the code

 

 

 

string sqlserver = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;

 

 

 

string user_id;

 

 

 

protected void Page_Load(object sender, EventArgs e)

 

 

{

 

 

string userID = Context.User.Identity.Name;

 

 

lookupid(userID);

 

getbody(user_id);

 

}

 

 

public void getbody(string userID)

 

 

{

 

 

SqlConnection conmydata = new SqlConnection(sqlserver);

 

 

conmydata.Open();

 

 

SqlCommand cmdselect = new SqlCommand("select txtarea from txtbody where @userID=userID", conmydata);

 

 

cmdselect.Parameters.AddWithValue(

"@userID", userID);

 

 

 

string strbody = Convert.ToString(cmdselect.ExecuteScalar());

 

 

conmydata.Close();

 

RadEditor1.Content = strbody;

 

}

 

 

public void lookupid(string userID)

 

 

{

 

 

SqlConnection conmydata = new SqlConnection(sqlserver);

 

 

conmydata.Open();

 

 

SqlCommand cmdselect2 = new SqlCommand("select userID from users where @userID=email_address", conmydata);

 

 

cmdselect2.Parameters.AddWithValue(

"@userID", userID);

 

 

 

string stremail = Convert.ToString(cmdselect2.ExecuteScalar());

 

 

conmydata.Close();

 

user_id = stremail;

 

}

 

 

public void edit_finish(object sender, EventArgs e)

 

 

{

 

 

string body = RadEditor1.Content;

 

 

 

SqlConnection conmydata = new SqlConnection(sqlserver);

 

 

conmydata.Open();

 

 

SqlCommand insert = new SqlCommand("update txtbody set txtarea=@txtarea where userID=@userID", conmydata);

 

 

insert.Parameters.AddWithValue(

"@txtarea", body);

 

 

insert.Parameters.AddWithValue(

"userID", user_id);

 

 

insert.ExecuteNonQuery();

 

conmydata.Close();

 

}

 

 

 

Rumen
Telerik team
 answered on 22 Feb 2011
1 answer
115 views
I'm trying to do something that seems simple, but I don't see any examples.  I'm wondering if it's possible.

I want to show a radgrid, where each row is grouping of many detail rows.  Then I want the user to be able to expand the row and see the detail rows.  Both the detail rows and the group rows should have the same columns.

So, picture a datasource like this:

UserId
UserName
InvoiceId
InvoiceAmount

We would want the grid to first show each row with (so:

UserName, Count(), Sum(InvoiceAmount)
For example:

BillJ, 3, $123
JohnM, 2, $323
SteveP, 4, $554

(But we want these in columns that are sortable, not as a comma separated string like the Group Header examples show)

and then when you expanded you would see rows like:

BillJ, 1, $100
BillJ, 1, $20
BillJ, 1, $3


I was hoping to do this with 1 datasource that contains the detail rows, and have the grid figure out the count and sum.

Is this not possible?  Do I have to follow the hierarchy example and use multiple datasources (one where I calculate the sums, counts in the data before binding, and another that has the detail rows)?
Radoslav
Telerik team
 answered on 22 Feb 2011
2 answers
85 views
Hi,

I am telerik rad control user. Previously i am using RadControlsQ1 2007

and now i am using RadControls for ASP.NET AJAX Q3 2010

now i am not able to upgrade my project from old version to new version.

old version use like <%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="radCln" %>

Please help me asap the steps for how to upgrade with new version.

Thanks
Partha Mukherjee
Chandan Dey
Top achievements
Rank 1
 answered on 22 Feb 2011
3 answers
84 views
Hi All,
I have a requirement.

I want to populate a radcombobox inside a radgrid on initial pageload.
I dont want the Combobox to populate on EditEvent.
I have put the Combox in GridTemplates ItemTemplate columns


How can I acheive this.
Princy
Top achievements
Rank 2
 answered on 22 Feb 2011
3 answers
210 views
Hello

 See the following demo link

http://demos.telerik.com/aspnet-ajax/scheduler/examples/export/defaultcs.aspx

In this case in MONTH tab. we can easily drag and drop the exam. I don't want to drag and drop option in case MONTH ..

How to disable the drag and drop in case of Month
URGENTTTTTTTTTTTTT


Thanks
Regards
Rahul
Shinu
Top achievements
Rank 2
 answered on 22 Feb 2011
2 answers
89 views
Hi,

Recently have been working with the trial version of RadControls for ASP.NET Ajax Q3 2010, downloaded from here...
And after trying to test some demos, i can't get to work with the grideditcommand, so here is my code

Users.aspx
<%@ Page Title="Users | Telerik Trial Testing" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Users.aspx.cs" Inherits="TelerikTrial.Users" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadComboBox ID="App_List" runat="server" AutoPostBack="true" DataTextField="ApplicationName"
        DataValueField="LoweredApplicationName" OnSelectedIndexChanged="App_List_SelectedIndexChanged">
    </telerik:RadComboBox>
    <br />
    <telerik:RadAjaxManager runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="App_List">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="App_List" />
                    <telerik:AjaxUpdatedControl ControlID="User_List" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="User_List">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="App_List" />
                    <telerik:AjaxUpdatedControl ControlID="User_List" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
    <telerik:RadGrid ID="User_List" runat="server" AllowPaging="True"
        AutoGenerateColumns="False" GridLines="None"
        Skin="Windows7" OnPageIndexChanged="User_List_PageIndexChanged">
        <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
        <MasterTableView EditMode="PopUp" CommandItemDisplay="Top" DataKeyNames="UserName">
            <EditFormSettings InsertCaption="Add new user" CaptionFormatString="Edit User: {0}"
                CaptionDataField="UserName" PopUpSettings-Modal="true" />
            <Columns>
                <telerik:GridEditCommandColumn />
                <telerik:GridClientDeleteColumn />
                <telerik:GridBoundColumn DataField="UserName" ReadOnly="true" />
                <telerik:GridBoundColumn DataField="Email" />
                <telerik:GridBoundColumn DataField="LastLoginDate" ReadOnly="true" />
                <telerik:GridCheckBoxColumn DataField="IsLockedOut" />
            </Columns>
        </MasterTableView>
         <ClientSettings>
            <ClientEvents OnRowDblClick="RowDblClick" />
        </ClientSettings>
    </telerik:RadGrid>
</asp:Content>

Site.Master
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.Master.cs" Inherits="TelerikTrial.Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
    <link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
    <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server">
    </asp:ContentPlaceHolder>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Path="~/Scripts/Common/Core.js" />
            <asp:ScriptReference Path="~/Scripts/Common/jQuery.js" />
            <asp:ScriptReference Path="~/Scripts/Common/jQueryInclude.js" />
            <asp:ScriptReference Path="~/Scripts/Ajax/Ajax.js" />
            <asp:ScriptReference Path="~/Scripts/XmlHttpPanel/RadXmlHttpPanel.js" />
            <asp:ScriptReference Path="~/Scripts/Grid/RadGridScripts.js" />
            <asp:ScriptReference Path="~/Scripts/ComboBox/RadComboBoxScripts.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <div class="page">
        <div class="header">
            <div class="title">
                <h1>
                    Telerik Trial
                </h1>
            </div>
            <div class="clear hideSkiplink">
                <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false"
                    IncludeStyleBlock="false" Orientation="Horizontal">
                    <Items>
                        <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Default" />
                        <asp:MenuItem NavigateUrl="~/Users.aspx" Text="Users" />
                    </Items>
                </asp:Menu>
            </div>
        </div>
        <div class="main">
            <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
            </asp:ContentPlaceHolder>
        </div>
        <div class="clear">
        </div>
    </div>
    <div class="footer">
    </div>
    </form>
</body>
</html>

Users.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
namespace TelerikTrial
{
    public partial class Users : System.Web.UI.Page
    {
        private void Bind_User_List(String AppName = "default")
        {
            if (ViewState["AppName"] != null)
                AppName = (String)ViewState["AppName"];
 
            User_List.DataSource = new DataProvider().ObtainAllMembershipAPIUsers(AppName); // Returns a Dataset from a sql server 2k8 stored procedure...
            User_List.DataBind();
        }
 
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                App_List.DataSource = new DataProvider().ObtenerTodasLasAplicaciones();
                App_List.DataBind();
                this.Bind_User_List();
                ViewState["AppName"] = App_List.SelectedItem.Value;
            }
        }
 
        protected void App_List_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            ViewState["AppName"] = App_List.SelectedItem.Value;
            User_List.CurrentPageIndex = 0;
            this.Bind_User_List();
        }
 
        protected void User_List_PageIndexChanged(object sender, GridPageChangedEventArgs e)
        {
            User_List.CurrentPageIndex = e.NewPageIndex;
            this.Bind_User_List();
        }
 
    }
}

As you can see is pretty basic webapp... is a grid ajaxfied, etc...
So ok, everything works fine until i hit edit, when i hit it it will then "fail" and only show an a empty grid:

http://img441.imageshack.us/img441/4199/ss20110210152701.png

M guessing is expecting another databind but i dont know on what event attach and the documentation provided online http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/popupeditform/defaultcs.aspx isnt very helpful...
Hope you can answer my question and sorry to bother you m just trial testing your product to see if its fits my own coding style and of course if it really helps, so far is great the skinning, the touch-less? ajax but the documentation is very poor (uber poor), sometimes it fills to have more steps to achieve the very basic which in the original components it will just take 1 or 2...

Best Regards


Josue
Top achievements
Rank 1
 answered on 22 Feb 2011
0 answers
109 views
Currently Radscheduler support viewing record in Week, Month and Timeline. Is there anyway to add another one call 2 weeks. How i can achieved that. Please advise
Mark de Torres
Top achievements
Rank 1
 asked on 22 Feb 2011
4 answers
188 views
Hi,

When I set HttpHandlerUrl like "~/Handler.ashx?ID=1&Name=b", I got the following error:
~/Handler.ashx?ID=1&Name=b is not a valid virtual path.

It would make life much easier if I can directly pass value through query string rather than implementing configuration object and so on,

Is it possible??

Thanks,
Charlie




alien9882
Top achievements
Rank 1
 answered on 21 Feb 2011
4 answers
99 views
Hi,

I have a RadGrid with 3 tier Hierarchies using Master and DetailTable setup.

     Master -> 1st Tier Detail Table -> 2nd Tier Detail Table

Each Tier has GridClientSelectColumn.

What I am trying to do is :
Step 1) Only the GridClientSelectColumn of MasterTableView is enabled after data-binding. 
Step 2 ) When the user check the checkbox to select the row in MasterTableView, the checkbox of the corresponding rows in 1st Tier Detail Table become enabled.  When the user select a row in 1st Tier Detail Table, the checkbox of the corresponding rows in 2nd Tier Detail Table become enabled.
Step 3) When uncheck(de-select) a row, all the checkboxs of underneath Detail Table would be clear and become disabled.

I already finish the Step 1.  Is this possible be implement the other steps by RadGrid Client-side APIs? and how?

Thanks



IT Services
Top achievements
Rank 1
 answered on 21 Feb 2011
3 answers
88 views
I have got SPRadGrid to work on SP Lists but when I open up the Designer and click data binding I only see about half of my SQL servers to choose from. The account I am using should have read access to more; is there a way to force a data binding through the web part? Thanks.
Tsvetoslav
Telerik team
 answered on 21 Feb 2011
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?