Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
288 views
Hello all.  I ran into a little issue and hope that someone out there can help me figure this one out.  It's hard to explain, so let's just dig into it...

Here's some code, markup first, then code behind (C#)...

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="AJAXError._Default" %> 
 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> 
<%@ 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"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head id="Head1" runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager runat="server">  
        </telerik:RadScriptManager> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="RadAjaxPanel1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Web20" /> 
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">  
            <telerik:RadMultiPage ID="RadMultiPage1" runat="server">  
                <telerik:RadPageView ID="RadPageView1" runat="server">  
                    <asp:Button ID="Button1" runat="server" Text="Switch Page" OnClick="Button1_Click" /> 
                </telerik:RadPageView> 
                <telerik:RadPageView ID="RadPageView2" runat="server">  
                    <asp:TextBox ID="TextBox1" runat="server" /><br /> 
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" 
                        ErrorMessage="The field is required." EnableClientScript="true" ValidationGroup="ValidateMe" /> 
                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" TargetControlID="RequiredFieldValidator1">  
                    </asp:ValidatorCalloutExtender> 
                    <asp:Button ID="Button2" runat="server" Text="Set Text" OnClick="Button2_Click" ValidationGroup="ValidateMe" /> 
                </telerik:RadPageView> 
                <telerik:RadPageView ID="RadPageView3" runat="server">  
                    <asp:Label ID="Label1" runat="server" /> 
                </telerik:RadPageView> 
            </telerik:RadMultiPage> 
        </telerik:RadAjaxPanel> 
    </div> 
    </form> 
</body> 
</html> 
 

Code:

using System;  
using System.Threading;  
 
namespace AJAXError  
{  
    public partial class _Default : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!IsPostBack)  
            {  
                RadMultiPage1.SelectedIndex = 0;  
            }  
        }  
 
        protected void Button1_Click(object sender, EventArgs e)  
        {  
            RadMultiPage1.SelectedIndex = 1;  
        }  
 
        protected void Button2_Click(object sender, EventArgs e)  
        {  
            Thread.Sleep(2000); // To see the ajax panel working.  
            Label1.Text = TextBox1.Text;  
            RadMultiPage1.SelectedIndex = 2;  
        }  
    }  
}  
 

If you run this markup/code in a new asp.net web application, you will notice two things.  First of all, the validation does not work unless you encapsulate the Button2_Click code in a (Page.IsValid) check and the calloutextender doesn't work regardless.  Second, if you do use the Page.IsValid check and try to click the button twice (against validation) you will get a javascript error:

Microsoft JScript runtime error: '_events' is null or not an object

Any thoughts on this?  Is there a better way to use ajaxloadingpanels with a multipage setup?

Thanks
JFoulk
Top achievements
Rank 1
 answered on 07 Jan 2010
6 answers
186 views
Hi all,

I have created a RadWindow in my code-behind file for an asp page.  I need to create it there on the fly.  I am using it as a confirm box to validate an address.  The problem I am having is I have no way to close the RadWindow to get back to my parent page if the user needs to go back to mess with the form.

Any suggestions?


Eric Wright
Top achievements
Rank 1
 answered on 07 Jan 2010
7 answers
226 views
Im trying to setup a self ref hierarchy and I dont know what Im doing wrong.

Here is how my file is setup, its a bill of materials so there is lots of part numbers and lots of refing back to each other.  I think there are ~200k records in the file and in theory you should be able to find a BOM starting at any point.  In this example here Part Number  "6101673042" there are 10 diffrent items in the listing.  But off the top of my head I see that on step 4 there is a mfg part that has a ref part number of "400500025201" and the file has the refing compents for that also.  There can be infinite nesting and some parts are mutiple nestings so its could be:
+P1
    -C1
    -C2
    +C3/P2
        -PC2(1)
        +PC2(2)/P3
            -PC3(1)
            -PC3(2)
        -PC2(3)
        -PC2(4)
    -C4
    -C5
    -C6
    -C7
