Telerik Forums
UI for ASP.NET AJAX Forum
16 answers
1.5K+ views

I want simple thing to do when I click to sort any column:

first click DESC , second ASC, third NONE 

not like now- first click ASC , second DESC, third NONE 

It will be very easy but the e.NewSortOrder is read-only :(

Robert
Top achievements
Rank 1
 answered on 12 Feb 2013
7 answers
181 views
Hello,

I have a RadGrid in my User Control component. The display, paging etc everything works fine w/o AJAX. But the moment I introduce AJAX using RadAjaxManager (I haven't tried any other AJAX method!), the grid will still page/sort but I can't do a rowselect after the page/sort. The code is shown below.

Thanks.

  <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="LoadingPanel2">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="radGridProviders">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radGridProviders"
                        LoadingPanelID="LoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server" Skin="Office2007">
    </telerik:RadAjaxLoadingPanel>

        <telerik:RadGrid ID="radGridProviders" runat="server" AllowMultiRowSelection="false" AutoGenerateColumns="False"
                GridLines="Horizontal" EnableViewState="true"
                AllowSorting="true" PageSize="10" AllowPaging="True"
                Width="750"
                OnNeedDataSource="radGridProviders_NeedDataSource" Skin="Vista">
            <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
            <MasterTableView ClientDataKeyNames="ProvKey,FirstName,LastName" AllowNaturalSort="false">
                    <SortExpressions>
                        <telerik:GridSortExpression FieldName="FirstName" SortOrder="Ascending" />
                    </SortExpressions>
                    <RowIndicatorColumn Visible="False">
                        <HeaderStyle Width="20px" />
                    </RowIndicatorColumn>
                    <Columns>
                        <telerik:GridBoundColumn HeaderText="Name" UniqueName="FullName" DataField="FullName"
                            SortExpression="FullName" HeaderButtonType="TextButton">
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
                <ClientSettings EnableRowHoverStyle="true">
                    <Selecting AllowRowSelect="true" />
                    <ClientEvents OnRowSelected="radGrid_RowSelected"/>
                </ClientSettings>
        </telerik:RadGrid>

        protected void Page_Load(object sender, EventArgs e)
        {
            #region InitScripts
            string script = "function InitScripts() {" + Environment.NewLine
                + "  if (!isInit) { " + Environment.NewLine
                + "modalFormUrl = \"" + SPContext.Current.Web.Url + "/Pages/modal_providerdetail.aspx?\";" + Environment.NewLine
                + string.Format("radGridProviders = $find('{0}');", radGridProviders.ClientID) + Environment.NewLine
                + "isInit = true;"
                + "}}";
            ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "InitScripts", script, true);
            #endregion

        }

        protected void radGridProviders_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
        {
            if (Session[SESSION_ProvidersList] != null)
                radGridProviders.DataSource = Session[SESSION_ProvidersList];
            else
                SetDataSource();
        }

        public void SetDataSource()
        {
            Logger.LogDebug("[ResultsUC::SetDataSource()] start", LogCategory.SHREDD);

            List<Provider> providers = null;

           ProviderClient webServiceClient = null;
            try
            {
                webServiceClient = GatewayService.getInstance();
                providers = webServiceClient.GetResultsWithLimit(MAX_PROVIDERS, SearchCriteriaConsumer);
            }
            finally
            {
                if (webServiceClient != null)GatewayService.closeInstance(webServiceClient);
            }

            if (providers != null)
            {
                radGridProviders.DataSource = providers;
                Session[SESSION_ProvidersList] = providers;// Set to Session
            }

        }



Maria Ilieva
Telerik team
 answered on 12 Feb 2013
4 answers
503 views
Hello guys, i have been having a problem with this and been on the forums all day to no avail. i have a multivew with a tree that is a usercontrol and a RadAjaxManager for link buttons. When i set enable ajax to false, it works so i know its an ajax issue. I am not using any update panels. i keep getting this error when i click my link button:

Microsoft JScript runtime error: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'ctl00_ContentPlaceHolderMain_ctl00_ContentPlaceHolderMain_ParentTreePanelPanel'. If it is being updated dynamically then it must be inside another UpdatePanel.

Snippet:

<%@ Page Language="C#" MasterPageFile="~/DEP-tree.master" AutoEventWireup="True"<br>
   Inherits="DEPSite.Management.EntityDefinitions" Title="DEP Element Definitions"<
br
  CodeBehind="EntityDefinitions.aspx.cs" %><
br>
<
br><%@ Register Src="~/UserControls/EntityTreeUC.ascx" TagName="EntityTree" TagPrefix="uc2" %>
<
br><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<
br><br><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderSide1" runat="Server"><br>
    <
uc2:EntityTree ID="EntitySelectionTree" runat="server" ShowEntityStatus="true" SelectFirstNode="true" />
<
br></asp:Content><br><br> <telerik:RadAjaxManager runat="server" ID="AjaxManager" EnableAJAX="true">
<
br>        <AjaxSettings><br><telerik:AjaxSetting AjaxControlID="ParentLinkButton">
<
br>                <UpdatedControls>
<
br>                    <telerik:AjaxUpdatedControl ControlID="ParentTree"/>
<
br>                </UpdatedControls><br>            </telerik:AjaxSetting>
<
br></AjaxSettings><br>
<
br><asp:View ID="ParentView" runat="server">
<
br>                <uc2:EntityTree ID="ParentTree" runat="server" ShowEntityStatus="true" SelectFirstNode="true" />
<
br>        </asp:View><br>
^format code block added a bunch of 'br's

i have also tried putting the tree in a panel as suggested on some forum post already
Thanks 
Maria Ilieva
Telerik team
 answered on 12 Feb 2013
6 answers
154 views
Hi,

I want to Remove the remaining file inputs when a user starts the upload using a button tied to startUpload.

Is there a way to detect which inputs do not have any files?

Thanks, Marty
moegal
Top achievements
Rank 1
 answered on 12 Feb 2013
10 answers
512 views
How can I remove a RadWindow from it's RadWindowManager in client-side ? The problem is that I am using a RadWindow as a alert dialog which is created in server-side it's VisibleOnPageLoad = true and therefore on every postback the window keeps popping up. I would like to remove the window from the RadWindowManager when the user closes the RadWindow dialog but there is no client-side API for this. What is the standard way of removing RadWindow from RadWindowManager from the client-side ?
Aarsh
Top achievements
Rank 1
 answered on 12 Feb 2013
4 answers
782 views
while using

<telerik:RadSkinManager ID="QsfSkinManager" runat="server" ShowChooser="true"></telerik:RadSkinManager>

following error throws out..

The type or namespace name 'RadSkinManager' does not exist in the namespace 'Telerik.Web.UI' (are you missing an assembly reference?)
Suthish
Top achievements
Rank 2
 answered on 12 Feb 2013
1 answer
158 views

We've been using RadGrid on our site and love it. Now we need to show more than 1 row of data per record. I could not find a way for RadGrid to do this, so I've been looking at RadListView. Then I came across this link...

http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx

Now knowing I can use RadGrid is great since I'm familiar with it. But before coding, I want to know when I'd use RadListView over RadGrid, in case I'm missing something. For instance, I would need the RadGrid in the link to do the following, which I've done in our "single row" RadGrids...

1) Change checkboxes and comboboxes right on form on each record. (via GridTemplateColumn and ItemTemplate)

