Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
73 views
I have page with a tabstrip that has two tabs.  Each tab has a grid along with a button to export the grid. 

The first page exports, however the grid on the second tab will not export. 

It does not throw an error, it fires the Grid1.MasterTableView.ExportToExcel() but does not export.  No prompt to save or open.  I have looked over the code and can't see what's causing this.

Is this a limitation of exporting and tabs?

Mike
Top achievements
Rank 1
 answered on 18 Apr 2011
19 answers
270 views
I have a page with three rad comboboxes showing State, City, and PostalCode. It is basically a copy of your multiple combobox example.

This page is one of many in a multistep wizard and each page has previous / next buttons.  The problem occurs if the user goes back one step to the multiple combobox page and then changes the comboboxs. They get the following error on the second combobox:


System.ArgumentOutOfRangeException was unhandled by user code
  Message="Selection out of range\r\nParameter name: value"
  Source="Telerik.Web.UI"
  ParamName="value"

Since I copied your example code, I tested your example to see if your page would also throw an error if I used the back button and then changed the combobox selections. I did get an error.

Here are the steps to reproduce the error:

1) Go to http://www.telerik.com/DEMOS/ASPNET/Prometheus/Combobox/Examples/Functionality/MultipleComboBoxes/DefaultCS.aspx
2) Select a continent, then country, and then city
3) Click on Telerik Home (to simulate clicking a next button like my multistep wizard)
4) Use your browser history to go back (my application has a previous button with onclick=history.back)
5) Selecting a continent will throw an error (I assume on country DataBind)

Regards,
http://www.donaldlee.net
Simon
Telerik team
 answered on 18 Apr 2011
1 answer
88 views
Hi,
I'm new to this project and to RadControls so please bare with me. I have a button that when clicked I need to return back a dynamically created document from the server. However, the button is contained with in a user control (ascx) which is apparently dynamically loaded within an asp:panel. I don't exactly understand how this is implemented but here is some of the markup code from the aspx page:
<telerik:RadAjaxManager ID="ajaxManager" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        onajaxrequest="ajaxManager_AjaxRequest"
        UpdatePanelsRenderMode="Inline">
        <ClientEvents OnRequestStart="centerLoadingPanel"></ClientEvents>
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="ajaxManager">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="infoBar" />
                    <telerik:AjaxUpdatedControl ControlID="errorPanel" />
                    <telerik:AjaxUpdatedControl ControlID="contentScreenPanel" />
                    <telerik:AjaxUpdatedControl ControlID="tabStrip" />
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="errorPanel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="errorLabel" />
                    <telerik:AjaxUpdatedControl ControlID="editMode" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="infoBar">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="screenOverviewPanel" />
                    <telerik:AjaxUpdatedControl ControlID="toolBarPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="ToolBarControl1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="contentScreenPanel" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="screenOverviewPanel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="lblScreenTitle" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

Somewhere later in the same aspx page we have the following code:
<telerik:RadPane runat="Server" ID="lowerContentPane" Scrolling="Both" Width="100%" Height="542">
                            <asp:Panel ID="errorPanel" runat="server">
                                <asp:Label ID="errorLabel" ForeColor="Red" runat="server"></asp:Label>
                                <asp:HiddenField runat="server" ID="editMode" />
                            </asp:Panel>
                            <asp:Panel ID="contentScreenPanel" runat="server"></asp:Panel>
                        </telerik:RadPane>

So it seems that the ascx pages are loaded into the contentScreenPanel.  I don't want to disable ajax for the contentScreenPanel control because that will affect all content loaded in it. I'm wanting to disable ajax for a button within a specific ascx page. I found the following pages that have some info but I'm unsure how to implement this in my situation because they all deal with the RadAjaxPanel and not the RadAjaxManager:
http://www.telerik.com/help/aspnet-ajax/ajax-download.html
http://www.telerik.com/help/aspnet-ajax/ajax-exclude.html
http://www.telerik.com/support/kb/aspnet-ajax/ajax/how-to-disable-ajax-for-specific-items-of-an-ajax-ified-navigational-control.aspx

