Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views
Hello,

Im new in ASP.Net and Im not a Native Programmer.
Im using Web Developer 2010 (C#) with Framework 3.5 and the Latest Demo from telerik rad_controls.

I have got 2 Problems.

1) All Images should be Resized to Fixed Size of X * Y (no matter where or when).
I found this Article btu I dont know where and how to implement Code in Code Behind (the second method)
http://www.telerik.com/help/aspnet-ajax/upload-how-to-resizing-images.html

2) I need the names of the Images + I must to rename them (add some number) in Variable to be able to safe the image name in Database

Current Scenario (Code Behind-very Short Version) :

onPageLoad
div a. Visible // collect Data from TextBox A
div b. InVisible
div c. InVisible
div d. InVisible

onButton_Click_NEXT1
div a. InVisible
div b. Visible // collect Data from TextBox B
div c. InVisible
div d. InVisible

onButton_Click_NEXT2
div a. InVisible
div b. InVisible
div c. Visible // UpLoad Images with RAD_ASYNC_UPLOAD and ReName and Resize on myFixed Size
div d. InVisible

onButton_Click_NEXT3
div a. InVisible
div b. In Visible
div c. InVisible
div d. Visible// collect Data from TextBox C

onButton_Click_INSERT
Insert data from TextBox A, B, C, and the ImageNames in to Database

Any Help on this problem?

Thanks,
Richard
Peter Filipov
Telerik team
 answered on 22 Jun 2011
7 answers
185 views
I have noticed, when I transfer items, the item that is above the first transferred item gets selected and highlighted after the transfer. In my scenario, the first item in my left listbox is as "Add New Item" option which pops up a dialog and allows the user to add new items to the list. If the list starts out with two items (the "Add New Item" option and a real item), and the user transfers the real item, then when the transfer is done, the first item is selected automatically.. thus opening the dialog. How do I prevent the first item from getting selected after later items are transferred?

I already handle the SelectedIndexChanging event in order to create the dialog opening funcitonality. So, I want the dialog to open when the User clicks on the Add New item.. but, this item should never be automatically selected because the item(s) below it were transferred. 

function HandleCampaignItemSelecting_SE(sender, eventArgs) {
                var value = eventArgs.get_item().get_value();
  
                if (value == 'AddNew') {
                    // open dialog
                    eventArgs.set_cancel(true);
                }
            }
Peter Filipov
Telerik team
 answered on 22 Jun 2011
3 answers
74 views
Hi!

I have an web from which is pretty much your 'Resource availability' demo but with StartInsertingInAdvancedForm="true" and                 StartEditingInAdvancedForm="true". When you open the 'Create appointment' dialog you can change anything except the time of the appointment. You can expand it but the items are semitransparent and not clickable. Is this intended behavior? Why? What´s the work around to enable the time picker?

Thanx
Veronica
Telerik team
 answered on 22 Jun 2011
3 answers
85 views
Hello,

I have encountered the following problems with the RadSlider and RadAjaxLoadingPanel:

- After a update takes place initiated by a timer event, the RadSlider will not work in IE8 anymore, before the update it will slide without any problems. After the update I can't use the drag handle anymore, clicking in the Slider will make the slider move but it will return to the original positiion almost immediately..
I noticed that this problem only occurs with IE at around 80-90% of the time (sometimes I can use the slider without any problems) FireFox and Opera don't have any issues.

- When I use the loadingpanel in the RadAjaxManager, the panel doesn't seem to go away after the loading is done. The panel seems to continue to stay on top. Again this problem is only in IE, Firefox/Opera don't have any problems.

I have uploaded a demo project to rapidshare.

If you are not able to use the provided solution, I've added the source code files for the project below:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SliderAjaxUpdate._Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:Timer ID="GraphStartTimer" runat="server" Interval="10" OnTick="GraphStart_Tick">
    </asp:Timer>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="GraphStartTimer">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlTruck" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="sliderPeriod">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="pnlTruck" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="LoadingPanel1" runat="server">
        <asp:Label ID="Label2" runat="server" ForeColor="Red">Loading... </asp:Label>
    </telerik:RadAjaxLoadingPanel>
    <asp:Panel ID="pnlTruck" runat="server">
        <asp:Label ID="lblCurrentDate" runat="server"></asp:Label>
        <telerik:RadSlider ID="sliderPeriod" runat="server" Width="765px" ShowDecreaseHandle="false"
            ShowIncreaseHandle="false" ItemType="Tick" OnValueChanged="SliderPeriodValueChanged"
            AutoPostBack="True">
        </telerik:RadSlider>
    </asp:Panel>
    </form>
