Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
77 views
Hello,

In my RadGrid all my items are always in edit mode; I use gridtemplatecolumn with radtextbox for editing. I want to get values of whole columns and sum it up, to show user new sum of the column in label outside radgrid, after any cell is changed - i use onblur function. I ve tried to use dataItem.getDataKeyValue("column_name") but it returns original values, not the ones after edit. Any suggestions on how can i do it in javascript?
Marin
Telerik team
 answered on 02 Sep 2011
1 answer
48 views
Hi there,

This does not work in IE7, IE8, but does in Firefox.

var dock = $find("<%= RadDock1.ClientID %>");

dock is null.

Any ideas?
Princy
Top achievements
Rank 2
 answered on 02 Sep 2011
2 answers
102 views
Hi,

I'm having a problem with the paging buttons. The initial buttons 1-10 works just fine, but when I go to "..." (landing at 11), all the buttons will update their text, but will still be bound to the same events as their previous button IDs had, meaning that if I press 17, I end up back on back 8.

I've searched your forums for similar issues and found http://www.telerik.com/community/forums/aspnet-ajax/grid/355586-radgrid-paging-problem.aspx however this did not help me on the way to a solution.

In order to do some error searching, I've dumbed down an example as much as possible, leaving me with :

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SimpleView.ascx.cs" Inherits="AccessToWeb.Web.SimpleView" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<telerik:RadScriptManager ID="RadScriptManager" runat="server"></telerik:RadScriptManager>
<!-- content start -->
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<div style="padding-left:20px;">
    <telerik:RadGrid ID="RadGrid1" AllowPaging="True" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource" GridLines="None" EnableViewState="true">
      <MasterTableView EnableViewState="true" />
      <PagerStyle Mode="NumericPages" />
    </telerik:RadGrid>
</div>

And codebehind:

namespace AccessToWeb.Web
{
    public partial class SimpleView : System.Web.UI.UserControl
    {
        private string _con, _query;
 
        protected void Page_Load(object sender, EventArgs e)
        {
            _con = Sitecore.Context.Item["Connectionstring"];
            _query = Sitecore.Context.Item["Select statement"];
 
            if (string.IsNullOrEmpty(_con) || string.IsNullOrEmpty(_query))
            {
                this.Visible = false;
                return;
            }
        }
 
        public DataTable GetDataTable(string query)
        {
            SqlConnection conn = new SqlConnection(_con);
            SqlDataAdapter adapter = new SqlDataAdapter();
            adapter.SelectCommand = new SqlCommand(query, conn);
 
            DataTable myDataTable = new DataTable();
 
            conn.Open();
            try
            {
                adapter.Fill(myDataTable);
            }
            finally
            {
                conn.Close();
            }
 
            return myDataTable;
        }
 
        protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = GetDataTable(_query);
        }
    }
}


If I instead of NumericPages use NextPrevAndNumeric, the same problem exists, but the Next button will always point at page 2, no matter which page I am on.
Marin
Telerik team
 answered on 02 Sep 2011
1 answer
310 views
Hi,

   Iam using treeview when we click the node in the treeview based on the node value it will display the data in the radgrid. In the below code we are using list to bind the data.In the list we are getting the data but when we bind it is not displaying any data.Can you please do the needful.

 List<LegacyResource> result = null;

protected void rdCategory_NodeClick(object sender, RadTreeNodeEventArgs e)
    {
        try
        {

            if (e.Node != null)
            {
                

                if (int.TryParse(e.Node.Value, out ResourceID))
                {
                    result = LegacyResourceAgent.GetResourceLinks(LinkResourceData, ResourceID);
                    //result.
                    if (result != null)                   
                   this.ManageTootipsGrid.Rebind();
                }
                else
                {
                    this.ManageTootipsGrid.DataSource = result;
                    this.ManageTootipsGrid.DataBind();
                }

            }
        }
        catch (Exception ex)
        {

        }

    }


 protected void manageTooltips_onNeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        //refresh data for grid (needed when user performs update, sort, etc...
        this.ManageTootipsGrid.DataSource = result;

    }
Jayesh Goyani
Top achievements
Rank 2
 answered on 02 Sep 2011
8 answers
291 views
Hello.

I am trying to sort a RadGrid by GridHyperLinkColumn . I enabled the sorting and created sorting expression.

I want to make the header clickable in order to change it from ascending/descending  order .
however I cant make the header of the GridHyperLinkColumn clickable  . Can somebody offer me a solution? It does work on theGridBoundColumn  when I enable sorting .

