Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
131 views
I have a combo box on a page with some code in the sekectedindexchanged event (this populates a second combo based on the contents of the first)

Whenever I select an item in the first combo box, it initiates a full page postback despite it being setup in an ajax proxy manager, am I doing something wrong ?

<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
       <telerik:AjaxSetting AjaxControlID="RadAjaxManagerProxy1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="RadComboBoxType" />
                            <telerik:AjaxUpdatedControl ControlID="RadComboBoxArtistGenre" />
                        </UpdatedControls>
            </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadComboBoxType">
            <updatedcontrols>
                <telerik:AjaxUpdatedControl ControlID="RadComboBoxType"
                    LoadingPanelID="RadAjaxLoadingPanel1" />
            </updatedcontrols>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="RadComboBoxArtistGenre">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadComboBoxArtistGenre"
                    LoadingPanelID="RadAjaxLoadingPanel2" />
            </UpdatedControls>
        </telerik:AjaxSetting>
         
         
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>

<div class="cellArtistControl">
                 
                <telerik:RadComboBox ID="RadComboBoxType" Runat="server"
                        Skin="Vista" 
                        Width="250px"
                        onselectedindexchanged="RadComboBoxType_SelectedIndexChanged"
                        AutoPostBack="True">
                        <CollapseAnimation Duration="200" Type="OutQuint" />
             </telerik:RadComboBox>
              
             <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                            ControlToValidate="RadComboBoxType" ErrorMessage="*" Font-Bold="True"
                            InitialValue="-- Select A Type --" ValidationGroup="ArtistValidation"></asp:RequiredFieldValidator>
                </div>
            <div class="cellArtistControl">
             
                <telerik:RadComboBox ID="RadComboBoxArtistGenre" runat="server" Skin="Vista" Width="250px">
                    </telerik:RadComboBox>
             
                </div>
            </div>

Simon
Telerik team
 answered on 13 Feb 2011
4 answers
87 views
Hi, I have a user control that is wrapped by a RadAjaxPanel.  Inside the user control, I have a RadCombo using a template with a TreeView.  This works fine without the AjaxPanel, but I found that the FindNode javascript is failing to find the TreeView on a partial post-back.  It works fine with full post backs.   I should note, I'm using the sample code here for a treeview inside a RadCombo and I'm also using the sample FindNode and other JavaScript (see below for both), and this is a problem with and without the java script inside a RadCodeBlock.

There must be an issue with OnClientLoad and the controls collection at time of partial post back because this works with a full post back.

Note: I'm loading the combo datasource on init view time - i.e. is not postback.  I think that is correct.

thanks
Marty

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RentSell_Info.ascx.cs"
    Inherits="RentMyStuffWeb.Shell.Views.RentSell_Info" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

    <script type="text/javascript">
        function FindNode(comboBox, args) {
            var PassedValue = $get('<%=NodeValue.ClientID%>').value
            var treevw = comboBox.get_items().getItem(0).findControl("RadTreeViewCategories");
            if (treevw) {
                var node = treevw.findNodeByValue(PassedValue);
                if (node) {
                    node.select()
                    comboBox.set_text(node.get_text());
                    comboBox.trackChanges();
                    comboBox.get_items().getItem(0).set_value(node.get_text());
                    comboBox.commitChanges();
                }
            }
            else {
                alert("treevw is null");   ********************** IS NULL on partial postback
            }
        }

        function nodeClicking(sender, args) {
            var comboBox = $find("<%= cbCategories.ClientID %>");
            var node = args.get_node()
            document.getElementById('<%=NodeValue.ClientID%>').value = node.get_value();
            document.getElementById('<%=NodeText.ClientID%>').value = node.get_text();
            comboBox.set_text(node.get_text());
            comboBox.trackChanges();
            comboBox.get_items().getItem(0).set_value(node.get_text());
            comboBox.commitChanges();
            comboBox.hideDropDown();
        }

        function StopPropagation(e) {

            if (!e) {
                e = window.event;
            }

            e.cancelBubble = true;
        }

        function OnClientDropDownOpenedHandler(sender, eventArgs) {
            var treevw = sender.get_items().getItem(0).findControl("RadTreeViewCategories");
            var node = treevw.findNodeByText(sender.get_items().getItem(0).get_value());
            if (node != null) {
                node.select();
                node.get_parent().expand();
                node.scrollIntoView();
            }
        }
    </script>

