Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
174 views
I need to implement a Custom Sort on a grid.

To do this, I need to pass the sort criteria to my Data Access Layer. I thought that the args for the SortCommand would provide me with what I need, but they only detail the column currently being sorted. I expected to discover in this object all of the sorted columns and their current sort order (to be clear, my grid allows multi-column sorting).

I then thought that I might be able to use the Grid.MasterTableView.SortExpressions collection, but that shows the old sort expressions.

Am I right in thinking that I have to manually create the current sort expressions collection from the old one and the args of the SortCommand event handler if I want the full sort expression for the grid?

-- 
Stuart
Veli
Telerik team
 answered on 14 Sep 2010
8 answers
206 views
VS 2010 (.NET 40) RadControls AJAX 2010 Q1

I'm using the most simple of setups...  SQLDataSource  and a table with only the columns suggested in the Scheduler's Data Source Configuration Wizard.  If i double click on any appointment that isn't an All Day event, i'll get this script error message.

Error: 'this._pickers.startDate' is null or not an object

which, when viewed in the debugger, refers to this line of code (line 4779) of the Telerik.Web.UI.WebResource:

 

var k=[$get(this._pickers.startDate.get_element().id+"_wrapper"),$get(this._pickers.startTime.get_element().id+"_wrapper"),$get(this._pickers.startTime.get_element().id+"_timeView_wrapper"),$get(this._pickers.endDate.get_element().id+"_wrapper"),$get(this._pickers.endTime.get_element().id+"_wrapper"),$get(this._pickers.endTime.get_element().id+"_timeView_wrapper"),$get(this._templateId+"_SharedCalendar")]; 

I have no other customizations to the RadScheduler: 
<telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="EndDate"   
DataKeyField="CalId" DataSourceID="SqlDataSource1" DataStartField="StartDate"   
DataSubjectField="Subject" DataDescriptionField="Description"   
DataRecurrenceField="RecurDesc" DataRecurrenceParentKeyField="RecurrenceID" >   
</telerik:RadScheduler> 
 
 


And i have one of these that comes before the RadScheduler declaration:

 

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">   
<telerik:RadScriptManager ID="RadScriptManager1" runat="server">   
</telerik:RadScriptManager> 
 
 


Any ideas?

 

 

 

 



Sophal
Top achievements
Rank 1
 answered on 14 Sep 2010
1 answer
135 views
I am receiving the following javascript error when doing a RadAjax postback:

Error: uncaught exception: [Exception... "Security error"  code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)"  location: "http://localhost:2927/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_am_sm_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-AU%3a8f393b2b-3315-402f-b504-cd6d2db001f6%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.1.519.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-AU%3afcd44c12-f50d-4937-b05d-1aa46b5c5b3e%3a16e4e7cd%3aed16cbdc%3af7645509 Line: 1061"]

The ajax postback still works fine - but I am worried about this error.

Using Telerik 2010.1.519.35.

Do you know what it means?
Maria Ilieva
Telerik team
 answered on 14 Sep 2010
1 answer
128 views

Is it just me or does the Pulse Animation Type not work.
It appears to first change the image and then pulse/fade.
Should it not do it between the images?
Or are my setting wrong.

I tried it by going to the demo site 'http://demos.telerik.com/aspnet-ajax/rotator/examples/default/defaultcs.aspx' and changing to slideshow and pulse.

It just looks wrong. I tried changing the scrollduration and frameduration to see if i can see it working better. But no avail.

Can someone shed some light on this?

A

Fiko
Telerik team
 answered on 14 Sep 2010
2 answers
134 views
Hello,

I'm trying to create a solution similiar to the Master/Detail demo.

I have 2 grids on a single page, MasterGrid and DetailsGrid.
I have AllowRowSelect="true" in MasterGrid and that works fine.
My problem is that I need to get the selected DataKeyValue (of MasterGrid) from within the DetailsGrid_NeedDataSource as a parameter value.

I can get the DataKeyValue from within a grids own GridCommand event, something like:
protected void MasterGrid_DeleteCommand(object source, GridCommandEventArgs e)
{
   GridDataItem dataItem = (GridDataItem)e.Item;
   int id = Convert.ToInt32(dataItem.GetDataKeyValue("ID"));
}

But again, I can't get the value in an unrelated method (NeedDataSource of a different grid).
Any assistance is appreciated.

Thank you,
Ronnie
Ronnie
Top achievements
Rank 1
 answered on 14 Sep 2010
2 answers
166 views
I am running this example

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/xmldatasource/defaultcs.aspx

but getting this error "Unable to cast object of type 'Telerik.Web.UI.GridDataItem' to type 'Telerik.Web.UI.GridEditFormItem'
" on bold line

protected void RadGrid1_UpdateCommand(object source, GridCommandEventArgs e)
    {
        GridEditFormItem gridEditFormItem = (GridEditFormItem)e.Item;
         Hashtable ht = new Hashtable();
        gridEditFormItem.ExtractValues(ht);



aspx code is like this:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditAll.aspx.cs" Inherits="EditAll" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Test Page</title>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

        <script type="text/javascript">
        <!--
         function RowDblClick(sender, eventArgs)
         {
             sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical());
         }
      
     -->    
        </script>

    </telerik:RadCodeBlock>
