Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
135 views
Hi,
  I'm using DNN 6.0 and I've implemented custom PDF export functionality from RadGrid where I had to disable Ajax on start of PDF export request. I accomplished disabling Ajax using below code

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <ajaxsettings>              
                 <telerik:AjaxSetting AjaxControlID="btnExport">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="btnExport" />                        
                    </UpdatedControls>
                 </telerik:AjaxSetting>
        </ajaxsettings>
        <ClientEvents OnRequestStart="RequestStarted" />
</telerik:RadAjaxManager>

where in RequestStarted, I disable the Ajax. Problem here is - when I use this code in my local, it's all working good. When I put it in my dev environment, I get an error
"An error occurred. DotnetNuke.Services.Exceptions.PageLoadException: Multiple controls with the same ID "...." were found. FindControl requires that controls have unique IDs ... "

When I remove the RadAjaxManager piece of code from my UI in dev site, my module shows up properly. Can anyone help me on what can be done here to get around the exception?

Thanks.
Ananth
Ananthalvan
Top achievements
Rank 1
 answered on 02 Mar 2012
1 answer
487 views
I have noticed since upgrading my Telerik.Web.UI to 2012.1.215.40 I have not been able to hit enter from a RadTextBox to fire the default button. I have tested it on many pages in my project, and every page is "broken".

I have made a test page, and the problem occurs with the RadTextbox with or without being wrapped in a RadAjaxPanel.

EDIT: RadMaskedTextBox and RadNumericTextBox work properly with the enter key. RadDatePicker, RadTimePicker, RadComboBox do not fire the submit button.

Any idea on how to fix this issue?

Here is my sample page:
<%@ Page Language="C#" AutoEventWireup="true" %>
<script runat="server">
     
    protected void Page_Load(object sender, EventArgs e)
    {
        for (int i = 0; i < 10; i++)
        {
            rcb1.Items.Add(new RadComboBoxItem(i.ToString(), i.ToString()));
        }
    }
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        ltlMessage.Text = DateTime.Now.ToString() + " - Postback Fired.";
    }   
</script>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="rsm1" runat="server"></telerik:RadScriptManager>   
            <div>
     
                <asp:Panel ID="pnlSubmit" runat="server" DefaultButton="btnSubmit">                       
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
                    <telerik:RadTextBox ID="txtText" runat="server"></telerik:RadTextBox><br />
                    <telerik:RadDatePicker ID="rdp1" runat="server"></telerik:RadDatePicker><br />
                    <telerik:RadTimePicker ID="rtp1" runat="server"></telerik:RadTimePicker><br />
                    <telerik:RadComboBox ID="rcb1" runat="server" AllowCustomText="true">                  
                    </telerik:RadComboBox><br />
                    <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server">
                    </telerik:RadNumericTextBox><br />
                    <telerik:RadMaskedTextBox ID="RadMaskedTextBox1" runat="server" Mask="####">
                    </telerik:RadMaskedTextBox><br />
                    <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click"></asp:Button>
                    <br />
                    <asp:Literal ID="ltlMessage" runat="server"></asp:Literal>
                </asp:Panel>
            </div>
        </form>
    </body>
</html>
Princy
Top achievements
Rank 2
 answered on 02 Mar 2012
2 answers
488 views
I have a radgrid on my page. I want to move selected row up/down. There are some solutions I found. But in given example

sectionRowIndex is always -1. It is not working for IE*. Any other suggestion?

http://www.telerik.com/community/code-library/aspnet-ajax/grid/move-rows-up-down-using-radgrid-for-asp-net-ajax-prometheus.aspx

Thanks in advance
Meera
Top achievements
Rank 1
 answered on 02 Mar 2012
0 answers
73 views
This can be closed
Web Services
Top achievements
Rank 2
 asked on 01 Mar 2012
3 answers
119 views
hi

I have this Stored Proc and my grid is empty and no error. I have tested the proc and is returning me the result but not the grid.

How should i go about it? Thanks

Create Proc test
as
DECLARE @query VARCHAR(4000)
DECLARE @years VARCHAR(2000)
SELECT  @years = STUFF((SELECT DISTINCT
      '],[' + ltrim(Dyear)
                        FROM    Product2
                        ORDER BY '],[' + ltrim(Dyear)
                        FOR XML PATH('')
      ), 1, 2, '') + ']'
      

SET @query =
'SELECT * FROM
(
 SELECT prodId,Dyear,amount
 FROM Product2
)t
PIVOT (SUM(amount) FOR Dyear
IN ('+@years+')) AS pvt'

EXECUTE (@query)

Richard
Top achievements
Rank 1
 answered on 01 Mar 2012
2 answers
85 views
Greetings Telerik Community,

I am currently and successfully using the code block below to turn an edit column into a delete column. I do this because my customer wants in-line add and delete but no edit. My issue now is I need to do this for a column that is nested 1 level deep in a hierarchical grid. The column name is "EditColumn2". The problem is this column doesn't appear to exist when the PreRender is called and throws an exception. My guess is it is created on the fly when the expand arrow is clicked. Which event can I use to add a similar code block to so I can apply the same logic to turn an editboundcolumn into a delete column for the nested table?