2) Have an "Edit" command show a popup for other record data. (via FormTemplate and EditMode="PopUp")

3) Select records that let me access the record's data clientslide (via get_masterTableView())

BTW, we still need each RadGrid record to go all the way across the control--so records wouldn't be side-by-side like in the example, as we simply need 2-3 lines of data to display within each record. In that case, would the link below be a better example of what we need? Can it do the 3 points above? Or functionally, is it basically the same as the first link?

http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/cardview/defaultcs.aspx

Thanks for any direction you can give as this will greatly determine the path we take.
Kostadin
Telerik team
 answered on 12 Feb 2013
1 answer
48 views

Does telerik radcontrols for asp.net ajax q3 2010 work with Windows 8?

I see a javascript error :

javascript runtime : unable to get property 'documentElement' of undefined or null reference..

Thanks,Peter
Slav
Telerik team
 answered on 12 Feb 2013
2 answers
557 views
How do i properly specify a z-index for the AutoComplete Textbox?  I've put an AutoComplete Textbox in a modal popup Extender, and the problem i'm having is that the drop down appears behind the window and isn't visible.   I've tried specifying a z-index on the control itself.

RadAutoCompleteBox1.Style["z-index"] = "100000";

and i've also tried specifying a z-index on the item template markup

<DropDownItemTemplate>                
    <table cellpadding="0" cellspacing="0" width="450px" style="z-index:100000">
...
   </table>
</DropDownItemTemplate>

and neither of these seem to have any effect.

Please advise.
-Mark
Mark Kucera
Top achievements
Rank 1
 answered on 12 Feb 2013
13 answers
572 views
Hi,

I have been using RadOpen function to open the first dialog and if any further dialogs from within the newly opened dialog are required, i have been using parentwindowmanager.open function.

I just noticed that i dont really need to call RadOpen function to open the first dialog, the first dialog and all the dialogs can just be opened using the

radwindowmanager.open function.

I have now decided to use the .open function throughout, I would like to know if this is an suitable way of doing things and does it have any issues associated with this. Should one be using RadOpen always to open the first dialog?

I am doing this because, although i could open the first dialog with radopen and consume the add_close function. Everytime i tried to do this with open function, it threw up a stack overflow probelm.
So now i have found this work around to the above problem and would like to make my code more consistent and only use just one function.

http://www.telerik.com/community/forums/aspnet-ajax/window/onclientclose-clientcallbackfunction-not-firing-after-window-close-arg-is-called.aspx




RBarnes
Top achievements
Rank 1
 answered on 12 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?