</telerik:RadCodeBlock>
<style type="text/css">
    .InfoStyle1
    {
        width: 100%;
    }
</style>
<div id="divRentSellInfo">
    <fieldset>
        <legend class="groupBoxCaption">Item Summary</legend>
        <table class="InfoStyle1">
            <tr>
                <td>
                    <div class="informational">
                        Pick the category that best describes your item.</div>
                    <div>
                        <asp:Label runat="server" CssClass="tableLabel" Text="Category:"></asp:Label>
                    </div>
                    <div>
                        <telerik:RadComboBox ID="cbCategories" runat="server" Width="400px" Height="400px"
                            EmptyMessage="Select a Category" HighlightTemplatedItems="true" Skin="Sitefinity"
                            AutoPostBack="false" DataTextField="CategoryName" OnClientLoad="FindNode" OnClientDropDownOpened="OnClientDropDownOpenedHandler">
                            <itemtemplate>
                                <div id="divCategoryTreeView" onclick="StopPropagation(event)">
                                    <telerik:RadTreeView ID="RadTreeViewCategories" runat="server" Skin="Sitefinity"
                                        Width="100%" CausesValidation="False" OnClientNodeClicking="nodeClicking">
                                        <NodeTemplate>
                                            <div id="divCatNodeTemplate">
                                                <%#DataBinder.Eval(Container, "Text") %>
                                            </div>
                                        </NodeTemplate>
                                        <ExpandAnimation Duration="300" />
                                    </telerik:RadTreeView>
                                </div>
                            </itemtemplate>
                            <items>
                                <telerik:RadComboBoxItem />
                            </items>
                        </telerik:RadComboBox>
                        <input id="NodeValue" value="0" runat="server" enableviewstate="true" type="hidden" />
                        <input id="NodeText" value="" runat="server" enableviewstate="true" type="hidden" />
                    </div>
                    <div>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidatorCategories" runat="server"
                            ControlToValidate="cbCategories" ValidationGroup="SubmitPage" EnableClientScript="false"
                            CssClass="RequiredFieldErrorMessage" Display="Dynamic" ErrorMessage="Please select at least one category from the list."></asp:RequiredFieldValidator>
                    </div>
                </td>
            </tr>
            <tr>
.
.
.
.
.

I can attach the HTML of the page source if you need
Simon
Telerik team
 answered on 13 Feb 2011
2 answers
143 views
Hi
I have a radgrid wich his first column is a bounded GridDropDownColumn.
I want (after binding) to remove the DropDown from the first column of the first row.
How do i do it ?
Thanks ,
Gerry
Gerry Polami
Top achievements
Rank 1
 answered on 13 Feb 2011
1 answer
212 views
Hi ,

Is there a way to disable submit button while upload is in progress .

Thanks so much.
 
Kate
Telerik team
 answered on 12 Feb 2011
1 answer
113 views
Hi,

I have a MasterPage with 2 ContentPlaceHolder's on it. The one is for my menu (created with RadPanel) and the other is the actual contents. Is it possible to update the contents_contentplaceholder from the Radpanel without reloading the complete page and without a splitter control on the page?

Thanx

Peter
Telerik team
 answered on 12 Feb 2011
0 answers
139 views
Hello,
    When deleting a recurrence appointment, I want to pop up another confirmation dialog before pop up the original delete confirmation dialog using OnClientAppointmentDeleting event.

<telerik:RadScheduler  ID="uxTimeOfDayRadScheduler" ..  
OnClientRecurrenceActionDialogShowing="uxTimeOfDayRadScheduler_OnClientRecurrenceActionDialogShowing">

function 
uxTimeOfDayRadScheduler_OnClientRecurrenceActionDialogShowing(sender, eventArgs){
    if (eventArgs.get_recurrenceAction() == 2) {
    eventArgs.set_cancel(true);    
    //Pop 
a confirmation window     
    var confirmMessage = 
"Deleting this appointment may affect other scripts. Do you want to delete this appointment?";     
    radconfirm(confirmMessage,
 
        function (arg)
{   
            if (arg)
{      
            eventArgs.set_cancel(false);
            }
        },
330, 100, null, 'Delete Appointment');
    }
}