BPROD       BCHLD        BMBOMM  ICOND   BQREQ   IDESC                             ICITYP  BSEQ  
6101673042  6101673040      23  1   16.300-16.73 SLV TAPPING W4"BR                      M   1  
6101673042  830034001       9   1.865   GSKT STRIP GRADE 33 WATER                       7   2  
6101673042  40029606001     23  6   0.750 WSHR CARBON STEEL                             P   3  
6101673042  40050025201     23  1   3/4 NPT PLUG SQHD STEEL ECOAT                       M   4  
BPROD        BCHLD       BMBOMM  ICOND   BQREQ   IDESC                             ICITYP  BSEQ  
40050025201 40050025003     0   1   3/4 NPT PLUG SQ HD A105 FS                          P   1  
40050025201 400500252019        23  1   VENDOR'S ECOATING PLUG PIPE                     P   2  
6101673042  10547999        11  1   INSTR INSTL STYLE 610                               6   5  
6101673042  727010619       0   1   3-1/4 X 5 PKG LABEL                                 6   6  
6101673042  40029677202     0   6   0.750 NUT HEX HEAVY E-COAT CS                       P   7  
6101673042  40010004250     23  6   0.750 BOLT TRK HD X 9'' L, 5'' THRD,  BARE          P   8  
6101673042  918110002       0   2.2 FDA THICK FIL GREY COATG EPOXY                      P   9  
6101673042  30008461504     23  1   4.0 GSKT RED RUBBER FLG 1/8"                        P   10  
 
bradley baker
Top achievements
Rank 1
 answered on 06 Jan 2010
1 answer
132 views
I am trying to use the RadComboBox as a search input area (similar to google). Everything so far is working out well except for one minor annoyance. Every time you use the mouse pointer to click on the text in the box, all the text will be selected and if more text is entered, it will replace everything. This makes it very annoying if you need to change just a few characters at the very beginning of the text.

Quick example if I'm not being clear : 
1. User types "bbooks" into the search box
2. Realizes he typed two "b"s
3. Uses his mouse to click at the beginning of the text in the text box to erase one "b"
4. Now all the text is selected and if he types anything, all the text will be cleared.

Thanks in advance for any help.
Joshua Pena
Top achievements
Rank 1
 answered on 06 Jan 2010
1 answer
89 views
Let's see if I can make this clear. I have a very plain grid with an EditTemplate Form. When I click on Add Record or Edit event, it clears the page and returns ascii junk. This only happens on a few grids. Some grids work fine with the same structure, some don't. I thought it might be caused by the textbox binding being misspelled, but that was double checked. I've commented everything else out on the page to narrow down and illiminate any other possibilities. I'm using the latest version of Telerik of Q3 2009. Any one have any ideas or clues of where to begin troubleshooting? Here is my code:

<rad:RadGrid ID="gridRole" runat="server" AutoGenerateColumns="false" AllowPaging="true" AllowSorting="true" Skin="Black"><MasterTableView  
    CommandItemDisplay="Top" EnableNoRecordsTemplate="true"  
            ShowHeadersWhenNoRecords="true" EditMode="PopUp"><CommandItemSettings  
    AddNewRecordText="Add Role" RefreshText="Refresh"  /><NoRecordsTemplate><label  
    style="font-size:medium;">No roles available</label></NoRecordsTemplate><Columns> 
           <rad:GridEditCommandColumn ButtonType="LinkButton" CancelText="Cancel"  
                EditText="Edit" UpdateText="Update" /> 
           <rad:GridBoundColumn DataField="Name" HeaderText="Name" /> 
           <rad:GridButtonColumn ButtonType="LinkButton" Text="Delete"  
                CommandName="DeleteRole" CommandArgument="RoleName" /> 
        </Columns> 
        <EditFormSettings EditFormType="Template" InsertCaption="New Role"
            <PopUpSettings Modal="false" ZIndex="2500"/> 
            <FormTemplate> 
                <fieldset class="forms" style="width:540px;"
                    <div class="required"><label>Name</label><asp:TextBox  
                            ID="txtRoleName" runat="server" Text='<%#Bind("RoleName") %>' /></div
                    <div class="optional"><label>Description</label><asp:TextBox  
                            ID="txtRoleDesc" runat="server" Text='<%#Bind("Description") %>'  
                            TextMode="MultiLine" Rows="10"/></div> 
                    <asp:Button ID="btnRoleUpdate" runat="server"  
                        Text='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "Insert", "Update") %>'  
                         
                        CommandName='<%# IIf((TypeOf(Container) is GridEditFormInsertItem), "PerformRoleInsert", "Update")%>' />&nbsp;<asp:Button  
                        ID="btnRoleCancel" runat="server" Text="Cancel"  
                        CausesValidation="False" CommandName="Cancel"/></fieldset></FormTemplate></EditFormSettings></MasterTableView><ClientSettings><ClientEvents  
    OnRowDblClick="RowDblClick" /></ClientSettings></rad:RadGrid> 

Aaron
Top achievements
Rank 1
 answered on 06 Jan 2010