protected void GridPreRender(object sender, EventArgs e)
{
    foreach (GridDataItem item in MaintGrid.MasterTableView.Items)
    {
        ImageButton btn = (ImageButton)item["EditColumn"].Controls[0];
        btn.CommandName = "Delete";
        btn.ToolTip = "Delete";
        btn.ImageUrl = "~/Stylesheets/Images/Delete3.gif";
        btn.OnClientClick = "javascript:if(!confirm('Are you sure you wish to delete this record?')){return false;}";
    }
}
Mike
Top achievements
Rank 1
 answered on 01 Mar 2012
0 answers
62 views
Hello,

I am using client-side binding grid, so all my columns are gridtemplatecolumn type and filled from web-service.
One of the columns is a result of some calculation.

<telerik:GridTemplateColumn HeaderStyle-CssClass='GridHeaderGreen ra' ItemStyle-CssClass='ra'
    HeaderText="Start day throughput" SortExpression="START_DAY_DATA.IO_PER_SECOND">
    <itemtemplate>
        <asp:Label ID="StartPerSecond" runat="server" />
    </itemtemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderStyle-CssClass='GridHeaderGreen ra' ItemStyle-CssClass='ra'
    HeaderText="End day throughput" SortExpression="END_DAY_DATA.IO_PER_SECOND">
    <itemtemplate>
        <asp:Label ID="EndPerSecond" runat="server" />
    </itemtemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderStyle-CssClass='GridHeaderGreen ra' ItemStyle-CssClass='ra'
    HeaderText="Throughput growth">
    <itemtemplate>
        <asp:Label ID="PerSecondDelta" runat="server" />
    </itemtemplate>
</telerik:GridTemplateColumn>


When I put SortExpression="(END_DAY_DATA.IO_PER_SECOND - START_DAY_DATA.IO_PER_SECOND)" into third column - I am getting the exception when trying to sort by this column.

I can't believe I can't solve this problem in a more elegant way than writing something like:
SELECT
  END_DAY_DATA.IO_PER_SECOND,
  START_DAY_DATA.IO_PER_SECOND
  END_DAY_DATA.IO_PER_SECOND - START_DAY_DATA.IO_PER_SECOND
........
and putting SortExpression="3" for third column! :(

UPDATE: Lack of time for experiments: so, I've used the last approach: SortExpression="3" :)
Alexander
Top achievements
Rank 1
 asked on 01 Mar 2012
1 answer
114 views
We have telerik license of version 2009.3.1314.35.

At one page, we have used radcombobox with ondemand rendering as below,

<telerik:RadComboBox ID="ddlEmployee" runat="server" Width="250px" Height="100px"
 EmptyMessage="Select employee " EnableLoadOnDemand="True" EnableVirtualScrolling="true"
OnItemsRequested="RadComboBox1_ItemsRequested" DataTextField="Name" DataValueField="EmpNo"
Skin="WindowsXP" OffsetX="2" AllowCustomText="True" EnableEmbeddedSkins="False"
EnableAjaxSkinRendering="False" EnableEmbeddedBaseStylesheet="False" EnableItemCaching="True"
ShowMoreResultsBox="True">
</telerik:RadComboBox>


My requirement is to enable on demand functionality for employee list. The objective is, at page load I should be able to set selectedvalue item to employee combbox and also to achieve on demand functionality in it

The above scenario works fine if I dont set selectedvalue item to combobox in page load.

My observation while debugging.
The problem with RadCombobox  is that if we bind the RadCombobox on page load, and try to click in combobox text area RadComboBox1_ItemsRequested is not get fired. However, if start writing something in RadCombobox text area RadComboBox1_ItemsRequested is get fired.

Please help us to achieve this functionality in combobox.

Thanks in advance.
Ivana
Telerik team
 answered on 01 Mar 2012
2 answers
89 views
I need to perform a postback on drag selection.  I currently use

OnMouseUp="GridMouseUp(this, event)" on the RadGrid element to call

function GridMouseUp(sender, e) {
    setTimeout(function () {
        var grid = $find(window.gridId);
        if (grid != null && grid.get_masterTableView().get_selectedItems().length > 0) {
            __doPostBack(window.gridUniqueId);
        }
    }, 0);
}

This works for the drag select case but also does postbacks when clicking on the filter textboxes which I do not want.  Is there any way in client code to detect OnMouseUp of a Drag select action?
David Cowan
Top achievements
Rank 1
 answered on 01 Mar 2012
0 answers
105 views
We want to use all the great AJAX features on the grid for sorting, paging, grouping, etc.  Let's assume a user opens a page in our application with an AJAX-enabled grid and sorts on several columns and pages within the dataset several pages.  Now the user double clicks a record which results in a navigation to a different page for more detail.  Now, the user wants to go back to the grid so they click the Back button in the browser.  I want to make sure my user returns back to page 2 with the appropriate sorting criteria applied.  Does the Telerik grid place entries in the browser history that record the sequence of events (sorting and paging) prior to drilling down to the different page?    Is this sort of functionality built-in to the grid so we don't have to worry about maintaining some session state on the server?
David
Top achievements
Rank 2
 asked on 01 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?