Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
235 views
Hi!  Is there a way to set a timeout for disabling a RadButton in the client-side?  I would like to disable a RadButton for 5 seconds after a user clicks on it. 

Here's the current code I have:
function DisableSubmitBtn() {
            var btnSubmit = $find('<% =btnItemSubmit.ClientId %>')
            btnSubmit.set_text("Submitting");
            btnSubmit.set_enabled(false)   
        }


I've tried using the window.setTimeout function but it doesn't seem to have any effect.  I have tried both:
setTimeout('document.getElementById("' + btnItemSubmit + '").disabled = false', 2000);
 
var btnSubmit = $find('<% =btnItemSubmit.ClientId %>')

setTimeout('btnSubmit.set_enabled(false)', 2000);


Thanks!
Amy
Top achievements
Rank 1
 answered on 06 Apr 2011
5 answers
151 views
Hello,

I'm new to this forum.  I see the Drag-and-Drop Row demo, I really like it.  I have a similar scenario where my first radgrid (doctorRadgrid) displays all the doctor names (using Linq binds from code behind), and the second radgrid (scheduleRadgrid) contains only doctor names that dragged from the first radgrid.  However, when a user drags a doctor name from doctorRadgrid to scheduleRadgrid, I don't want that doctor name deleted from the doctorRadgrid.  I just want it copy to the scheduleRadgrid.  Is that possible?  Can you please provide sample code, I really aprreciated your help.

Thanks in advance!
Maria Ilieva
Telerik team
 answered on 06 Apr 2011
1 answer
34 views
Hi, as per http://demos.telerik.com/aspnet-ajax/editor/examples/filemanagers/defaultcs.aspx, I have added the line to the web.config file and the entry for Document Manager to the Default.aspx file.

When I click the Document Manager button in the text editor, I always get nothing to choose, i.e., 'Page 1 of 0. Items 1 to 0 of 0'.

The RadEditor Default.aspx file is at e.g. F:/x/xx/xxx/xxxx/RadEditor.Net/Default.aspx and the documents folder is e.g. F:/Assets/Documents - what should I be entering in the line below?

Many thanks

<DocumentManager ViewPaths="~/Assets/Documents" UploadPaths="~/Assets/Documents" DeletePaths="Assets/Documents" />
Dobromir
Telerik team
 answered on 06 Apr 2011
1 answer
115 views

My structure is this... 
    MasterPage  >> Content Page which includes a RadGrid >> In the RadGrid, I am using a UserControl (ascx) for the insert item.

Masterpage has ScriptManager and RadAjaxManager
Contentpage has RadAjaxProxy
UserControl has RadAjaxProxy

The UserControl is basically a table with labels, Radtextboxes and Radcomboboxes.
My usercontrol has this declaration:
----------------------------------------------------------------------------

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server" >
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="uxDirectory">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="uxProjectName" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>

</telerik:RadAjaxManagerProxy>
-------------------------------------------------------------------------------
uxDirectory and uxProjectName are both RadComboBoxes

The problem I am facing is when a value is changed in the uxDirectory combobox all the  "Load" events based on other controls are being fired.  It is my understanding that since I have autopostback="true" on the uxDirectory, and based upon the declaration above, that only the uxProjectName control will Load.   However, all my controls are reloading.  This is wiping out the values saved, etc.  How can I perform a Ajax postback for a specific control within a ASCX Usercontrol?

-DB

Maria Ilieva
Telerik team
 answered on 06 Apr 2011
3 answers
246 views
All,

I am trying to do an insert/update of a numeric value. I have identical code in another control working just fine. All attempts to insert or update result in OriginalAmount being null. I have tried using a bound column and a numeric column with the same failure.

Any and all help is greatly appreciated. I cannot understand how this was working before and now does not, and another control with identical grid and code is fine.

Thanks,
Bruce