2 answers
101 views

I am having what seems to be a Firefox specific issue with a RadWindow and wanted to know if there is something I am missing about how Firefox handles this situation in a RadWindow.

I have a RadWindow that loads a page that dynamically populates the contents of dropdowns based on the selected value in another dropdown, however in Firefox this is not functioning the same as Internet Explorer.


Internet Explorer

The selected item on cboDropdown1 is changed on the selected index change then cboDropdown2 is populated with the applicable values.  When the page refreshes the selected index of cboDropdown1 is retained.


Firefox

The selected item on cboDropdown1 is changed on the selected index change then cboDropdown2.  When the page refreshes the selected index of cboDropdown1 is not retained and the first item in the drop down cboDropdown1 is selected.

The page that loads in the RadWindow originally had a RadAjaxPanel and RadLoadingPanel where the controls were contained within the RadAjaxPanel, but I removed the RadAjax panel to see what occurs in regular Postback scenarios and the same issue occurs in Firefox, but not IE.  I have attached an image of the original page structure.

If I need to add particular code to address this, what would that be and on which page should I add it (e.g. OriginalRegularPage.aspx, RadWindow 1 page, RadWindow 2 page).

jgill
Top achievements
Rank 1
 answered on 06 Jan 2010
3 answers
267 views
Hi,

Is there a simple way to overrides the font size of a skin for all controls in the web application?

We are trying to upgrade from Q3 2008 to Q3 2009 and since the font of the Office 2007 skin are now a little bigger, we have a lot of layout overflow problems in our app.

We would like to set the font size in Q3 2009 to the same size we had (8pt) in Q3 2008.

Thanks.

Frederic
Frédéric
Top achievements
Rank 1
 answered on 06 Jan 2010
3 answers
183 views
This should be easy to do but I can't find any documentation on it.  I have a radnumerictextbox editor in the grid.  The user can change the value of the editor without clicking on the edit first.  Of course, no update shows until it is in edit mode.  I want to make the editor readonly until the row is placed in edit mode.  Here is a snippet of the grid template column for the editor.  Thanks.

 

<telerik:GridTemplateColumn HeaderText="StockingTime" UniqueName="StockingTime">

 

 

    <HeaderStyle HorizontalAlign="Right" />

 

 

    <ItemStyle HorizontalAlign="Right" />

 

 

    <ItemTemplate>

 

 

        <telerik:RadNumericTextBox ID="grdSupplyChain_StockingTime_NumericEditor" runat="server" MaxValue="999" MinValue="0"

 

 

                NumberFormat-DecimalDigits="2" NumberFormat-GroupSeparator="" NumberFormat-DecimalSeparator="." Width="75px"

 

 

                Type="Number" ShowSpinButtons="true" Text='<%# Eval("StockingTime") %>'>

 

 

                <IncrementSettings Step="0.01" InterceptMouseWheel="true" />

 

 

        </telerik:RadNumericTextBox>

 

 

    </ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

Bill
Top achievements
Rank 1
 answered on 06 Jan 2010
2 answers
280 views
Okay, this is a strange one, but the boss is asking for it....

He doesn't want to display decimals in a RadNumericTextBox if the decimal portion equals .00.

For example, if the value is 123.44, the texbox should display

123.44

However, if the number is 123.00 then the textbox should display

123

Does that make any sense? Does anyone have any idea how this could be done without a TON of "if" coding?

Ken
kencox
Top achievements
Rank 1
 answered on 06 Jan 2010
5 answers
266 views
I two problems with Q3 2009

 #1
Visual Studio 2008(VSTS) will  lock up.
When I try to kill the process it then tells me that there is still a modal dialog open. If there is it is not visable.
I cannot navigate to this dialog.
Shortly before this intellisense goes.
On restarting it sends an error log to microsoft.
Eventlog (Hanging application devenv.exe, version 9.0.30729.1, hang module hungapp, version 0.0.0.0, hang address 0x00000000.) + a FaultBucket.

#2
 Visual Studio 2008(VSTS) will  crash out of Exploer.
This typically in source code view.
It just disappears (eventLog: .NET Runtime version 2.0.50727.3603 - Fatal Execution Engine Error (7A036050) (80131506))

 
This did not happen with Q2 2009 (which is still in the system and has not been uninstalled).
Is there some other log I could look at.
Any suggestions?

I am using winXP 64bit with 6gb ram (so have full access to the available mem).
Also installed is Resharper4.5

Erjan Gavalji
Telerik team
 answered on 06 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?