</head>
<body>
    <form runat="server" id="mainForm" method="post">
    <div id="divMsg" runat="server" style="float: left;">
        <asp:Label ID="lblMsg" runat="server" ForeColor="Red"></asp:Label>
    </div>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <!-- content start -->
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                     <telerik:AjaxUpdatedControl ControlID="divMsg" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadGrid ID="RadGrid1" Width="97%" DataSourceID="XmlDataSource1" EnableAjaxSkinRendering="true"
        ShowStatusBar="True" AllowSorting="True" PageSize="7" GridLines="None" AllowPaging="True"
        runat="server" OnUpdateCommand="RadGrid1_UpdateCommand">
        <MasterTableView AutoGenerateColumns="false" DataKeyNames="id" EditMode="InPlace" Width="100%">
            <Columns>
                <telerik:GridBoundColumn UniqueName="id" DataField="id" HeaderText="ID" ReadOnly="True"
                    HeaderStyle-Width="10%" />
                <telerik:GridBoundColumn UniqueName="Name" DataField="Name" HeaderText="Name" HeaderStyle-Width="25%"
                    ColumnEditorID="GridTextBoxColumnEditor1" />
                <telerik:GridDropDownColumn UniqueName="Class" HeaderText="Class" ColumnEditorID="GridDropDownListColumnEditor1"
                    ListTextField="Class" ListValueField="Class" DataSourceID="XmlDataSource1" DataField="Class"
                    HeaderStyle-Width="10%" />
                <telerik:GridNumericColumn UniqueName="Salary" DataField="Salary" HeaderText="Salary"
                    DataFormatString="{0:C}" HeaderStyle-Width="10%" ColumnEditorID="GridNumericColumnEditor1" />
                <telerik:GridEditCommandColumn UniqueName="Edit" HeaderText="Edit All">
                </telerik:GridEditCommandColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnRowDblClick="RowDblClick" />
        </ClientSettings>
    </telerik:RadGrid>
    <telerik:GridTextBoxColumnEditor ID="GridTextBoxColumnEditor1" runat="server" TextBoxStyle-Width="180px" />
    <telerik:GridNumericColumnEditor ID="GridNumericColumnEditor1" runat="server" NumericTextBox-Width="50px" />
    <telerik:GridDropDownListColumnEditor ID="GridDropDownListColumnEditor1" runat="server"
        DropDownStyle-Width="70px" />
    <br />
    <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/App_Data/XML/Customer.xml">
    </asp:XmlDataSource>
    <!-- content end -->
    </form>
</body>
</html>

Is there way to cast directly, to resolve this error?

Thanks

.
Purushottam Somani
Top achievements
Rank 2
 answered on 14 Sep 2010
4 answers
137 views
hi,

i have a problem with the radtreeview in serversideclientcallback mode: i have one timer on the mainpage which refreshes the radtreeview every 10 secondes, and i have a second timer in the subpage which updates another control. sometimes the radtreeview starts to expand, shows the loading panel but didn't finish to expand the current node.

thank you for your help,
ingemar
Ingemar
Top achievements
Rank 1
 answered on 14 Sep 2010
1 answer
108 views
Hello,
             I have a tree with several nodes. I have function OnNodeClick to get the selected node. But I also want the node that lost focus. How do I get that information?..

Thanks,
Bharani
Shinu
Top achievements
Rank 2
 answered on 14 Sep 2010
5 answers
110 views
Good day!
I have got m own class News
I've made a child class NewsForSite

public class NewsForSite : News
    {
        public string SitesTree;
    }


NewsForSite has one more parametr - string SitesTree.

I'm making NewsForSite exemplar on base of News exemplar by coping all the parameters of News to NewsForSite and writing SitesTree string to each NewsForSite.
In debugger (you can see it at attached picture) I can see that all of paramerts of NewsForSite are in base collection and SitesTree parametr is outstanding, and when I try to bind this parametr to grid like other parmetrs, there is an empty space instead of SitesTree stings in grid. Otner columns look well.
I bind all the parametrs this way:

grUsersGroup.DataSource=newsWithSitesList; //( var newsWithSitesList = new List<NewsForSite>();)

<telerik:RadGrid  ID="grUsersGroup" runat="server" >
        <MasterTableView AutoGenerateColumns="False" EditMode="PopUp" DataKeyNames="Id">
             <Columns>
                <telerik:GridBoundColumn DataField="Id" HeaderText="ID"
                    SortExpression="Id" UniqueName="Id" ReadOnly="true">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="SitesTree" HeaderText="Где опубликована"
                    SortExpression="SitesTree" UniqueName="SitesTree" ReadOnly="true" AllowFiltering="true">
                </telerik:GridBoundColumn>            
             </Columns>            
        </MasterTableView>
    </telerik:RadGrid>

what is the right way of binding of SitesTree to me?
lina fetisova
Top achievements
Rank 1
 answered on 14 Sep 2010
2 answers
170 views
Hi everyone,

I've search for 2 days and found no solution to solve my problem. That is when I deploy my web on my own server (using IIS7) Telerik RadControls works fine, but 3 days ago, after deploying my site on a shared hosting, the RadControls is not displayed properly, RadMenu becomes a large list of hyperlink, RadCombo box cannot drop down, all RadControls lost their skins and functions.

When try on IE, there's javascript error:"Sys is undefined".

I've tried configure as http://www.telerik.com/help/aspnet-ajax/installdeployingonsharedhosting.html guide, the provided said that they has created a vitual directory point to my application folder and grand all necessary permission for it, my web is accessible but the controls still failed to display.

Following the error:"Sys is undefined", I checked and sure that my web was AJAX ENABLE and I was told to add: 

<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>

and

<location path="Telerik.Web.UI.WebResource.axd"> 
   <system.web> 
     <authorization> 
       <allow users="*"/> 
     </authorization> 
   </system.web> 
</location> 

but there's still errors.

I found one case like me http://forum.winhost.com/archive/index.php/t-279.html, but the solution is not very cleared.

So any help of you guys will be very appreciated.

p/s: I am using RadControls for ASP.NET AJAX Q1-2010



Quan Nguyen
Top achievements
Rank 1
 answered on 14 Sep 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?