Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
100 views
Hy

I´ve create an application page using some RadControls. But the RadDateTimePicker is not working within the ApplicationPage. The Date and Time Dialogs do not pop up. I´ve used them in WebParts and they worked fine there, it seems to have something to do with the ApplicationPage.

Furthermore, if I use the Applicationpage within a ModalDialog (which I prefer to use) it is completely unusable. If I click on the Button for either Date or Time, a kind of Postback leaves the whole Modaldialog and reloads the page (only the page itself, even without the sharepointmasterpage).

Marin
Telerik team
 answered on 22 Jun 2011
8 answers
429 views

Two issues with RadChart legend position alignment (using RadControls for ASP.NET AJAX 2008.3.1314):

  1. Documentation suggests that "CenterRight" and "CenterLeft" are valid values for Legend.Appearance.Position.AlignedPostion; they are not. I'm assuming the correct values for the same positioning as shown in the image are "Right" and "Left".
  2. Setting AlignedPostion=Right results in the same positioning as AlignedPosition=TopRight. AlignedPosition=Right does not actually position the legend at the center-right as expected (instead it is actually positioned at the top-right); however, AlignedPosition=Left does position the legend at the center-left as expected.

    I'm setting Position-AlignedPosition declaratively in the markup:
    <Legend> 
        <Appearance Dimensions-Margins="15%, 2%, 1px, 1px" 
            Dimensions-Paddings="2px, 8px, 6px, 3px" Position-AlignedPosition="Right">  
            <ItemTextAppearance TextProperties-Color="Black">  
            </ItemTextAppearance> 
            <ItemMarkerAppearance Figure="Square">  
            </ItemMarkerAppearance> 
        </Appearance> 
    </Legend> 
     

 Here's the entire RadChart:

<telerik:RadChart ID="RadChart1" runat="server" SeriesOrientation="Vertical" Skin="Office2007" 
    DataSourceID="SqlDsRepairCosts" Width="800px">  
    <Series> 
        <telerik:ChartSeries DataYColumn="LABOR_OWL" DefaultLabelValue="#Y{c0}" Name="OWL Labor">  
        </telerik:ChartSeries> 
        <telerik:ChartSeries DataYColumn="LABOR_SFW" DefaultLabelValue="#Y{c0}" Name="SFW Labor">  
        </telerik:ChartSeries> 
        <telerik:ChartSeries DataYColumn="MATERIAL_COSTS" DefaultLabelValue="#Y{c0}" Name="Material Costs">  
        </telerik:ChartSeries> 
        <telerik:ChartSeries DataYColumn="TOTAL_ALLOCATED_SUPPORT_COSTS" DefaultLabelValue="#Y{c0}" 
            Name="Allocated Support Costs">  
        </telerik:ChartSeries> 
    </Series> 
    <PlotArea> 
        <XAxis Visible="False">  
            <Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134">  
                <MajorGridLines Color="134, 134, 134" Width="0" /> 
                <TextAppearance TextProperties-Color="Black">  
                </TextAppearance> 
            </Appearance> 
            <AxisLabel> 
                <Appearance RotationAngle="270">  
                </Appearance> 
                <TextBlock> 
                    <Appearance TextProperties-Color="Black">  
                    </Appearance> 
                </TextBlock> 
            </AxisLabel> 
        </XAxis> 
        <YAxis> 
            <Appearance Color="134, 134, 134" MajorTick-Color="134, 134, 134" MinorTick-Color="134, 134, 134" 
                CustomFormat="$#,##0">  
                <MajorGridLines Color="134, 134, 134" /> 
                <MinorGridLines Color="134, 134, 134" /> 
                <TextAppearance TextProperties-Color="Black">  
                </TextAppearance> 
            </Appearance> 
            <AxisLabel> 
                <Appearance RotationAngle="0">  
                </Appearance> 
                <TextBlock> 
                    <Appearance TextProperties-Color="Black">  
                    </Appearance> 
                </TextBlock> 
            </AxisLabel> 
        </YAxis> 
        <YAxis2> 
            <AxisLabel> 
                <Appearance RotationAngle="0">  
                </Appearance> 
            </AxisLabel> 
        </YAxis2> 
        <Appearance> 
            <FillStyle FillType="Solid" MainColor="">  
            </FillStyle> 
        </Appearance> 
    </PlotArea> 
    <Appearance> 
        <Border Color="134, 134, 134" /> 
    </Appearance> 
    <ChartTitle Appearance-Position-AlignedPosition="Top">  
        <Appearance> 
            <FillStyle MainColor="">  
            </FillStyle> 
        </Appearance> 
        <TextBlock Text="Repair Costs Breakdown">  
            <Appearance TextProperties-Color="Black" TextProperties-Font="Arial, 18px">  
            </Appearance> 
        </TextBlock> 
    </ChartTitle> 
    <Legend> 
        <Appearance Dimensions-Margins="15%, 2%, 1px, 1px" 
            Dimensions-Paddings="2px, 8px, 6px, 3px" Position-AlignedPosition="Right">  
            <ItemTextAppearance TextProperties-Color="Black">  
            </ItemTextAppearance> 
            <ItemMarkerAppearance Figure="Square">  
            </ItemMarkerAppearance> 
        </Appearance> 
    </Legend> 
