Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
148 views
When double clicking on a scheduler, I want to be able to pass a value to the advanced form so it can use it to grab more values from the database when loading.

Can someone give me an example of how to pass a value to the advanced form? I have already set up properties etc in the advanced form, I'm just not sure how to pass it when double clicking a timeslot in the scheduler for appointment insert.

Thanks in advance.
Peter
Telerik team
 answered on 14 Jul 2010
3 answers
130 views
Hi,

I have started to use RadAjaxManager instead of ASP UpdatePanels to control what section of the page that should be updated.
I also know how to use the RadAjaxLoadingPanel in combination with AjaxSettings to show a loading symbol over different controls (see below).

<telerik:RadAjaxManager>
   <telerik:AjaxSetting AjaxControlID="btnDummy">
      <UpdatedControls>
         <telerik:AjaxUpdatedControl ControlID="pnlToUpdate" LoadingPanelID="RadAjaxLoadingPanel1" />
      </UpdatedControls>
   </telerik:AjaxSetting>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>

What I want to achieve now is to show the RadAjaxLoadingPanel loading symbol, but not over a specific control.
For example, I would like to be able to display a loading animation next to a button when pressing that button. How can this be achieved with the RadAjaxManager?

Thanks!
Dimo
Telerik team
 answered on 14 Jul 2010
2 answers
222 views
Hello ,
I have a radgrid and sqldatasource
in the database i have a unique key constraint to check if username  exist

When i am trying to add new record from radgrid  of  an existing username    i get this error

Violation of UNIQUE KEY constraint 'IX_Users'. Cannot insert duplicate key in object 'dbo.Users'.
The statement has been terminated


that s because i am using a unique key constraint

how can i handle this error to display in a Validation summary for example or a label
to ask user or tell him that username exist already and must insert another valid username

I tried to use  validationsettings property of rad grid but i failed please help
thanks for anyone who can solve my problem
sam
Top achievements
Rank 1
 answered on 14 Jul 2010
1 answer
187 views
Hi,

How I can remove the close (cross) button from the dock's top right position?
Also, how to customize (change/remove) the border of a RadDockZone (see attached jpg)?

Thanks
Pero
Telerik team
 answered on 14 Jul 2010
2 answers
178 views
I am in the early staging of using RadScheduler.  So someone please advise if I may not understand it the right way.
1. I am working a custom sql provider, and override following method:
public override IEnumerable<Appointment> GetAppointments(RadScheduler owner)
from my understanding, all appointments will be loaded, then in the DataBinding event, those appointment filtered by resources will be set to invisible.

In my case, the number of Appointment will be huge, I would like to filter the appointment by resouces in earlier staging, e.g. in the stored procedures.  How do I pass in the resources filter in GetAppointments method?

2. Can someone help me on my post at http://www.telerik.com/community/forums/aspnet-ajax/scheduler/user-based-recources.aspx ?
The demo stated that the resource will be cached once retrieved, but from what I saw, GetResourcesByType is being called everytime page is postback.  What is the internal cache machenism RadScheduler already inplemented?

Thanks

Li Zhou
Top achievements
Rank 1
 answered on 14 Jul 2010
2 answers
85 views
I am following http://www.telerik.com/help/aspnet-ajax/schedule_databindingimplementingaproviderthatsupportsmultivaluedresources.html to create a custom provider and I have some questions:

I want to create user based resources, i.g. each user can create their own resources, or "tag".  Each appointment can have one or multiple "tags".  User can sort appointment based on the custom "tags".

In the article, it states that
"Implement the GetResourcesByType method to supply the scheduler with a list of possible values given a resource type. This requires a query to the database to obtain the list of values. Once retrieved, the resources are cached. "

Is it possible to cache the resources based on a userID (a guid) ?  Do you provide any interface to override the Cache key?  What is the build-in Cache invalidation machenism?  If one user modifed his custom resources, how to make it not effect other users resourcs?

Thanks!

Li Zhou
Top achievements
Rank 1
 answered on 14 Jul 2010
2 answers
119 views

I am loading a rad combo box on demand (EnableLoadOnDemand="True") in the ItemsRequested event. I want this to load when the user opens the combo box but not when they type in the combo box (I have MarkFirstMatch = true). Is this possible?

Here is the code I am using for all this if it helps:

<telerik:RadComboBox ID="RadComboBox2" CssClass="DGselectPerson" runat="server" EmptyMessage="Select a Person" EnableLoadOnDemand="True" AppendDataBoundItems="false" AutoPostBack="true" DataTextField="Name" DataValueField="RecordID" EnableVirtualScrolling="true" OnClientDropDownOpening="onDropDownOpening" OnItemsRequested="RadComboBox2_ItemsRequested" MarkFirstMatch="true">

 

 

 

 

</telerik:RadComboBox>

 

Protected

 

 

Sub RadComboBox2_ItemsRequested(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs) Handles RadComboBox2.ItemsRequested

 

RadComboBox2.DataSource = GetPeople()

RadComboBox2.DataBind()

 

 

End Sub

 

Billy
Top achievements
Rank 2
 answered on 14 Jul 2010
1 answer
109 views
Hi All,

I am facing problem while exporting values from one RadListbox to another.
While debug Im proper shifting of values from one RadListBox to another, But
in destination RadListbox Im getting void entry[Blank ListItem] and source RadListbox had removed ListItem and if I press F5
then value of SourceListbox get retain and blank ListItem in destination get removed.

<Code>

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowSorting="true"

                                                                    AllowPaging="True" PageSize="20" GridLines="None" ShowGroupPanel="false" OnNeedDataSource="RadGrid1_NeedDataSource"

                                                                    OnItemCreated="RadGrid1_ItemCreated" Skin="Vista" EnableEmbeddedSkins="true"

                                                                    OnItemCommand="RadGrid1_ItemCommand" OnItemDataBound="RadGrid1_ItemDataBound"

                                                                    OnPreRender="RadGrid1_PreRender" Width="98%" OnDataBound="RadGrid1_DataBound">

                                                                    <MasterTableView DataKeyNames="Item" Width="100%">

                                                                        <NestedViewTemplate>

                                                                            <asp:Panel runat="server" ID="InnerContainer" CssClass="viewWrap" Visible="false">

                                                                                <div class="border_none">

                                                                                    <telerik:RadTabStrip runat="server" ID="TabStip1" MultiPageID="Multipage1" SelectedIndex="0"

                                                                                        EnableEmbeddedBaseStylesheet="true">

                                                                                        <Tabs>

                                                                                            <telerik:RadTab Width="330px" runat="server" Text="<img src='images/SCDLlogo.gif'/>&nbsp;Manual Comparison - SCDL Properties"

                                                                                                PageViewID="PageView1">

                                                                                            </telerik:RadTab>

                                                                                        </Tabs>

                                                                                        <Tabs>

                                                                                            <telerik:RadTab Width="330px" runat="server" Text="<img src='images/LocalDecklogo.gif'/>&nbsp;Manual Comparison - LOCALDECK Properties"

                                                                                                PageViewID="PageView11">

                                                                                            </telerik:RadTab>

                                                                                        </Tabs>

                                                                                    </telerik:RadTabStrip>

                                                                                    <telerik:RadMultiPage runat="server" Width="98%" ID="Multipage1" SelectedIndex="0"

                                                                                        RenderSelectedPageOnly="false">

                                                                                        <telerik:RadPageView runat="server" ID="PageView1">

                                                                                            <asp:Label ID="Label1" Font-Bold="true" Font-Italic="true" Text='<%# Eval("Item") %>'

                                                                                                Visible="false" runat="server" />

                                                                                            <asp:Label ID="lblLevelID" Font-Bold="true" Font-Italic="true" Text='<%# Eval("LevelID") %>'

                                                                                                Visible="false" runat="server" />

                                                                                            <asp:Label ID="lblSupplier" Font-Bold="true" Font-Italic="true" Text='<%# Eval("Supplier") %>'

                                                                                                Visible="false" runat="server" />

                                                                                            <telerik:RadGrid runat="server" ID="RadMappingGrid" DataSourceID="SqlDataSource2"

                                                                                                ShowHeader="true" ShowFooter="true" AllowSorting="false" EnableLinqExpressions="false"

                                                                                                EnableEmbeddedSkins="true" Skin="Web20" OnItemCommand="RadMappingGrid_ItemCommand"

                                                                                                Width="100%">

                                                                                                <MasterTableView ShowHeader="true" AutoGenerateColumns="False" AllowPaging="true"

                                                                                                    DataKeyNames="Item" Width="100%" PageSize="25" HierarchyLoadMode="ServerOnDemand">

                                                                                                    <Columns>

                                                                                                        <telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Property Name">

                                                                                                            <ItemTemplate>

                                                                                                                <asp:Label ToolTip='<%# DataBinder.Eval(Container.DataItem,"SCDLTooltip") %>' runat="server" ID="lblSCDLPropertyName" Text='<%# DataBinder.Eval(Container.DataItem,"SCDLDisplayName") %>' />

                                                                                                                <asp:HiddenField runat="server" ID="hdnSCDLPropertyName" Value='<%# DataBinder.Eval(Container.DataItem,"SCDLPropertyName") %>' />

                                                                                                            </ItemTemplate>

                                                                                                            <ItemStyle Width="100px" CssClass="SCDLHeader" />

                                                                                                            <HeaderStyle HorizontalAlign="Center" />

                                                                                                        </telerik:GridTemplateColumn>

                                                                                                        <telerik:GridTemplateColumn UniqueName="SCDLPropertyValue" HeaderText="Property Value">

                                                                                                            <ItemTemplate>

                                                                                                                <asp:Label runat="server" ID="lblSCDLPropertyValue" Text='<%# DataBinder.Eval(Container.DataItem,"SCDLPropertyValue") %>' />

                                                                                                            </ItemTemplate>

                                                                                                            <ItemStyle Width="100px" CssClass="SCDLHeader"/>

                                                                                                            <HeaderStyle  HorizontalAlign="Center" />

                                                                                                        </telerik:GridTemplateColumn>

                                                                                                        <telerik:GridTemplateColumn UniqueName="SCDLLastModified" HeaderText="Property Last Modified">

                                                                                                            <ItemTemplate>

                                                                                                                <asp:Label runat="server" ID="lblSCDLPropertyLastModified" Text='<%# DataBinder.Eval(Container.DataItem,"SCDLLastModified") %>' />

                                                                                                            </ItemTemplate>

                                                                                                            <ItemStyle Width="60px" CssClass="SCDLHeader"/>

                                                                                                            <HeaderStyle  HorizontalAlign="Center" />

                                                                                                        </telerik:GridTemplateColumn>

                                                                                                        <telerik:GridTemplateColumn UniqueName="nsItemDescription" HeaderText="Property Name">

                                                                                                            <ItemTemplate>

                                                                                                                <asp:Label runat="server" ToolTip='<%# DataBinder.Eval(Container.DataItem,"LOCALDECKTooltip") %>' ID="lblLOCALDECKPropertyName" Text='<%# DataBinder.Eval(Container.DataItem,"defaultcaption") %>' />

                                                                                                                <asp:HiddenField runat="server" ID="hdnLocalDeckProprtyName" Value='<%# DataBinder.Eval(Container.DataItem,"nsItemDescription") %>' />

                                                                                                            </ItemTemplate>

                                                                                                            <ItemStyle Width="100px" CssClass="LocalDeckHeader"/>

                                                                                                            <HeaderStyle  HorizontalAlign="Center" />

                                                                                                        </telerik:GridTemplateColumn>

                                                                                                        <telerik:GridTemplateColumn UniqueName="ID_Value" HeaderText="Property Value">

                                                                                                            <ItemTemplate>

                                                                                                                <asp:Label runat="server" ID="lblLOCALDECKPropertyValue" Text='<%# DataBinder.Eval(Container.DataItem,"ID_Value") %>' />

                                                                                                            </ItemTemplate>

                                                                                                            <ItemStyle Width="100px" CssClass="LocalDeckHeader"/>

                                                                                                            <HeaderStyle  HorizontalAlign="Center" />

                                                                                                        </telerik:GridTemplateColumn>

                                                                                                        <telerik:GridTemplateColumn UniqueName="ChangedAt" HeaderText="Property Last Modified">

                                                                                                            <ItemTemplate>

                                                                                                                <asp:Label runat="server" ID="lblLOCALDECKPropertyLastModified" Text='<%# DataBinder.Eval(Container.DataItem,"ChangedAt") %>' />

                                                                                                            </ItemTemplate>

                                                                                                            <ItemStyle Width="60px" CssClass="LocalDeckHeader"/>

                                                                                                            <HeaderStyle  />

                                                                                                        </telerik:GridTemplateColumn>

                                                                                                        <telerik:GridTemplateColumn HeaderStyle-Width="90px" UniqueName="TemplateColumn"

                                                                                                            HeaderText="Action" ItemStyle-CssClass="ActionHeader"  HeaderStyle-HorizontalAlign="Center">

                                                                                                            <ItemTemplate>

                                                                                                                <div class="brdr">

                                                                                                                    <asp:HiddenField runat="server" ID="hdnItem" Value='<%# DataBinder.Eval(Container.DataItem,"Item") %>' />

                                                                                                                    <asp:RadioButtonList runat="server" CssClass="brdr" ID="ActionRadioButtonList" RepeatDirection="Vertical">

                                                                                                                        <asp:ListItem Text="<%$ Resources:Resource, Update%>" Value="U" />

                                                                                                                        <asp:ListItem Text="<%$ Resources:Resource, Ignore%>" Value="I" Selected="True" />

                                                                                                                    </asp:RadioButtonList>

                                                                                                                </div>

                                                                                                            </ItemTemplate>

                                                                                                            <FooterTemplate>

                                                                                                                <%--<asp:RadioButtonList runat="server" CssClass="footerRadio" ID="ActionRadioButtonList2" RepeatDirection="Horizontal">

                                                                                                                    <asp:ListItem Text="<%$ Resources:Resource, UpdateAll%>" Value="U" />

                                                                                                                    <asp:ListItem Text="<%$ Resources:Resource, IgnoreAll%>" Value="I" Selected="True" />

                                                                                                                </asp:RadioButtonList>--%>

                                                                                                                <asp:Button CommandName="buttonUpdateAll" runat="server" ID="Button1" Text="<%$ Resources:Resource, Update%>"

                                                                                                                    CssClass="btnAcceptChanges" Width="53px" />

                                                                                                                    <asp:Button CommandName="buttonIgnnoreAll" runat="server" ID="Button2" Text="<%$ Resources:Resource, Ignore%>"

                                                                                                                    CssClass="btnAcceptChanges" Width="53px" />

                                                                                                                <br />

                                                                                                                <asp:Button CommandName="buttonClick" runat="server" ID="btnSubmit" Text="<%$ Resources:Resource, AcceptChanges%>"

                                                                                                                    CssClass="btnAcceptChanges" />

                                                                                                            </FooterTemplate>

                                                                                                        </telerik:GridTemplateColumn>

                                                                                                    </Columns>

                                                                                                </MasterTableView>

                                                                                            </telerik:RadGrid><br />

                                                                                            <asp:SqlDataSource ID="SqlDataSource2" SelectCommandType="StoredProcedure" SelectCommand="proc_GetDataForManualComarison"

                                                                                                ConnectionString="<%$ ConnectionStrings:x2common %>" ProviderName="System.Data.SqlClient"

                                                                                                runat="server">

                                                                                                <SelectParameters>

                                                                                                    <asp:ControlParameter ControlID="Label1" PropertyName="Text" Type="String" Name="Item" />

                                                                                                </SelectParameters>

                                                                                            </asp:SqlDataSource>

                                                                                        </telerik:RadPageView>

                                                                                    </telerik:RadMultiPage>

                                                                                </div>

                                                                            </asp:Panel>

                                                                        </NestedViewTemplate>

                                                                        <Columns>

                                                                            <telerik:GridBoundColumn SortExpression="ItemIdentifier" HeaderText="<%$ Resources:Resource, SCDLNo%>"

                                                                                HeaderButtonType="TextButton" DataField="ItemIdentifier" UniqueName="ItemIdentifier">

                                                                            </telerik:GridBoundColumn>

                                                                            <telerik:GridBoundColumn SortExpression="Supplier" HeaderText="<%$ Resources:Resource, Supplier%>"

                                                                                HeaderButtonType="TextButton" DataField="Supplier" UniqueName="Supplier">

                                                                            </telerik:GridBoundColumn>

                                                                            <telerik:GridBoundColumn SortExpression="ProductGroup" HeaderText="<%$ Resources:Resource, ProductGroup %>"

                                                                                HeaderButtonType="TextButton" DataField="ProductGroup" UniqueName="ProductGroup">

                                                                            </telerik:GridBoundColumn>

                                                                            <telerik:GridBoundColumn SortExpression="ItemLongIdentifier" HeaderText="<%$ Resources:Resource, ProductName %>"

                                                                                HeaderButtonType="TextButton" DataField="ItemLongIdentifier" UniqueName="ItemLongIdentifier">

                                                                            </telerik:GridBoundColumn>

                                                                            <telerik:GridBoundColumn SortExpression="LevelID" HeaderText="Level" HeaderButtonType="TextButton"

                                                                                DataField="LevelID" UniqueName="LevelID" Display="false">

                                                                            </telerik:GridBoundColumn>

                                                                        </Columns>

                                                                    </MasterTableView>

                                                                    <PagerStyle Mode="NextPrevAndNumeric" NextPagesToolTip="" PageSizeLabelText='<%$ Resources:Resource, PageSize%>'>

                                                                    </PagerStyle>

                                                                    <ItemStyle HorizontalAlign="Left" />

                                                                    <AlternatingItemStyle HorizontalAlign="Left" />

                                                                </telerik:RadGrid>

                                                            </td>

                                                        </tr>

                                                    </table>

                                                </asp:Panel>

                                                <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">

                                                    <%--<img alt="Please Wait..." runat="server" src="images/103.gif" style="padding-top:250px;"  />--%>

                                                </telerik:RadAjaxLoadingPanel>