But, when on the OnClientAppointmentDeleting event, I put a radconfirm, it doesn't wait for an answer from the client and pop up the original delete confirmation dialog before I could choose.

I tried to call set_cancel(true) before calling my own radconfirm, but if I call set_cancel(false) after clicked 'ok' in my own radconfirm, it doesn't pop up the original delete confirmation dialog. Can anyone Help ?


Thanks
Jully
Top achievements
Rank 1
 asked on 12 Feb 2011
1 answer
40 views
Hai
I am using update panel in radgrid. It works fine with update panel Now i want to show loading panel to the user when he do any action in the grid. So i changed it with rad ajax manager. But its not working . The page is loaded for the long time and no action is performed. I used the following code to show loading pane.  Is there any issue in code? How can i show the loading pane to user?

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
        </telerik:RadStyleSheetManager>
    <div>
    <h2>Latest Events</h2>
    <div>
      <telerik:RadAjaxLoadingPanel ID="Loadingpane" runat="server" Skin="Default">
      </telerik:RadAjaxLoadingPanel>
      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="grdLatestEvents">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grdLatestEvents" LoadingPanelID="RadAjaxLoadingPanel1"/>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
     <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"/>


        <asp:Panel ID="pnlLatestEvents"  GroupingText="Latest events"  runat="server" Width="95%">
            <table width="100%" align="center">
                <tr>
                    <td>
<telerik:RadToolTipManager ID="LatestEvents" runat="server" 
            AutoTooltipify="true" width="200px"  ShowCallout="true" Skin="Web20" />
                        <telerik:radgrid ID="grdLatestEvents" runat="server" Width="100%" 
                            Skin="Vista" 
                            AllowSorting="True" AllowPaging="True" 
                             GridLines="None"  TabIndex="1"  AlternatingItemStyle-BackColor="#ecf5ff"
                            AutoGenerateColumns="False" PageSize="10" 
                            ondeletecommand="grdLatestEvents_DeleteCommand" 
                            oninsertcommand="grdLatestEvents_InsertCommand" 
                            onneeddatasource="grdLatestEvents_NeedDataSource" 
                            onupdatecommand="grdLatestEvents_UpdateCommand" 
                            onitemcreated="grdLatestEvents_ItemCreated" onitemdatabound="grdLatestEvents_ItemDataBound" 
                              >
                            <MasterTableView   EditMode="EditForms" EditFormSettings-EditColumn-UpdateText="Save"  EditFormSettings-EditColumn-InsertText="Save" 
                               CommandItemDisplay="Top" NoMasterRecordsText="No Events to display" TableLayout="Fixed" 
                               DataKeyNames="LatestEventID"  >
                                   <CommandItemSettings AddNewRecordText="Add Event" />
                                        <Columns>
                                            <telerik:GridEditCommandColumn  UniqueName="EditCommandColumn1" 
                                                 ButtonType="ImageButton" HeaderStyle-Width="5%">
                                                     <HeaderStyle >
                                                     </HeaderStyle>
                                             </telerik:GridEditCommandColumn>
                                             <telerik:GridButtonColumn ConfirmText="Are you sure you want to Delete the Event?"
                                               ConfirmDialogType="RadWindow" ConfirmTitle="Delete"
                                                         ButtonType="ImageButton" CommandName="Delete" 
                                                      UniqueName="DeleteColumn" HeaderStyle-Width="5%">
                                             </telerik:GridButtonColumn>
                                             <telerik:GridBoundColumn HeaderText="Title" HeaderButtonType="TextButton"  HeaderStyle-Width="15%" 
                                                UniqueName="LatestEventTitle" MaxLength="50"  DataField="LatestEventTitle"  >
                                                                                         
                                            </telerik:GridBoundColumn>  
                                            <telerik:GridTemplateColumn HeaderText="Description" HeaderButtonType="TextButton"  HeaderStyle-Width="15%" 
                                                UniqueName="LatestEventDescription">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblLatestEventDescription" runat="server"  
                                                      Text='<%#Eval("LatestEventDescription")%>' ToolTip='<%#Eval("LatestEventDescription")%>' > </asp:Label>
                                                </ItemTemplate>
                                                <EditItemTemplate>
                                                    <telerik:RadTextBox ID="txtLatestEventDescription" MaxLength="500"   TextMode="MultiLine"   Width="352px"
                                                     Height="150px"  runat="server"></telerik:RadTextBox>
                                                </EditItemTemplate>
                                           </telerik:GridTemplateColumn>
                                           <telerik:GridDateTimeColumn HeaderText="Event date" UniqueName="LatestEventDate"
                                            HeaderStyle-Width="15%" DataField="LatestEventDate"  >
                                           </telerik:GridDateTimeColumn>
                                           <telerik:GridCheckBoxColumn DataField="IsActive" UniqueName="IsActive"  HeaderText="Active" HeaderStyle-Width="7%" ItemStyle-HorizontalAlign="Center">
                                        </telerik:GridCheckBoxColumn>
                                       </Columns>
                                  <PagerStyle Mode="NumericPages" Font-Bold="True" HorizontalAlign="Justify"></PagerStyle>
                           </MasterTableView>
                        </telerik:radgrid>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Label ID="lblError" CssClass="lblError" EnableTheming="false"  runat="server" ></asp:Label>
                    </td>
                </tr>
            </table>
        </asp:Panel>
       
    </div>
 