</telerik:RadChart>

Am I doing something wrong?
Jimmy
Top achievements
Rank 1
 answered on 22 Jun 2011
12 answers
666 views
Problem 1:
I can't find funtion for validate MaxFileSize in Radupload.

Problem 2:
I have a funtion:

function validateRadUpload2(source, arguments) {
        arguments.IsValid = getRadUpload('<%= RadUpload2.ClientID %>').validateExtensions();
    }

But RadUpload2 in  RadGrid -> EditFormSettings -> FormTemplate.
How to get RadUpload2.ClientID ?


Please help me!
Thanks a lots!
Regards,
Peter Filipov
Telerik team
 answered on 22 Jun 2011
5 answers
614 views
Hi,
I was wondering how I can change the text of a field in the grid based on it's value.In my scenario I have a Date field, but when its value is less than a predefined date I want to display an empty cell rather than the value.
Is this possible?
Thanks for any pointers!
Viktor Takacs
Top achievements
Rank 2
 answered on 22 Jun 2011
1 answer
85 views
Hi,

I need to rebind the TabStrip after postback.
In my case, the contents of the tabstrip changes after the page postbacks.

Am getting exception when i do this 

protected void Page_Load(object sender, EventArgs e)
{    
    if (!IsPostBack)
    {
        BindTabStrip();
    }
    else
    {               
           BindTabStrip();
    }
}


Am not getting exception when i do this, but i dont get the updated TabStrip:
protected void Page_Load(object sender, EventArgs e)
{
    db = (DataLib_oracle)Session["db_lib"];
    if (!IsPostBack)
    {
        BindTabStrip();
    }
    else
    {               
        RadTabStrip1.DataSource = ds;
        RadTabStrip1.DataBind();
    }
}

Let me know if there is better way to do the rebinding of tabstrip on page postback.

Following is the code for BindTabStrip()
private void BindTabStrip()
{
     DataSet ds = getDataSet();    
 
    RadTabStrip1.DataFieldID = "web_form_id";
    RadTabStrip1.DataTextField = "FORM_NAME";
    RadTabStrip1.DataSource = ds;
    RadTabStrip1.DataBind();
}

Thanks,
Mani
Veronica
Telerik team
 answered on 22 Jun 2011
2 answers
128 views
Hi,

I have a grid which has the DataSource property set to a collection of objects.
In the grid I have several textboxes bound to properties of the objects in the collection:

<telerik:RadTextBox ID="rtbKPIComments" Runat="server" Height="60px"
                      TextMode="MultiLine" Width="100%" Text='<%# Bind("ResultsExample") %>'>
</telerik:RadTextBox>

The textbox displays the value in the property, but the reverse binding (from control to property) doesn't work. The value in the control is correct, but it is not copied in the property.

What am I doing wrong?

Thanks!
Maria Ilieva
Telerik team
 answered on 22 Jun 2011
1 answer
114 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
195 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
81 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
87 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
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?