I appreciate any advice you can offer.
Thanks,
G
20Below
Top achievements
Rank 1
 answered on 18 Apr 2011
2 answers
93 views
I have implemented filtering on my RadGrid via a web service method with the following signature:

public Dictionary<string, object> GetAllUsersGrid(int startRowIndex, int maximumRows, List<GridSortExpression> sortExpression, List<GridFilterExpression> filterExpression)

My problem is I don't want to support all of the available GridSortExpressions.  How do I prevent some of them from appearing in the user interface?

Phil Hadley
Top achievements
Rank 1
 answered on 18 Apr 2011
2 answers
221 views

Hello.

I use RadGrid and ObjectDataSource (ods) to fill the grid with data.

I used to make insert, update and delete from code behind (using RadGrid events: UpdateCommand, DeleteCommand , etc) - so, i used to create my objects using FindControl(string id) and then manipulate with them.

Now, I decide to do this using ods, but i cannot work it out while i have nested objects.

(in case of single object it works fine - i mean if i Insert, Update or Delete only Person class - see below)

Here is my example:

class User{                                 class Person{ 
  int ID                                       int ID; 
  int PersonID;                                string FirstName; 
  string UserName;                             string LastName; 
}                                           }

My ods methods are:

              SelectMethod: iList<User> GetUsers();
InsertMethod, UpdateMethod: void SaveUser(User u);
              DeleteMethod: void DeleteUser(User u);

In my EditFormTemplate i bind these like this (binding works fine):

<telerik:RadTextBox ID="txtUserName" runat="server"  Text='<%# Bind("UserName") %>'/>
<telerik:RadTextBox ID="txtFirstName" runat="server"  
 Text= '<%# DataBinder.Eval(Container.DataItem, "Person.FirstName") %>' /> 
<telerik:RadTextBox ID="txtLastName" runat="server"
 Text= '<%# DataBinder.Eval(Container.DataItem, "Person.LastName") %>' />

So, when i am trying to update user object, updates only UserName, update does not cause to FirstName and LastName (User.Person properties). I guess ods cannot recognize them at all...

Is there any solution for this?

Or is there any alternative way to act situations lake this?

P.S. the same problem is when i use LinqDataSource

thanks.

Mira
Telerik team
 answered on 18 Apr 2011
1 answer
93 views
Hi

 I need know the problem about the export to excel from grid of telerik.  If are a little records no problem, the export function correctly but if the grid has more than 1000  records, the system is very slow, (10 minutes or more)
Wtha is the problem with this?

Thanks for your help
Daniel
Telerik team
 answered on 18 Apr 2011
1 answer
86 views
Hello,

I am new to Telerik controls. I have been trying to evaluate the RadScheduler Control for ASP.NET AJAX.
My query is that is it possible to override the predefined events that have been registered on the controls withing the RadScheduler.
The below will explain my query better I feel.

Case 1)
Currently when I double click on the appointment it opens a small div (dialog) whose class name is  rsAptEditFormMiddle.
I do not want to open this div, instead I want to open my custom dialog when user double click on appointment.

Case 2)
When I click on the red Delete icon (X) on right top corner (<a> with class name rsAptDelete) of any appointment it shows a confirmation dialog with OK and Cancel buttons. Instead of this I would like to have a cutom dialog for handling confirmation of delete.

Is it somehow possible to do this? Hope I am clear with my query :)

Regards,
Siddharth
Peter
Telerik team
 answered on 18 Apr 2011
5 answers
388 views
How would you go about disabling the upload button on the popup window after it is clicked for the first time. I don't want to allow users to hit it twice.

Can you add a progress bar while uploading is going on?
Dobromir
Telerik team
 answered on 18 Apr 2011
4 answers
165 views
HI,

