Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
179 views
hi, I have a simple Scheduler object. I would like make required the selection of resource in advances form edit for new appointment as the subject, can I do? I have found a trick to stop the execution server side using the  RadScheduler1_AppointmentInsert event, but not idea ho to show message.
Thanks

protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
       {
           //cerco l'agente selezionato
           Resource UserRes = e.Appointment.Resources.GetResourceByType("Agente");
           if (UserRes != null)
           {
              //DO BUSINESS
               Appointments.Add(new TrilanceScheduleBase(e.Appointment));
           }
           else
           {
               //STOP               
               
e.Cancel = true;
           }
       }


<telerik:RadScheduler runat="server" ID="RadScheduler1" 
                                        DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End"
                                        DayStartTime="07:00:00" DayEndTime="20:00:00" TimeZoneOffset="03:00:00" 
                                        OnAppointmentInsert="RadScheduler1_AppointmentInsert"
                                        OnAppointmentUpdate="RadScheduler1_AppointmentUpdate" 
                                        OnAppointmentDelete="RadScheduler1_AppointmentDelete"                                        
                                        DataRecurrenceField="RecurrenceRule" 
                                        DataRecurrenceParentKeyField="RecurrenceParentId" Height="100%" 
                                        onappointmentdatabound="RadScheduler1_AppointmentDataBound" 
                                        ondatabound="RadScheduler1_DataBound" Culture="Italian (Italy)" 
                                         EditFormTimeFormat="HH.mm" FirstDayOfWeek="Monday" HoursPanelTimeFormat="HH" 
                                         SelectedView="WeekView" StartInsertingInAdvancedForm="True" 
                                         onformcreating="RadScheduler1_FormCreating">
                                         <DayView DayEndTime="20:00:00" DayStartTime="07:00:00" 
                                             WorkDayEndTime="20:00:00" WorkDayStartTime="07:00:00" />
                                         <AdvancedForm Modal="true" TimeFormat="HH.mm" />
                                         <TimelineView UserSelectable="false" />
                                         <WeekView DayEndTime="20:00:00" DayStartTime="07:00:00" 
                                             WorkDayEndTime="07:00:00" WorkDayStartTime="20:00:00" />
                                         <TimeSlotContextMenuSettings EnableDefault="true" />
                                         <AppointmentContextMenuSettings EnableDefault="true" />                                        
                                     </telerik:RadScheduler>
Veronica
Telerik team
 answered on 22 Mar 2011
5 answers
239 views
Hi there.

My server is in California and my users are in New Zealand. Everything is being stored in the database as UTC. When I save a record it shows it as being saved 19 hours earlier.

Is there a simple way of detecting the users timezone through the browser adn adjusting the time and date appropriately?

Thanks
Chris
Maria Ilieva
Telerik team
 answered on 22 Mar 2011
2 answers
57 views
Hello
I have a problem regarding the functionality of the Control Grouping has RadGRID. I am using a collection to populate my RADGRID. items from my collection contains a property named 'OtherValues​​' which type Dictionary ... I want to build a GroupByExpression beyond the elements of my dictionary, more or less like
"OtherValues ​​['namePerson'] Group By OtherValues ​​['namePerson']" There is some syntax of how to do it? or is there another way?
Mira
Telerik team
 answered on 22 Mar 2011
2 answers
299 views
Hello,

I am currently trying to transfer RadListBox items from one control to another using programming code (Csharp).

Here is my setup:

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<div>
    <telerik:RadListBox ID="RadListBox1" OnLoad="RadListBox1_OnLoad" AllowTransfer="true" Height="400px" Width="300px" DataSourceID="SqlDataSource1" DataValueField="AmRepID" DataTextField="RepInfo" AllowTransferOnDoubleClick="true"
                        SelectionMode="Multiple" TransferMode="Move"
                        TransferToID="RepBoxSelected" runat="server">
    </telerik:RadListBox>
 
    <telerik:RadListBox ID="RepBoxSelected" Height="400px" Width="300px"
                        TransferToID="RadListBox1" runat="server">
    </telerik:RadListBox>
 
    <br />
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionString %>"
        SelectCommand="SELECT Statement Here"></asp:SqlDataSource>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text.RegularExpressions;
using Telerik.Web.UI;
 
public partial class reports_MassMail : System.Web.UI.Page
{
    protected void RadListBox1_OnLoad(object sender, EventArgs e)
    {
 
    }
    protected void Page_Load(object sender, EventArgs e)
    {
            RadListBoxItem founditem = RadListBox1.FindItemByText("CAMPUS - <Rep Name>");
            RadListBox1.Transfer(founditem, RadListBox1, RepBoxSelected);
    }
}

(Missing info in SqlDataSource was intentional).

Every time I run this, I get "Object Reference not set to an instance of an object." on the RadListBoxItem founditem line in the CSharp code.

What am I doing wrong?
Garrett
Top achievements
Rank 1
 answered on 22 Mar 2011
3 answers
101 views

Hello,

I have a page with a radcombobox in an asynchronous build raddock . This seems to work well, but if the page is ready there is no functionality to open the radcomboox, it seems that the javascript genareted for the control isn't there or does not work with the script manager in the page.

I've used the example of http://www.telerik.com/community/forums/aspnet-ajax/docking/load-docks-asynchronously.aspx#812207 

with the controls' RegisterWithScriptManager property set to "False" because the page itself has already a javascriptmanager.

Is there a way to get this working?

Thanks for your assistance,
Dennis.

Pero
Telerik team
 answered on 22 Mar 2011
1 answer
89 views
Hi Telerik,

I'm wondering, do you have a way to localize the label for the shortcut text?
For example, if I put CTRL+V as the shortcut on the Paste Plain Text button, "(CTRL+V)" shows up in the hover over text for the button. But in German, "CTRL" is supposed to be "STRG". Do you have a way to localize the label?