</body>
</html>

using System;
using System.Threading;
 
namespace SliderAjaxUpdate
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void GraphStart_Tick(object sender, EventArgs e)
        {
            // First Time Loading...
            GraphStartTimer.Enabled = false;
            Thread.Sleep(5000);
            LoadPeriodData(DateTime.Now.Date.AddDays(-1), DateTime.Now);
        }
 
        private void LoadPeriodData(DateTime dtStart, DateTime dtEnd)
        {
            //first set slider max and min
            sliderPeriod.MinimumValue = Convert.ToDecimal(dtStart.ToOADate()) * 24 * 60;
            sliderPeriod.MaximumValue = Convert.ToDecimal(dtEnd.ToOADate()) * 24 * 60;
            sliderPeriod.Value = sliderPeriod.MinimumValue;
            ShowStatus();
        }
 
        protected void SliderPeriodValueChanged(object sender, EventArgs e)
        {
            ShowStatus();
        }
 
        private void ShowStatus()
        {
            //set hint to datetime           
            DateTime row = DateTime.FromOADate(Convert.ToDouble(sliderPeriod.Value) / (24 * 60));
            sliderPeriod.Value = Convert.ToDecimal(row.ToOADate()) * 24 * 60;
            lblCurrentDate.Text = sliderPeriod.DragText = row.ToString("dd-MM-yyyy HH:mm");
        }
 
    }
}
Slav
Telerik team
 answered on 22 Jun 2011
13 answers
208 views
I am using the advanced template for inserting and editing an appointment.  I have created all my custom attributes where some the fields are populated from the appointment record and the others are populated only when inserting/editing an appointment such as default point of contact information.

Everything works correctly except for one condition when I edit the series of an existing recurring appointment.  All other cases (create a new appointment, edit a non-recurring appointment and edit a single occurrence of a recurring appointment) function as expected.  The problem I am having is that when I choose to edit series of an appointment, all my custom attributes that are not part of the appointment during the AppointmentDataBound event are blank.  I have verified through the debugger that they are getting set in the OnFormCreating event just like in all the other scheduler appointment edit conditions.  Also, when I look at the value being passed to the custom attribute property of the advanced form, it is blank.

Now, what is also very perplexing is that I can get it to work under a unique circumstance.  For example, if I am in month view and I click on the appointment of the very first day of the recurring event and choose to edit the series, my expected data for the custom attributes are set correctly.  Then when I click on any of the other days in which that recurring event is happening, the custom attributes are still correct.  But when I refresh the page and click on any of the recurring event days other than the very first one, it will not work and my custom attributes are blank.  But, then, click on the very first day and all the custom attributes will be correct again.

Ed Lamprecht
Veronica
Telerik team
 answered on 22 Jun 2011
10 answers
267 views
I would like to dynamically set the labelstep value based on how many Yaxis and Xaxis values might be on the chart.  The number of X and Y labels can vary depending on user inputs.  On the x-axis we might be looking at monthly values across a year (12 labels) or hourly vlaues across 3 days (72 labels).  There are many other possibilites.  The Y Laebls can also vary in range.

I am using the DataBind method, so I am not adding the X and Y values manually.

I need a way of find out out how many labels are present on each axis so I can dymanically set the labelstep value.  For Example, if there are 12 x-axis labels then I want the labelstep for the X axis to be 1.  If there are 300 then I want it to be 300/30 (or whatever).

It seems like this must be easy, but I am missing something.

Thanks,

Mike
Ves
Telerik team
 answered on 22 Jun 2011
1 answer
121 views
I have a RadMenu being populated from a database, and the menu items are variable based on user security.  I'd like each menu to have a "Home" item that is aligned to the left, and I'd like the remaining databound items to be aligned to the right.  Is there any way to accomplish this?
Princy
Top achievements
Rank 2
 answered on 22 Jun 2011