I am looking for a way of obtaining a list of all controls in specified DIV element (including div's children)

I need to enumerate all the controls in javascript.

Has anyone done something like this ?
Roland
Top achievements
Rank 1
 answered on 18 Apr 2011
3 answers
163 views
I'm going to try to briefly describe the situation because the setup is a bit complicated

I have a RadGrid with popup form insert/edit.
When the popup form appears, the first object is a combobox that contains the Report ID.
The ItemDataBound event for the grid populates the popup form with the correct Report Options by building the controls and adding them to a Panel container. The Report Options are determined by the combobox that contains the Report ID

For example...if the Report ID is 1, the ItemDataBound event generates 2 comboboxes for Report Date and Report Format. Report Date has 4 options and Report Format has 2 options.

Now...the combobox for the Report ID is set to autopostback and there is a OnSelectedIndexChanged event that reruns the code that creates the Report Option controls.

For example...if I change the combobox so that the Report ID is 2, the ItemDataBound event only generates 1 combobox for Report Format which is supposed to only have 2 options.

Here's where the problem occurs. All of this works perfectly, except that when I select Report ID 2, the combobox for Report Format has 4 options in it...the last 2 are completely blank.

It seems that for some reason it's remembering that the first combobox when Report ID was selected had 4 options and even though it's changing the combobox to have the right values, it still thinks there is supposed to be 4 options when in fact there are only 2.

I tried doing a combo.Items.Clear() before building the combobox, but that didn't seem to work. I also tried clearing out the controls on the Panel and that didn't work either. You can also see from the code below that each combobox is created with a unique ID based on the ID of the Option. The Report Date combobox is generated as dd_1 while the Report Format combobox is generated as dd_8.

I guess I'm looking for a way to make sure the ComboBox has the correct number of options so that the user cannot select "blank" items.

I don't know how much help this code is going to be, but here is how I'm creating the controls

protected void BuildOptions(GridEditFormItem editFormItem)
{
    RadComboBox dd_RptID = (RadComboBox)editFormItem.FindControl("dd_RptID");
 
    EISDataContext db = new EISDataContext();
 
    // get the unique report options for the current selected report so we can render the correct controls
    var q_options = (from options in db.tReportConfigs
                     where options.RptID == dd_RptID.SelectedItem.Value
                     select options.OptID).Distinct();
 
    foreach (var option in q_options)
    {
        string optionType = (from options in db.tReportOptions
                             where options.OptID == option
                             select options.OptTyp).FirstOrDefault();
        string optionName = (from options in db.tReportOptions
                             where options.OptID == option
                             select options.OptNm).FirstOrDefault();
 
        // get the option values for this option
        var q_optionValues = from optionvalues in db.tReportConfigs
                             where optionvalues.RptID == dd_RptID.SelectedItem.Value && optionvalues.OptID == option
                             select optionvalues;
 
        // create a div for the option control and populate it with the correct control
        Panel panelContent = new Panel();
        panelContent.Attributes.Add("class", "popupcontent");
 
        if (optionType == "ComboBox")
        {
            RadComboBox combo = new RadComboBox();
            combo.ID = "dd_" + option.ToString();
            foreach (var optionValue in q_optionValues)
            {
                combo.Items.Add(new RadComboBoxItem(optionValue.tReportOptionValue.OptNm, optionValue.tReportOptionValue.OptVal));
            }
 
            panelContent.Controls.Add(combo);
        }
 
        // create a div for the option title and populate it with the option name
        Panel panelTitle = new Panel();
        panelTitle.Attributes.Add("class", "popuptitle");
        Label pnlLabel = new Label();
        pnlLabel.Text = optionName;
        panelTitle.Controls.Add(pnlLabel);
 
        // create a div for the clear control
        Panel panelClear = new Panel();
        panelClear.Attributes.Add("class", "clear");
 
        editFormItem.FindControl("divOptions").Controls.Add(panelTitle);
        editFormItem.FindControl("divOptions").Controls.Add(panelContent);
        editFormItem.FindControl("divOptions").Controls.Add(panelClear);
    }
}

Any suggestions you can provide are greatly appreciated...thanks.
Dimitar Terziev
Telerik team
 answered on 18 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?