Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 views
Hi .

I want to know is that possible to use this Chart control in a MVC project?

Regards
Mazdak
Yavor
Telerik team
 answered on 23 Mar 2011
1 answer
100 views
Is it possible to call the diff engine from JavaScript.  I have looked across the forums and every example uses a postback.

Any example of how to do this would be great.

Thanks
Dobromir
Telerik team
 answered on 23 Mar 2011
0 answers
107 views
Hi,

      I am using Rad Async upload with Rad Progress bar in my application. It is working fine.
But While clicking cancel button in Rad Async upload,it showing the progress bar for another 5 mins and then disappears.
1. How can we avoid the progress bar in Rad Async upload cancel event.
2. How can we capture the cancel event in Rad Async upload?

I am using default cancel and remove button in Rad Async upload.

Thanks
Prabha
prabha
Top achievements
Rank 1
 asked on 23 Mar 2011
8 answers
1.1K+ views


Ok, I have sorted out what the problem really is and I'm ready to post now (sorry to those who read my false start earlier)

On this form I have a 2 RadDatePickers, a couple of Dropdowns and a text box.

The Dropdowns let the users select some pre selected date options to which the date pickers set themselves. Stuff like 'This Month' or The Year'. etc.

The DatePickers have SelectDateChanged Events wired up. So if the user selects This Year from a dropdown,(1/1/2011 - 31/12/2011) but then changes the first date picker to 5/1/2011, the SelectedDateChanged event resets the dropdown to some default value (it's no longer a 'This Year' view)..

The textbox on the other hand lets you enter a number of days. This number is used to set the End Date to that many days after the selected Start Date and uses Jquery to perform the update. The jQuery also prevents the user entering in non numeric characters.

So the user enters say the number 3, and the End Date is modified. However, It is this update that is firing the SelectedDateChanged event!

I don't want to the Date Picker to fire this event when the textboxes jQuery executes, I want it to only fire when the user selects a date from the date picker.

Is this possible?
 
Brad
Top achievements
Rank 1
 answered on 23 Mar 2011
0 answers
52 views
I attached a screenshot of a RadWindow as a popup that is displaying some pretty weird styling.

If we take out all style sheets, the result is the same.

There are a lot of RadControls on the page, master page and stuff. It's big, so I can't really post it.

Everything else is fine though.

How can we get the window to display properly?

Richard

Edit: Hi, disregard and delete this post pls. Answer is obvious if I look: Don't forget to send a 1 line title...
Richard Weeks
Top achievements
Rank 2
 asked on 23 Mar 2011
17 answers
191 views
Hi,

In my application I have some simple asp:formviews for changing some settings of a specific record. In this case the password.
The form has three buttons, one for the formviews canceling event, one for the formviews update event and one which do some other staff on the server-side.

The two password textboxes requires validation done by the RadInputManager.
The TextBoxSettings are appended in the formiews ItemCreated event.

When calling the page the first time all looks fine, validation works and skins are applied. After clicking the update or the cancel button the TextBoxSettings are not appended to the textboxes and there is no validation.
On the other hand, when I click on the third button all works fine.

Has anyone an idea what I'm doing wrong? Is there an Rad equal to asp:formview ? How are others editng forms? Please note the this is only a small example. I have a lot of more complex asp:formviews in my app

Here ist my code

<%@ Page Title="" Language="C#" MasterPageFile="~/portal/PartnerPersSettings.master" AutoEventWireup="true" CodeFile="PartnerAccess.aspx.cs" Inherits="www.sw_xperts.com.portal.PartnerAccess" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cpPersSettingContent" runat="server">
<asp:HiddenField id="hfEditingPartnerId" runat="server" />
<telerik:RadFormDecorator ID="rfdDefault" runat="server"/>
        <telerik:RadAjaxManager ID="ramManager" runat="server" EnablePageHeadUpdate="False">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="fvZugangsdaten"  >
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="fvZugangsdaten" LoadingPanelID="ralpLoading" />
                        <telerik:AjaxUpdatedControl ControlID="rimAccess"/>
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel id="ralpLoading" runat="server"></telerik:RadAjaxLoadingPanel>
        <telerik:RadInputManager ID="rimAccess" runat="server">
            <telerik:TextBoxSetting BehaviorID="behTxtRequired" Validation-IsRequired="true">
            </telerik:TextBoxSetting>
        </telerik:RadInputManager>
    <asp:FormView CellPadding="0" CellSpacing="0" ID="fvZugangsdaten" 
        DataKeyNames="cp_id" DefaultMode="Edit" runat="server" 
        DataSourceID="odsZugangsdaten" onitemcreated="fvZugangsdaten_ItemCreated">
    <EditItemTemplate>
        <div class="editForm" >
            <div>
                <fieldset style="width:725px;">
                    <div class="fieldsetTopSpacer"></div>
                    <ul>
                        <li>
                            <asp:Label ID="lblZdUsername" runat="server">Benutzername</asp:Label>
                            <asp:HiddenField ID="hfZdUsername" runat="server" Value='<%# Bind("DBUSER") %>' />
                        </li>
                        <li class="inputBox">
                            <%# Eval("DBUSER") %>
                        </li>
                        <li style="width:50%;text-align:right;">
                            <asp:Button ID="btnZugangsdatenNeu" runat="server" Text="Benutzerkennung anlegen" 
                                CommandName="ZugangsdatenNeu" CausesValidation="false" 
                                onclick="btnZugangsdatenNeu_Click"/>
                        </li>
                    </ul>     
                    <ul>
                        <li>
                            <asp:Label ID="lblZdPasswortNeu1" runat="server">Neues Passwort*</asp:Label>
                        </li>
                        <li>
                            <asp:TextBox ID="txtPasswort1" runat="server"  TextMode="Password" Text='<%# Bind("Passwort") %>'></asp:TextBox>
                        </li>
                    </ul>
                    <ul>
                        <li>
                            <asp:Label ID="lblZdPasswortNeu2" runat="server">Wiederholung*</asp:Label>
                        </li>
                        <li>
                            <asp:TextBox ID="txtPasswort2" runat="server"  TextMode="Password" ></asp:TextBox>
                        </li>
                        <li>
                            <asp:CompareValidator ID="comparePasswort" runat="server" 
                                                        ControlToCompare="txtPasswort1" ControlToValidate="txtPasswort2" Display="Static" 
                                                        ErrorMessage="Passwörter nicht gleich"></asp:CompareValidator>
                        </li>
                    </ul>
                    <ul>
                        <li>
                            <asp:Label ID="testOut" runat="server" ></asp:Label>
                        </li>
                    </ul>
                    <ul style="clear:both;">
                        <li style="width:100%; text-align:right; height:auto;clear:both;">
                            <asp:Button ID="btnUpdate" runat="server" Text="Speichern" 
                            CommandName="Update" CausesValidation="true"/>
                            <asp:Button ID="btnCancel" runat="server" Text="Abbrechen" 
                            CommandName="Cancel" CausesValidation="false"/>
                        </li>
                    </ul>
                </fieldset>
            </div>
        </div>
    </EditItemTemplate>
    </asp:FormView>
    <asp:ObjectDataSource ID="odsZugangsdaten" runat="server" 
        SelectMethod="getZugangsdaten"  UpdateMethod="setZugangsdaten"  OldValuesParameterFormatString="original_{0}" 
        TypeName="com.swxperts.corelib.bo.ModPersoenlicheDaten">
        <SelectParameters>
            <asp:SessionParameter Name="LoggedInProfilId" SessionField="LoggedInUser" Type="String" />
            <asp:ControlParameter ControlID="hfEditingPartnerId" DefaultValue="" 
                Name="ProfilId" PropertyName="Value" Type="String" />
            <asp:SessionParameter Name="DbSession" SessionField="SessionTracker" Type="String" />
        </SelectParameters>
        <UpdateParameters>
            <asp:SessionParameter Name="LoggedInProfilId" SessionField="LoggedInUser" Type="String" />
            <asp:Parameter Name="Original_cp_id" Type="String" />
            <asp:SessionParameter Name="DbSession" SessionField="SessionTracker" Type="String" />
            <asp:Parameter Name="DBUser" Type="String" />
            <asp:Parameter Name="Passwort" Type="String" />
        </UpdateParameters>
    </asp:ObjectDataSource>
  
     
</asp:Content>

And code behind:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
  
namespace www.sw_xperts.com.portal {
    public partial class PartnerAccess : ExtendedPage {
        protected void Page_Load(object sender, EventArgs e) {
            if (!IsPostBack) {
                string EditingId = Request.QueryString.Get("ProfilId");
                hfEditingPartnerId.Value = string.IsNullOrEmpty(EditingId) ? Session["LoggedInUser"] as string : EditingId;
            }
            if (string.IsNullOrEmpty(hfEditingPartnerId.Value)) {
                Response.Redirect("~/Default.aspx");
            }
        }
  
        protected void fvZugangsdaten_ItemCreated(object sender, EventArgs e) {
            FormView fv = (FormView)sender;
            if (fv.CurrentMode == FormViewMode.Edit) {
                TextBox txtPasswort1 = fv.FindControl("txtPasswort1") as TextBox;
                TextBox txtPasswort2 = fv.FindControl("txtPasswort2") as TextBox;
                TextBoxSetting reqTextBoxSetting = (TextBoxSetting)rimAccess.GetSettingByBehaviorID("behTxtRequired");
                reqTextBoxSetting.TargetControls.Add(new TargetInput(txtPasswort1.UniqueID, true));
                reqTextBoxSetting.TargetControls.Add(new TargetInput(txtPasswort2.UniqueID, true));
                  
            }
        }
        protected void btnZugangsdatenNeu_Click(object sender, EventArgs e) {
            Button a = sender as Button;
            Label l =  a.NamingContainer.FindControl("testOut") as Label;
            l.Text = "Clicked and done";
        }
}
}

Chen
Top achievements
Rank 1
 answered on 23 Mar 2011
2 answers
143 views
When showing a hierachial set of data in a treeview, can the ID and ParentID fields be non-numeric? Specifically i have a datatable where the ID and Parent IDs are GUIDs.

I was able to get things working if i used integers for the id and parent id fields, but not for strings.

thanks in advance.
Matthew Petersen
Top achievements
Rank 1
 answered on 22 Mar 2011
2 answers
275 views
Hi,

I am running into a weird issue with this XmlHttpPanel. It used to work (from a very old version, 2009.3.1208) until I updated it to the newest version just released.

The problem happens when I want to use the $find('the panel').set_value() to initiate callback. It now works on some of my pages, but not all of them. See attached for the detailed error message.
Danko
Top achievements
Rank 1
 answered on 22 Mar 2011
0 answers
139 views
I need to run the filter with ComboBox and Contains StartsWith + MarkFirstMatch =true

Sample items

Ana Maria
Antonio
Felipe
Fabio
Maria Ana

My combobox is specified as with Contains.

Value: Maria

It appears the items:
Ana Maria
Maria Ana

All right. Only he focuses on the first "Ana Maria" but I wish he focuses on "Maria Ana" Butit still appears the "Ana Maria".

How do I do this?

I tried using the OnClientKeyPressing but does not work correctly: .highlight();
Rudá Cunha
Top achievements
Rank 2
 asked on 22 Mar 2011
1 answer
200 views
Hi,
I have the problem that this error pops up:
Could not find control 'EisDefaultLocationComboBox' in ControlParameter 'LocationID'.

Here my code:

<telerik:RadDockZone ID="EisDefaultDockZone" runat="server" Orientation="Vertical" Style="border: 0px;">
    <telerik:RadDock ID="EisDefaultDock" runat="server" Title="Employee Information System" EnableRoundedCorners="true"
        DefaultCommands="None" EnableDrag="false">
        <ContentTemplate>
            <telerik:RadToolBar ID="EisDefaultToolBar" runat="server" Width="100%" Style="margin-top: 6px;">
                <Items>
                    <telerik:RadToolBarButton Text="New User" Enabled="false" />
                    <telerik:RadToolBarButton Text="Print" Enabled="false" />
                    <telerik:RadToolBarButton Text="Help" Enabled="false" />
                    <telerik:RadToolBarButton IsSeparator="true" />
                    <telerik:RadToolBarButton>
                        <ItemTemplate>
                            <div style="padding-left: 75px;">
                                Location: 
                                <telerik:RadComboBox ID="EisDefaultLocationComboBox" runat="server" AutoPostBack="true"
                                    DataSourceID="EisMainListLocationDataSource" DataTextField="LocationName"
                                    DataValueField="LocationID" AppendDataBoundItems="true" Width="150px">
                                    <Items>
                                        <telerik:RadComboBoxItem Text="ALL" Value="0" Selected="true" />
                                    </Items>
                                </telerik:RadComboBox>
                            </div>
                        </ItemTemplate>
                    </telerik:RadToolBarButton>
                    <telerik:RadToolBarButton>
                        <ItemTemplate>
                            <div style="padding-left: 50px;">
                                Search: 
                                <telerik:RadTextBox ID="EisDefaultSearchTextBox" runat="server" Width="150px" Enabled="false" />
                            </div>
                        </ItemTemplate>
                    </telerik:RadToolBarButton>
                </Items>
            </telerik:RadToolBar>
            <telerik:RadGrid ID="YawaMainGrid" runat="server" DataSourceID="EisMainListDataSource" GridLines="None"
                AllowPaging="True" PageSize="20" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="True"
                EnableHeaderContextMenu="True" EnableHeaderContextFilterMenu="True" AllowFilteringByColumn="True"
                OnItemCommand="YawaMainGrid_ItemCommand" OnItemDataBound="YawaMainGrid_ItemDataBound" Style="margin-top: 6px;">
                <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="false">
                    <Selecting AllowRowSelect="true" />
                    <ClientEvents OnRowClick="YawaMainGridRowClick" OnRowContextMenu="RowContextMenu" />
                </ClientSettings>
                <GroupingSettings CaseSensitive="false" />
                <MasterTableView DataSourceID="EisMainListDataSource" DataKeyNames="UserID" ClientDataKeyNames="UserID"
                    AllowFilteringByColumn="true" IsFilterItemExpanded="false">
                    <Columns>
                        <telerik:GridBoundColumn DataField="Account" 
                            FilterControlAltText="Filter Account column" HeaderText="Account" ReadOnly="true"
                            SortExpression="Account" UniqueName="Account">
                            <ItemStyle Width="65px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Lastname" 
                            FilterControlAltText="Filter Lastname column" HeaderText="Lastname" ReadOnly="true"
                            SortExpression="Lastname" UniqueName="Lastname">
                            <ItemStyle Width="160px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Firstname" 
                            FilterControlAltText="Filter Firstname column" HeaderText="Firstname" ReadOnly="true"
                            SortExpression="Firstname" UniqueName="Firstname">
                            <ItemStyle Width="120px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Loc." 
                            FilterControlAltText="Filter Loc. column" HeaderText="Loc." ReadOnly="true"
                            SortExpression="Loc." UniqueName="Loc.">
                            <ItemStyle Width="50px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="SBU/Dep." 
                            FilterControlAltText="Filter SBU/Dep. column" HeaderText="SBU/Dep." ReadOnly="true"
                            SortExpression="SBU/Dep." UniqueName="SBU/Dep.">
                            <ItemStyle Width="140px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Phone" 
                            FilterControlAltText="Filter Phone column" HeaderText="Phone" ReadOnly="True" 
                            SortExpression="Phone" UniqueName="Phone">
                            <ItemStyle Width="160px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Phone" 
                            FilterControlAltText="Filter Mobile column" HeaderText="Mobile" ReadOnly="True" 
                            SortExpression="Mobile" UniqueName="Mobile">
                            <ItemStyle Width="160px" />
                        </telerik:GridBoundColumn>
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
            <telerik:RadContextMenu ID="EisDefaultContextMenu" runat="server" OnClientItemClicked="ClientMenuItemClick" EnableShadows="true">
                <Items>
                    <telerik:RadMenuItem Text="Full Details" Value="details" Enabled="true" />
                    <telerik:RadMenuItem Text="Edit" Value="edit" Enabled="false" />
                    <telerik:RadMenuItem Text="Set status" Value="status" Enabled="false" />
                </Items>
            </telerik:RadContextMenu>
        </ContentTemplate>
    </telerik:RadDock>
</telerik:RadDockZone>
<asp:SqlDataSource ID="EisMainListDataSource" runat="server"
    ConnectionString="<%$ ConnectionStrings:YAWAConnectionString %>" 
    SelectCommand="if (@LocationID <> 0)
                 begin
                   SELECT CoreUser.CoreUserID AS UserID,
                   CoreUser.UserAccount AS Account,
                   CoreUser.UserLastname AS Lastname,
                   CoreUser.UserFirstname AS Firstname,
                   CoreLocation.CoreLocationID AS LocationID,
                   CoreLocation.LocationNameShort AS [Loc.],
                   CoreBusinessUnit.BusinessUnitNameShort AS [SBU/Dep.],
                   REPLACE(CoreCountry.CountryAreaCode, '00', '+') + ' ' + RIGHT(CoreLocation.LocationAreaCode , LEN(CoreLocation.LocationAreaCode)-1) + ' ' + CoreLocation.LocationPhone + ' - ' + CoreUser.UserPhoneExtension AS Phone
                   FROM CoreUser
                   INNER JOIN CoreLocation ON CoreUser.CoreLocationID = CoreLocation.CoreLocationID
                   INNER JOIN CoreGfsExpenseCode ON CoreUser.CoreGfsExpenseCodeID = CoreGfsExpenseCode.CoreGfsExpenseCodeID
                   INNER JOIN CoreBusinessUnit ON CoreGfsExpenseCode.CoreBusinessUnitID = CoreBusinessUnit.CoreBusinessUnitID
                   INNER JOIN CoreCountry ON CoreLocation.CoreCountryID = CoreCountry.CoreCountryID
                   WHERE (CoreLocation.CoreLocationID = @LocationID)
                 end else begin
                   SELECT CoreUser.CoreUserID AS UserID,
                   CoreUser.UserAccount AS Account,
                   CoreUser.UserLastname AS Lastname,
                   CoreUser.UserFirstname AS Firstname,
                   CoreLocation.CoreLocationID AS LocationID,
                   CoreLocation.LocationNameShort AS [Loc.],
                   CoreBusinessUnit.BusinessUnitNameShort AS [SBU/Dep.],
                   REPLACE(CoreCountry.CountryAreaCode, '00', '+') + ' ' + RIGHT(CoreLocation.LocationAreaCode , LEN(CoreLocation.LocationAreaCode)-1) + ' ' + CoreLocation.LocationPhone + ' - ' + CoreUser.UserPhoneExtension AS Phone
                   FROM CoreUser
                   INNER JOIN CoreLocation ON CoreUser.CoreLocationID = CoreLocation.CoreLocationID
                   INNER JOIN CoreGfsExpenseCode ON CoreUser.CoreGfsExpenseCodeID = CoreGfsExpenseCode.CoreGfsExpenseCodeID
                   INNER JOIN CoreBusinessUnit ON CoreGfsExpenseCode.CoreBusinessUnitID = CoreBusinessUnit.CoreBusinessUnitID
                   INNER JOIN CoreCountry ON CoreLocation.CoreCountryID = CoreCountry.CoreCountryID
                 end">
    <SelectParameters>
        <asp:ControlParameter Name="LocationID" PropertyName="SelectedValue" ControlID="EisDefaultLocationComboBox" />
    </SelectParameters>
</asp:SqlDataSource>
<asp:SqlDataSource ID="EisMainListLocationDataSource" runat="server"
    ConnectionString="<%$ ConnectionStrings:YAWAConnectionString %>"
    SelectCommand="SELECT CoreLocation.CoreLocationID AS LocationID,
                   CoreLocation.LocationName AS LocationName
                   FROM CoreLocation">
</asp:SqlDataSource>

I want to filter the RadGrid with the RadComboBox shown in the Telerik Demo
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridcomboajax/defaultcs.aspx?product=grid

Could anyone help me please, I´m a beginner and want to learn ;-)

Andreas

Dimitar Terziev
Telerik team
 answered on 22 Mar 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?