1 answer
59 views
Hello ,Telerik
   In my project, Some kinds of Images are made through computing,such bar chart ,pie chart ,etc.
 And I write a silverlight application that plays these images one by one.
  How to save the chart image  automatically or every some time?
hope your reply.
Ves
Telerik team
 answered on 22 Jun 2011
1 answer
260 views
Hi,

Does anyone know of an option for integating google calendar with RadScheduler. For instance, have a rad schedular displaying Google Calendar feed automatically or being able to writes events back to Google Calendar by using Google Calendar API?

Thanks,
OM
Plamen
Telerik team
 answered on 22 Jun 2011
2 answers
128 views
Hi,
Why performance of rad grid goes down dramatically when it has to display more than 50 rows. Scroll bar gets stuck.
Please suggest solution to improve performance as this has been acritical issue for this project.

Also i had requirement of having "All" as PageSize ComboBox item to display all items at one time in grid. So i customized the "

PageSizeComboBox" as follows:

 Protected Sub grid_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grid.ItemCreated

        If TypeOf (e.Item) Is GridPagerItem Then
            Dim pageBoundItem As GridPagerItem = DirectCast(e.Item, GridPagerItem)
            Dim PageSizeComboBox As RadComboBox = TryCast(pageBoundItem.FindControl("PageSizeComboBox"), RadComboBox)

            If PageSizeComboBox IsNot Nothing Then

        'Start **Page Size initialization
        Dim itemIndex As Integer = 0
        Dim minPageSize As Integer
        Dim maxPageSize As Integer
        Dim pageSizeStep As Integer
        Integer.TryParse(ConfigurationManager.AppSettings("MinPageSize").ToString(), minPageSize)
        Integer.TryParse(ConfigurationManager.AppSettings("MaxPageSize").ToString(), maxPageSize)
        Integer.TryParse(ConfigurationManager.AppSettings("PageSizeStep").ToString(), pageSizeStep)
        'End **Page Size initialization

        Dim ComboItem As RadComboBoxItem
        For iCount As Integer = minPageSize To maxPageSize Step pageSizeStep
            Dim newComboItem As RadComboBoxItem = PageSizeComboBox.Items.FindItemByValue(iCount)
            If newComboItem Is Nothing Then
                ComboItem = New RadComboBoxItem(iCount.ToString(), iCount.ToString())
                ComboItem.Attributes.Add("ownerTableViewId", gridClientId)
                PageSizeComboBox.Items.Insert(itemIndex, ComboItem)
            End If
            itemIndex += 1
        Next

        Dim newItem As RadComboBoxItem = PageSizeComboBox.Items.FindItemByValue(gridDataItemCount.ToString())
        If newItem Is Nothing Then
            ComboItem = New RadComboBoxItem("All", gridDataItemCount.ToString())
            ComboItem.Attributes.Add("ownerTableViewId", gridClientId)
            PageSizeComboBox.Items.Insert(PageSizeComboBox.Items.Count, ComboItem)
        Else
            newItem.Text = "All"
        End If

                AddHandler PageSizeComboBox.SelectedIndexChanged, AddressOf Me.PageSizeComboBox_SelectedIndexChanged
                PageSizeComboBox.AutoPostBack = True
            End If
          
        End If

    End Sub


Public Sub PageSizeComboBox_SelectedIndexChanged(ByVal sender As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs)

        Dim intPageSize As Integer

        Integer.TryParse(e.Value, intPageSize)
        ViewState("intPageSize") = intPageSize.ToString()

        grid.PageSize = ViewState("intPageSize")
        grid.Rebind()

    End Sub



 Protected Sub grid_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles grid.NeedDataSource
        If ViewState("gridData") IsNot Nothing Then
            grid.VirtualItemCount = CType(ViewState("gridData"), DataTable).Rows.Count
            grid.DataSource = CType(ViewState("gridData"), DataTable)
        Else
            grid.VirtualItemCount = 0
            grid.DataSource = Nothing
        End If
    End Sub
Abhishek
Top achievements
Rank 1
 answered on 22 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?