<Code>
Genady Sergeev
Telerik team
 answered on 14 Jul 2010
13 answers
269 views
I need to make a custom skin for the Listview RadDatapager. And i need to remove the " Page 1 of 10" text i want it to be empty i just need to display the slider.

<telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1"
                   PageSize="16"     Height="500px" >
                     
                   <Fields>
                   <telerik:RadDataPagerSliderField  SliderDragText=""  SliderOrientation ="Vertical"/>
  
                   </Fields>
                     
               </telerik:RadDataPager>

How can i do that?
Dimo
Telerik team
 answered on 14 Jul 2010
12 answers
389 views

When binding data to the RadComboBox utilizing an Ajax panel, the RadComboBox loses its datasource when used within a master page.  The RadComboBox is populated on initial load, but after making a selection, it loses the datasource.

My master page markup:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="Management.Web.Site1" %> 
 
<!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 runat="server">  
    <title></title>  
    <asp:ContentPlaceHolder ID="head" runat="server">  
    </asp:ContentPlaceHolder> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">  
        </asp:ContentPlaceHolder> 
    </div> 
    </form> 
</body> 
</html> 

My content page markup (WebForm1):

<%@ Page Title="" Language="C#" MasterPageFile="~/Site1.Master" AutoEventWireup="true" 
    CodeBehind="WebForm1.aspx.cs" Inherits="Management.Web.WebForm1" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">  