<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
    AllowSorting="True" AutoGenerateColumns="False" GridLines="None" OnInsertCommand="RadGrid1_InsertCommand"
    OnItemCommand="RadGrid1_ItemCommand" OnNeedDataSource="RadGrid1_NeedDataSource"
    OnUpdateCommand="RadGrid1_UpdateCommand" OnItemDataBound="RadGrid1_ItemDataBound"
    OnItemCreated="RadGrid1_ItemCreated" Width="100%">
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
    </HeaderContextMenu>
    <MasterTableView AllowMultiColumnSorting="True" CommandItemDisplay="Top" DataKeyNames="ID,OriginalAmount"
        CommandItemSettings-AddNewRecordText="Add new payment or credit"
        ClientDataKeyNames="ID" Font-Size="Smaller">
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
        <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridEditCommandColumn FilterControlAltText="Filter EditCommandColumn column"
                ButtonType="PushButton">
                <ItemStyle Font-Size="Smaller" Width="10%" />
            </telerik:GridEditCommandColumn>
            <telerik:GridButtonColumn CommandName="Rollback" ConfirmText="Are you sure you want to roll back the application of this payment/credit?"
                ConfirmTitle="Rollback?" FilterControlAltText="Filter Rollback column" Text="Rollback"
                UniqueName="Rollback" ButtonType="PushButton">
            </telerik:GridButtonColumn>
            <telerik:GridButtonColumn CommandName="Apply"
                FilterControlAltText="Filter Apply column" Text="Apply"
                UniqueName="Apply" ButtonType="PushButton">
            </telerik:GridButtonColumn>
            <telerik:GridButtonColumn CommandName="ViewApplication"
                FilterControlAltText="Filter View Application column" Text="View"
                UniqueName="ViewApplication" ButtonType="PushButton">
            </telerik:GridButtonColumn>
            <telerik:GridButtonColumn CommandName="NSF"
                FilterControlAltText="Filter NSF column" Text="NSF"
                UniqueName="NSF" ButtonType="PushButton">
            </telerik:GridButtonColumn>
            <telerik:GridDateTimeColumn DataField="CreditDate" DataType="System.DateTime" FilterControlAltText="Filter CreditDate column"
                HeaderText="Credit Date" UniqueName="CreditDate" DataFormatString="{0:MM/dd/yyyy}">
            </telerik:GridDateTimeColumn>
            <telerik:GridTemplateColumn DataField="ActivityTypeID" FilterControlAltText="Filter ActivityType column"
                HeaderText="Type" UniqueName="ActivityType">
                <EditItemTemplate>
                    <telerik:RadComboBox ID="rcbActivityType" runat="server">
                    </telerik:RadComboBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="lblActivityType" runat="server" Text='<%# Eval("ActivityTypeID") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="CreditIdentifier" FilterControlAltText="Filter Check Number column"
                HeaderText="Check Number" MaxLength="500" UniqueName="CreditIdentifier">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="OriginalAmount"
                FilterControlAltText="Filter OriginalAmount column"
                HeaderText="Original Amt." UniqueName="OriginalAmount"
                DataFormatString="{0:C2}">
            </telerik:GridBoundColumn>
 
            <telerik:GridNumericColumn DataField="RemainingAmount" DataType="System.Decimal"
                DecimalDigits="2" FilterControlAltText="Filter RemainingAmount column" HeaderText="Remaining Amt."
                NumericType="Currency" ReadOnly="True" UniqueName="RemainingAmount">
            </telerik:GridNumericColumn>
            <telerik:GridBoundColumn DataField="Notes" FilterControlAltText="Filter Notes column" ColumnEditorID="GridTextBoxColumnEditor1"
                HeaderText="Notes" MaxLength="500" UniqueName="Notes">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="CreatedBy" FilterControlAltText="Filter CreatedBy column"
                HeaderText="Created By" MaxLength="50" ReadOnly="True"
                UniqueName="CreatedBy" Display="False">
            </telerik:GridBoundColumn>
 
 
        </Columns>
        <EditFormSettings>
            <EditColumn UniqueName="EditCommandColumn1" FilterControlAltText="Filter EditCommandColumn column" ButtonType="PushButton">
            </EditColumn>
        </EditFormSettings>
        <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>

