Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
108 views
I've added another button to the standard edit template, 'Update then edit next row'.  I need to create an event that will put the next row, if it exists, into edit mode.

protected void rgDemandForecast_OnItemCreated(object source, GridItemEventArgs e)
        {
            if (e.Item is Telerik.Web.UI.GridEditFormItem && e.Item.IsInEditMode)
            {
                LinkButton linkButton = new LinkButton();
                linkButton.Text = "Update And Edit Next Row";
                linkButton.CommandName = "Update";
  
                linkButton.Attributes["onclick"] = "some javascript";
                      //or
                linkButton.Click += updateAndEditNextRow_OnClick;
  
                
LinkButton update = e.Item.FindControl("UpdateButton") as LinkButton;
                update.Parent.Controls.Add(new LiteralControl(" "));
                update.Parent.Controls.Add(linkButton);
            }
  
  
        }

Can someone give me a general outline of which javascript methods i need to get the current row and then put the next row into edit mode?

I don't mind doing this in my updateAndEditNextRow_OnClick method, but would prefer to keep this client-side.
Danny
Top achievements
Rank 2
 answered on 25 Jan 2013
3 answers
90 views
Hi!

I am trying to overcome a limitation in RadGrid (which I think is still around, I am using version 2010.1.309.35):
If AllowMultiRowSelection = true, and the user selects multiple rows by holding down the Shift-key, there is no postback even if

EnablePostBackOnRowClick = true.


There is a workaround described here:
http://stackoverflow.com/questions/7424397/telerik-radgrid-onrowselected-events-all-done-event-for-multiple-selection/14381154#14381154

I have slightly modified the client code to look like this:
function IW_RowSelected(sender, eventArgs) {
    var e = eventArgs.get_domEvent();
    if (!sender.AllowMultiRowSelection || !e.shiftKey) {
        // Multiple row not enabled or shift not pressed, nothing to do
        return;
    }
      
    if (window.rowSelectedTimeout) {
        // If selecting multiple rows, clear the previous row's rowSelectedTimeout
        window.clearTimeout(window.rowSelectedTimeout);
    }
  
    rowSelectedTimeout = window.setTimeout(function() {
        window.rowSelectedTimeout = null;
        alert('rows selected'); // Should force a postback here
    }, 10);
}

And it works fine. There is just one piece missing: How do I force a postback when the "last" row has been selected? Right now, all I do is an "alert('rows selected')", but I need to force a postback so that my server-side code can detect which rows are currently selected.

If it matters, I use an ASP.NET UpdatePanel to get partial updates.

Thanks!
/Fredrik
Kostadin
Telerik team
 answered on 25 Jan 2013
1 answer
117 views
Hello!
In my project I use RadGrid with dynamic columns creation and configuration. Available columns is stored in database and columns set is depend on user group. User can resize, hide/show and reorder columns and configuration is persisted in db using REST ajax requests to service. Filtering and grouping also is enabled. Dynamically created at PageInit event Grid is wrapped by ASP.NET Update panel and binded at server side using NeedDataSource event. Grid.MasterTableView.EnableColumnsViewState = false (otherwise grid throws exception at postback request). All is OK untill user will not start columns reoredering. If user reorder columns, new order will be stored at db, but Ids of the links in column headers that responsible for invoking sort operation still the same... so at the next postback request (for example - rebind) we will get sorting not on the target column, but on the column that be place at that position before reordering. In you sample demo with client-side columns reordering sorting is disabled... Because of grid doesn't support sorting with enabled client-side reordering?
Angel Petrov
Telerik team
 answered on 25 Jan 2013
7 answers
383 views
I am working in asp.net and I need to disable whole page with ajax update panel. There is a button on usercontrol and on click this button I need to disable whole page. Please let me know how I can do this.

Kuldeep Dwivedi
Kuldeep
Top achievements
Rank 1
 answered on 25 Jan 2013
1 answer
134 views
Hi there,

I have a problem in using the radListView with AJAX.

As you can see in the enclosed image I want the user be able to download a file. (radlistview.png)
When I enable AJAX an error occurs (error.png).
I use the following code:

<
asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
       
    <telerik:RadAjaxManagerProxy ID="rampRequest" runat="server">
        <AjaxSettings>  
            <telerik:AjaxSetting AjaxControlID="paRequestListView">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="paRequestListView" LoadingPanelID="raLoadingPanel"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
       
    <asp:Panel ID="paRequestListView" runat="server">
         <NMHG:RequestListView id="RequestListView" runat="server"></NMHG:RequestListView>
    </asp:Panel>
     
</asp:Content>

protected void rlvRequest_ItemCommand(object source, RadListViewCommandEventArgs e)
        {
            //Download file
            if (e.CommandName == "Download")
            {
                //show save as dialog
                System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
                response.ClearContent();
                response.Clear();
                response.ContentType = "text/plain";
                response.AddHeader("Content-Disposition", "attachment; filename=" + RequestDownloadFileName + ";");
                response.TransmitFile(ConfigurationManager.AppSettings.Get("Download directory") + RequestDownloadFileName);
                response.End();
            }
        }


When I remove the <telerik:RadAjaxManagerProxy> tag from the code above i am able to download the file.
Any idea why my download not works when AJAX is enabled?

I also noticed the LoadingPanel for my RadListView is never shown. AJAX functions normal in my RadListView.
I use the same code for my RadGrids were the LoadingPanel is shown.


Regards,

Marcel

Maria Ilieva
Telerik team
 answered on 25 Jan 2013
4 answers
235 views
Hi,
I know we can export grid to excel/pdf (opens the save/open dialog box on IE).  However, my client needs a "email as Excel / pdf"  functionality.  Is it possible to get a byte[] of the exported content, so we can attach it to an email.

Thanks,
Anand
Mike
Top achievements
Rank 1
 answered on 25 Jan 2013
4 answers
187 views
I am using RadGrid.Net2 dll having 5.1.6.0 version

strangely on staging and local environment i have my Page Size combo box enabled showing default 10,15,20 and 50 as value in it.

But on Production this combobox is readonly and disabled. why so ? there is not code i have writtent to disabled it.

following is my control declaration
<rad:RadGrid ID="rgUserList" runat="server" Width="100%" AutoGenerateColumns="false"
AllowPaging="true" PageSize="10" PagerStyle-Mode="NextPrevAndNumeric" EnableTheming="true"
GridLines="Vertical" OnItemDataBound="rgUserList_ItemDataBound" AllowSorting="true"
AllowFilteringByColumn="false" OnNeedDataSource="rgUserList_NeedDataSource"
Maria Ilieva
Telerik team
 answered on 25 Jan 2013
3 answers
92 views
I am trying to match a four digit number with a radautocompletebox using the contains filter. It works great except for when the last digit is a 0, in which case it doesn't filter by that digit (The same thing happens with a 9). For example, if I type 7260, the first match I get is for 7264 even though there is an entry of 7260 in the list. Any ideas?
Kevin
Top achievements
Rank 1
 answered on 25 Jan 2013
3 answers
280 views
By default there is a black bounding border one pixel wide around the ListView. Setting BorderColor, Style, and/or Width has no effect. Is there a way to remove the border?
Eyup
Telerik team
 answered on 25 Jan 2013
6 answers
263 views
Here is my html

<center>
        <div id="divloading" style="z-index: 9000;">
    <table class="centertable" border="0" style="width: 400px;" cellpadding="0" cellspacing="0">
        <tr>
            <td style="text-align: center;">
            <center><telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" HorizontalAlign="Center" runat="server"
    Skin="Outlook" MinDisplayTime="1500" IsSticky="True" Style="position: absolute; top: 0; left: 0; height: 100%; width: 100%;" Transparency="20"  >
             <img src="ajaxloadingpanel_images/Loading.gif" title="Processing..." />
            </telerik:RadAjaxLoadingPanel>
            </center>
           
            </td>
        </tr>
    </table></div></center>


Please see the attached screenshot to see example.

Thanks,




Angel Petrov
Telerik team
 answered on 25 Jan 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?