</div>
</asp:Content>



Thanks
Jayesh Goyani
Top achievements
Rank 2
 answered on 12 Feb 2011
2 answers
94 views
I have one radgrid for that I have set one property AutoGenerateColumns="true".
But I want one column align to right.
Because by default all the column has align left.

Below is the code snipt.
<radG:RadGrid ID="rdgAccEntriesReconcileReport" AllowFilteringByColumn="false" runat="server" AutoGenerateColumns="true"
  AllowPaging="true" PageSize="40" AllowSorting="true" GridLines="None" Skin="Telerik"
   MasterTableView-Visible="true" Width="100%" OnItemCommand="rdgAccEntriesReconcileReport_ItemCommand" OnItemDataBound="rdgAccEntriesReconcileReport_ItemBound"
   SortingSettings-SortedAscToolTip="Click to sort in ascending or alphabetic order"
    SortingSettings-SortedDescToolTip="Click to sort in descending or reverse alphabetic order" OnSortCommand="sortlist">
      <MasterTableView Width="100%">
  </MasterTableView>
      <ClientSettings>
         <Scrolling AllowScroll="true" UseStaticHeaders="true" />
           <Selecting AllowRowSelect="true" />
              </ClientSettings>
               </radG:RadGrid>

Please help if any additional coding or property need to be set.
nirbhay giri
Top achievements
Rank 1
 answered on 12 Feb 2011
2 answers
117 views

Hello!

I am in the initial stages of development of an application that will use Telerik's RADControls for ASP.NET AJAX. The web pages will interact with a WCF web service, which will be accessing a relational database management system.

Considering that this will be my first experience with Telerik components, I would appreciate whether someone could provide some assistance in regard to the most adequate component to use.

I have run some of the RADControls for ASP.NET AJAX Q3 2010 Live Examples and noticed that the Scheduler component might offer the features I am looking for. Could you please confirm this component can interact with a WCF web service?

In the "Scheduler / Resource Availability" example, rooms "Meeting room 201" and "Meeting room 202" are displayed side by side. I was wondering how the Scheduler component would handle a scenario where 10 or 15 rooms would have to be managed. Would it be possible for someone from Telerik to add a few rows to the Room table so that I could check the lay out of the page in the Live Example?

Please, let me know if there is another component that could also be used to track availability of resources.
Thank you in advance.

PTM

Paulo
Top achievements
Rank 1
 answered on 12 Feb 2011
1 answer
62 views
Hai


I am exporting the grid values to pdf,Excel and Word. when i am exporting the grid with the value "0" it displayed as "0.00" in Excel. But when i am exporting the same grid to word or PDF  the value "0" it displayed as "0". How Can i display the value as "0.00" in pdf and word also.



Thanks
Daniel
Telerik team
 answered on 11 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?