protected void RadGrid1_UpdateCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
    LaundryLogicDAL.ARCredits oARC = new LaundryLogicDAL.ARCredits();
 
    try
    {
        oARC.es.Connection.Name = "NAS";
        oARC.es.Connection.SqlAccessType = esSqlAccessType.DynamicSQL;
 
        GridEditableItem editedItem = e.Item as GridEditableItem;
        GridEditManager editMan = editedItem.EditManager;
 
        int iID = (int)editedItem.OwnerTableView.DataKeyValues[editedItem.ItemIndex]["ID"];
 
        DateTime dteCreditDate = DateTime.Parse((editMan.GetColumnEditor("CreditDate") as GridDateTimeColumnEditor).Text);
        int iActivityTypeID = Convert.ToInt16((editedItem["ActivityType"].FindControl("rcbActivityType") as RadComboBox).SelectedValue);
        decimal dOriginalAmount = CurrencyToDecimal((editMan.GetColumnEditor("OriginalAmount") as GridTextBoxColumnEditor).Text);
        string sNotes = (editMan.GetColumnEditor("Notes") as GridTextBoxColumnEditor).Text;
        string sCreditIdentifier = (editMan.GetColumnEditor("CreditIdentifier") as GridTextBoxColumnEditor).Text;
 
        if (oARC.LoadByPrimaryKey(iID))
        {
            oARC.CreditDate = dteCreditDate;
            oARC.ActivityTypeID = iActivityTypeID;
            oARC.CreditIdentifier = sCreditIdentifier;
            oARC.OriginalAmount = dOriginalAmount;
            oARC.Notes = sNotes;
            oARC.Save();
        }
    }
    catch (Exception ex)
    {
        DotNetNuke.Services.Exceptions.Exceptions.ProcessModuleLoadException(this, ex);
    }
    finally
    {
        oARC = null;
    }

Martin
Telerik team
 answered on 06 Apr 2011
2 answers
110 views
Hi guys

I've been customising the ToolsFIle.xml file successfully to reorder tools and toolbars.

When I try to use the ribbon feature by entering <tools name="MainToolbar" IsRibbon="true">, it makes no difference (despite the help at http://www.telerik.com/help/aspnet/editor/editoroffice2007ribbonbar.html).

Is this feature unavailable in the AJAX version of the text editor?

Neil
HWNeil
Top achievements
Rank 1
 answered on 06 Apr 2011
3 answers
144 views
How can I set imageurl for image column programatically?

Thanks, Patrick
Tsvetina
Telerik team
 answered on 06 Apr 2011
5 answers
391 views
Hi!

How can i activate the HoverStyle?, no matter what i do simple will not work
Anyone have a clue?

Thanks
JL

<telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
                <!-- content start -->
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="grdMain">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="grdMain" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </AjaxSettings>
                </telerik:RadAjaxManager>
                <telerik:RadGrid ID="grdMain" OnSortCommand="grdMain_SortCommand" OnPageIndexChanged="grdMain_PageIndexChanged"
                    Width="100%" OnPageSizeChanged="grdMain_PageSizeChanged" AllowSorting="True"
                    PageSize="20" AllowPaging="True" AllowMultiRowSelection="True" runat="server"
                    GridLines="None" Skin="Windows7" AutoGenerateColumns="true">
                    <MasterTableView Width="100%" Summary="RadGrid table"  />
                    <PagerStyle Mode="NextPrevAndNumeric" />                    
                    <ClientSettings AllowKeyboardNavigation="true" EnableRowHoverStyle="true">
                        <Selecting AllowRowSelect="true" />                        
                    </ClientSettings>
                </telerik:RadGrid>
                <!-- content end -->
Maria Ilieva
Telerik team
 answered on 06 Apr 2011
5 answers
68 views
Hello Telerik team,

I would like to ask if I can make this following scenario:

1. I have a textbox that's accepting sets of string (a Search box)
2. I have a button (Search button) that will be linked to the RadSpell. (Can this be done? If possible, please give me an assistance)
3. After clicking the Search box, the Radspell window should not be opened. (Is this possible, if yes, kindly teach me how)
4. Instead, the Radspell will get the nearest correct suggestion and display it on a page...

Example is attached for better understanding of my inquiry...

Thank You and Regards,

Anthony

 
Rumen
Telerik team
 answered on 06 Apr 2011
4 answers
106 views
First let me specify my environment, am using the ASP.net AJAX Q1 2011 35 controls in VS2010 with VB.net.

I am trying to bind a RadGrid to a dataset allowing it to autogenerate the columns, then set the format of the columns in code in the itemdatabound event.  I prefer this way because it allows me to just set header text and width without having to define every property of every column in code.  I also have a need to add a button to a column.  I am adding the button in the page_load event in the mastertableview and it shows up properly when the page loads, but when I click on the button the grid refreshes and the button disappears.  So first I need to be able to keep the button from disappearing, and second I'm not sure how I can put code in the button click event.

I would appreciate any help that anyone can provide.

Thanks.
Todd
Top achievements
Rank 1
Iron
 answered on 06 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?