Also after sorting ,the style of the header is changed  . Is there any way to stop it ?

Thank you

Joe 

Joseph
Top achievements
Rank 1
 answered on 02 Sep 2011
1 answer
99 views
When i minimize my window in a tabstrip like your demo and I click on tab to show window like this, The content of my window is reloaded and i lost all my change before minimize. If i look in source of my page, i see change i've made but restore cause a reload. Why ?

 

 

function ShowWindow(win) {

 

 

 

 

if (!win.isVisible()) {

 

 

win.show();

 

win.restore();

 

 

 

//if the window was maximized before client minimizes it, we need to restore

 

 

 

//its maximized state

 

 

 

if (win._Maximized) {

 

 

win.maximize();

 

win._Maximized =

 

null;

 

 

}

 

}

 

 

 

//ensure that the currently active RadWindow will have the highest z-Index.

 

 

 

var popupElem = win.get_popupElement();

 

 

 

 

var oldZindex = parseInt(popupElem.style.zIndex);

 

 

 

 

var styleZIndex = win.get_stylezindex();

 

 

 

 

var newZIndex = (styleZIndex) ? styleZIndex : Telerik.Web.UI.RadWindowUtils.get_newZindex(oldZindex);

 

 

popupElem.style.zIndex =

 

"" + newZIndex;

 

 

win.setActive(

 

true);

 

 

}

Collin
Top achievements
Rank 1
 answered on 01 Sep 2011
1 answer
304 views
I understand that this is supposed to be JQuery code, and the following calls in many of your clientside ajax samples:

 

 

alert( $get("<%= telerikAjaxCtrlID.ClientID %>"));

give you "object"

and

alert( $find("<%= telerikAjaxCtrlID.ClientID %>"));

give you "object object"

and that you can apply JQuery operations against the objects the statements return.  And, I have read some Telerik documentation that refers me to http://api.jquery.com to get a list of what JQuery methods and properties are available because Telerik uses the original JQuery library that has been modified in a minor way with some appended code while preserving the original. 

But, the api.jquery.com documentation describes functions such as $.get and $.find (NOT $get and $find), and none of the JQuery methods and properties that can be applied to $.get and $.find seem to work against what is returned by $find and $get.  For example, the JQuery $.get function is used to retrieve javascript from the server - not to locate any controls on a page.  I can't see how anyone could expect methods and properties that come from $.get to be able to work with $get which you seem to use to locate controls.

Where can I find documentation that describes the jquery methods and properties availabe from the objects returned by $find and $get.  I can't use intellisense because I'm working on a corporate project, where the team leader won't allow the insertion of JQuery intellesense libraries into the webpages.  Besides, I'm NOT looking for intellisense.  I need a printed list of methods/properties that I can use which I can reference and have a global view of.

 

Dan Lehmann
Top achievements
Rank 1
 answered on 01 Sep 2011
2 answers
49 views
Hi!
I'am trying to drag and copy one record from a Radgrid to another Radgrid, but at the moment only can Drag and Drop, i would like to just copy, records from Radgrid1 have to stay here.
Is it possible to do this?.
kharen
Top achievements
Rank 1
 answered on 01 Sep 2011
4 answers
67 views
I need to make the entire time slot (the cell for a given day) clickable to the detail view of the day. So the same behaviour as clicking the date link but for the whole cell. Any ideas?

Thanks,
Dan
Dan
Top achievements
Rank 1
 answered on 01 Sep 2011
2 answers
78 views
Hello,

I have a costume skin that works fine, except when I implement the 'HeaderStyle-CssClass="rgcItemName" ' inside the grid's columns.  The background color on the header doesn't change when you sort.  How can manipulate this css class (HeaderStyle-CssClass="rgcItemName" ) in order to activate the background color when you click a header in order for it to sort?

<telerik:GridTemplateColumn HeaderText="Name" HeaderStyle-HorizontalAlign="Center" HeaderStyle-CssClass="rgcItemName" ItemStyle-CssClass="rgcItemName"
                            HeaderTooltip="Full spelled out name of the primitive. May not exceed 200 characters." SortExpression="name">
                            <ItemTemplate>
                                <%#Container.DataItem("name").ToString%>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>


HeaderStyle-CssClass="rgcItemName"

.rgcItemName
{
    width:13%;
}


your help would be appreciated!

Thanks!

German
German
Top achievements
Rank 1
 answered on 01 Sep 2011
Narrow your results
Selected tags
Tags
+124 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
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
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?