I can make the proper label appear like so:

Telerik.Web.UI.EditorTool tool_1 = redText.FindTool("PastePlainText");
tool_1.ShortCut = "STRG+V";

And it will change the label, but it no longer actually works as a shortcut. So, it looks like the editor is using the key as the both the key and the label.
Is there a way to set the label and the shortcut seperatly?

Thanks,
Diane.
Rumen
Telerik team
 answered on 22 Mar 2011
11 answers
156 views
Hello, 

I would like to use the editor spell checker in Hebrew, from were can i download the dictionary's that i need?
And were exactly put them?

Regards,

 Avner
Rumen
Telerik team
 answered on 22 Mar 2011
5 answers
685 views
hey,

I am using a radgrid which is empty consists grid item templates like-
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None"           OnItemDataBound="RadGrid1_ItemDataBound" OnItemCreated="RadGrid1_ItemCreated" OnColumnCreated="RadGrid1_ColumnCreated"AllowAutomaticInserts="true" OnNeedDataSource="RadGrid1_NeedDataSource" Skin="Office2007"AutoGenerateColumns="true">
                    <MasterTableView EditMode="InPlace" EnableNoRecordsTemplate="true" EnableViewState="true">
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
                        <ExpandCollapseColumn>
                            <HeaderStyle Width="20px" />
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridTemplateColumn HeaderText="Items" UniqueName="ItemColumn">
                                <ItemTemplate>
                                    <asp:Label ID="lblItemName" runat="server" />
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:DropDownList ID="ddlItems" runat="server" DataSourceID="SqlDataSource1" />
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Rate" UniqueName="RateColumn">
                                <ItemTemplate>
                                    <asp:Label ID="lblRate" runat="server" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Quantity" UniqueName="QuantityColumn">
                                <ItemTemplate>
                                    <asp:Label ID="lblQuantity" runat="server" />
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadTextBox ID="txtQuantity" runat="server" />
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridTemplateColumn HeaderText="Amount" UniqueName="AmountColumn">
                                <ItemTemplate>
                                    <asp:Label ID="lblAmount" runat="server" />
                                </ItemTemplate>
                            </telerik:GridTemplateColumn>
                            <telerik:GridButtonColumn HeaderText="Done" Text="Done" UniqueName="Donecolumn">
                            </telerik:GridButtonColumn>
                        </Columns>
                        <NoRecordsTemplate>
                            There isn't any data.</NoRecordsTemplate>
                    </MasterTableView>
                    <ClientSettings EnablePostBackOnRowClick="true" />
                </telerik:RadGrid>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ChalkHillConnectionString3 %>"
                    SelectCommand="SELECT [ProductName] FROM [tblProducts]"></asp:SqlDataSource>
C# is
protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //AddValuesToItemsDropdown();
                RadGrid1.Visible = true;
            }
        }
protected void ddlItems_SelectedIndexChanged(object sender, EventArgs e)
        {
            DropDownList ddlItems = (DropDownList)sender;
            GridEditFormItem editItem = (GridEditFormItem)ddlItems.NamingContainer;
            GridDataItem item = (GridDataItem)editItem.ParentItem; // access GridDataItem
            Label lblRate = (Label)item.FindControl("lblRate"); // access Label using DataItem
            if (ddlItems.SelectedIndex > 0)
            {
                DataSet ds = objSQLHelper.GetProductDetails("select * from tblProducts where Pid=" + ddlItems.SelectedValue);
                if (ds != null)
                {
                    lblRate.Text = ds.Tables[0].Rows[0]["Rate"].ToString();
                }
            }
        }
 
        protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if ((e.Item is GridEditFormItem) && (e.Item.IsInEditMode))
            {
                GridEditFormItem editform = (GridEditFormItem)e.Item;
                e.Item.Edit = true;
                DropDownList ddlItems = (DropDownList)editform.FindControl("ddlItems");
                ddlItems.DataSource = ds;
                ddlItems.DataTextField = "ProductName";
                ddlItems.DataValueField = "Pid";
                ddlItems.DataBind();
            }
        }
        private void RadGrid1_PreRender(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                foreach (GridItem item in RadGrid1.MasterTableView.Items)
                {
                    if (item is GridEditableItem)
                    {
                        GridEditableItem editableItem = item as GridDataItem;
                        editableItem.Edit = true;
                    }
                }
                RadGrid1.Rebind();
            }
        }
Why is Grid not visible on page load?....
Pavlina
Telerik team
 answered on 22 Mar 2011
1 answer
85 views
Hi
i use the RadScheduler in an new developed web application with customized control skins for the telerik rad controls by myself.
Now i will change the cell height in all views (week view, day view, etc) in css file. I'm looking for some entries in the control-css, but i have not found the right place...

 How can i do that?

I hope anybody can help.

thanks.

René
Princy
Top achievements
Rank 2
 answered on 22 Mar 2011
2 answers
122 views
Hi, I have a treeview as follows:
<telerik:RadTreeView ID="tvCC" Runat="server" CheckBoxes="True" 
        Skin="Vista" TriStateCheckBoxes="True" CheckChildNodes="True" BorderStyle="Solid"
        BorderColor="Black" BorderWidth="1"  Height="350px" Width="400px" >
</telerik:RadTreeView>          

In the code behind I disable a child node of a root node.
This prevents the user from checking or unchecking the specific node.
This is good. However, if I  uncheck or check the parent node the child still get's toggled even though it's disabled.
Anyway to prevent this client side?
Thanks ... Ed
Ed Staffin
Top achievements
Rank 1
 answered on 22 Mar 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?