</asp:Content> 
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server" 
    ViewStateMode="Enabled">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">  
        <telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged">  
        </telerik:RadComboBox> 
    </telerik:RadAjaxPanel> 
</asp:Content> 

My non-master page markup (WebForm2):

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="Management.Web.WebForm2" %> 
 
<!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 runat="server">  
    <title></title>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">  
            <telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="RadComboBox1_SelectedIndexChanged">  
            </telerik:RadComboBox> 
        </telerik:RadAjaxPanel> 
    </div> 
    </form> 
</body> 
</html> 

My code behind (of both the content and non-master pages):

using System;  
using System.Web.UI;  
 
namespace Management.Web  
{  
    public partial class WebForm1 : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
            if (!Page.IsPostBack)  
                this.LoadTags();  
        }  
 
        private void LoadTags()  
        {  
            TagManager mgr = new TagManager();  
 
            RadComboBox1.DataSource = mgr.GetAllByModuleId(5);  
            RadComboBox1.DataValueField = "Id";  
            RadComboBox1.DataTextField = "Name";  
            RadComboBox1.DataBind();  
        }  
 
        protected void RadComboBox1_SelectedIndexChanged(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)  
        {  
 
        }  
    }  
} 

As you can see, the code is VERY basic.  The TagManager is a class that returns the data.

When using the Master Page (WebForm1), you lose the datasource after you make your first selection.  If you attempt to click on the drop down arrow, after making your initial selection, the RadComboBox is empty (doesn't even respond to the click).

When using the non Master Page (WebForm2), the datasource is persisted no matter how many times you make a selection in the RadComboBox.

Any thoughts why there is a difference when using a master page?

 

Yana
Telerik team
 answered on 14 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?