Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
119 views

I can’t figure out why I’m having trouble centering dates.  Everything else about the radcalendar is working wonderfully for me.  I can change the date font, bolding, italicizing, etc. I just can’t move the date to the middle top of the cell.  I’m using i.e. 7 as my target browser because that’s what our company build is.  Also I’m using RadControls for ASPNET AJAX Q1 2009 with VS 2008 and the .Net 3.5 framework.  Finally, this is happening on three separate computers.

 

Thanks for any thoughts, Winston

<%

@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_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">

 

<

 

html xmlns="http://www.w3.org/1999/xhtml">

 

<

 

head runat="server">

 

 

<title>Untitled Page</title>

 

</

 

head>

 

<

 

body>

 

 

<form id="form1" style="width:100%; height:100%" runat="server">

 

 

<div>

 

 

</div>

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

 

 

</telerik:RadScriptManager>

 

 

<telerik:RadCalendar ID="RadCalendar1" Runat="server" AutoPostBack="True"

 

 

font-names="Arial,Verdana,Tahoma"

 

 

ShowOtherMonthsDays="False" ShowRowHeaders="False"

 

 

UseColumnHeadersAsSelectors="False"

 

 

UseRowHeadersAsSelectors="False" CalendarTableStyle-Height="500PX" CalendarTableStyle-Width="734PX"

 

 

EnableMultiSelect="False"

 

 

SelectedDate="" ViewSelectorText="x" CellAlign="Center"

 

 

CellVAlign="Top" BorderStyle="Double"

 

 

Skin="Telerik">

 

<

 

DayStyle HorizontalAlign="Center" VerticalAlign="Bottom" Font-Bold="True"

 

 

Font-Italic="True">

 

 

</DayStyle>

 

 

<SelectedDayStyle HorizontalAlign="Center" />

 

 

<DayOverStyle HorizontalAlign="Center" VerticalAlign="Bottom" />

 

 

</telerik:RadCalendar>

 

 

</form>

 

</

 

body>

 

</

 

html>

 

Winston Ware
Top achievements
Rank 1
 answered on 10 Jun 2009
1 answer
110 views
I was wondering if anybody has succesfully taken the Rotator Weather Example:
http://demos.telerik.com/aspnet-ajax/rotator/examples/forecast/defaultvb.aspx

And been able to change the datasource to an external weather datasource such as:
http://api.wxbug.net/getForecastRSS.aspx?ACode=A5781482896&zipcode=56395&unittype=0 

Are any of the Telerik Controls RSS capable without a lot of coding?
Fiko
Telerik team
 answered on 10 Jun 2009
3 answers
121 views
Hi

I want to dynamatically create the rad schedular with appointment template.
How can i do this?

Radschedular RadScheduler1=new radschedular();

DataTable

 

dt = new DataTable();

 

 

DataColumn dcol=new DataColumn("FieldID",typeof(Int32));

 

dt.Columns.Add(dcol);

dcol =

new DataColumn("Subject");

 

dt.Columns.Add(dcol);

dcol =

new DataColumn("StartTime");

 

dt.Columns.Add(dcol);

dcol =

new DataColumn("EndTime");

 

dt.Columns.Add(dcol);

 

DataRow drow = dt.NewRow();

 

drow[

"FieldID"]=1;

 

drow[

"Subject"]="Test";

 

drow[

"StartTime"] = "05-01-2009 9AM";

 

drow[

"EndTime"] = "05-03-2009 11AM";

 

dt.Rows.Add(drow);

RadScheduler1.DataSource = dt;

RadScheduler1.DataKeyField =

"FieldID";

 

RadScheduler1.DataSubjectField =

"Subject";

 

RadScheduler1.DataStartField =

"StartTime";

 

RadScheduler1.DataEndField =

"EndTime";

 

RadScheduler1.DataBind();

panel1.Controls.Add(RadScheduler1);

I want to give export option for each appointment.
So i want to give a image right hand side of appointment when the user click on the export image it will export to icalender.
i want to duplicate this link below, but my control is dynamic control.
http://demos.telerik.com/aspnet-ajax/scheduler/examples/export/defaultcs.aspx
how can i acheive this functionality

Regards
Vairamuthu


Regards
Vairam
Peter
Telerik team
 answered on 10 Jun 2009
3 answers
127 views
I have a formview insert with several required field validators.  Below that I have a radgrid with edit and updates enabled.  On update of the grid, how do I prevent the required fields in my formview from validating and preventing the update?  Appreciate any help!
COURTNEY LYNCH
Top achievements
Rank 1
 answered on 10 Jun 2009
1 answer
63 views
I am looking for a way to run server-side code at the moment an appointment is occurring (at the appointments start date and start time) and to pass our custom parameters that we added to an appointment previously.

Is there such an event? What would be the accurate implementation?

vtn
Peter
Telerik team
 answered on 10 Jun 2009
2 answers
146 views

I have a rad panel bar Working from a sample. I Added in some javascript to make it move down the side of a page as the user scrolls.

The behavior is - I click an image to open the panelbar and click it again to close the panelbar.

How Can I make this panelbar collapse as soon as someone mouses off of it, like in Visual Studio instead of clicking the button again ?



    <div id="divTopLeft" style="float: left; outline: 0; position: Absolute;" > 
        <asp:Image runat="server" ID="tbimage" ImageUrl="images/Navigation-open.jpg"  Style="float: left;  
            outline: 0; position: Absolute;" /> 
    </div> 
 
    <script type="text/javascript">  
        var ns = (navigator.appName.indexOf("Netscape") != -1);  
        var d = document;  
        function JSFX_FloatDiv(id, sx, sy) {  
            var el = d.getElementById ? d.getElementById(id) : d.all ? d.all[id] : d.layers[id];  
            var px = document.layers ? "" : "px";  
            window[id + "_obj"] = el;  
            if (d.layers) elel.style = el;  
            elel.cx = el.sx = sx; elel.cy = el.sy = sy;  
            el.sP = function(x, y) { this.style.left = x + px; this.style.top = y + px; };  
 
            el.floatIt = function() {  
                var pX, pY;  
                pX = (this.sx >= 0) ? 0 : ns ? innerWidth :  
        document.documentElement && document.documentElement.clientWidth ?  
        document.documentElement.clientWidth : document.body.clientWidth;  
                pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ?  
        document.documentElement.scrollTop : document.body.scrollTop;  
                if (this.sy < 0)  
                    pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ?  
        document.documentElement.clientHeight : document.body.clientHeight;  
                this.cx += (pX + this.sx - this.cx) / 8; this.cy += (pY + this.sy - this.cy) / 8;  
                this.sP(this.cx, this.cy);  
                setTimeout(this.id + "_obj.floatIt()", 10);  
            }  
            return el;  
        }  
        JSFX_FloatDiv("divTopLeft", 0, 0).floatIt();  
 
    </script> 
      
 
 
 
 
      
 
    <div id="menucontainer" class="leftPanelBarContainer">  
        <div id="slidingDiv" style="visibility: hidden;" > 
            <telerik:RadPanelBar runat="server" Width="155" ID="RadPanelBar1" ExpandMode="FullExpandedItem" 
              ><Items>  
                 <telerik:RadPanelItem Expanded="True" Text="" BorderWidth="0"  > 
                        <ItemTemplate> 
                            <uc2:MyNavigation ID="MyNavigation3" runat="server"  ></uc2:MyNavigation> 
                        </ItemTemplate> 
                    </telerik:RadPanelItem> 
                </Items> 
             
            </telerik:RadPanelBar> 
        </div> 
    </div> 
 
 
   
 
 
    <script language="javascript" type="text/javascript">  
 
        var panelDomElement = $get('<%=RadPanelBar1.ClientID %>');  
        var timage = $get('<%= tbimage.ClientID %>');  
 
        if (panelDomElement) {  
            SetUpAnimation(timage.id, Telerik.Web.UI.jSlideDirection.Right, panelDomElement);  
        }  
 
        function SetUpAnimation(image, direction, element) {  
            element.style.position = "relative";  
            var slider = document.getElementById(image);  
 
            var expanded = false;  
 
            var expandAnimation = new Telerik.Web.UI.AnimationSettings({});  
            var collapseAnimation = new Telerik.Web.UI.AnimationSettings({});  
 
            var slide = new Telerik.Web.UI.jSlide(element, expandAnimation, collapseAnimation, false);  
 
            slide.initialize();  
 
            slide.set_direction(direction);  
 
            slider.onclick = function() {  
 
 
              
                element.parentNode.style.visibility = "visible";  
                element.parentNode.style.display = "block";  
 
                JSFX_FloatDiv("menucontainer", 20, 0).floatIt();  
 
                if (!expanded) {  
                    slide.expand();  
                    document.aspnetForm.ctl00_tbimage.src = 'images/Navigation-close.jpg';  
                }  
                else {  
                    slide.collapse();  
                    document.aspnetForm.ctl00_tbimage.src = 'images/Navigation-open.jpg';  
                }  
                expanded = !expanded;  
                return false;  
            }  
 
 
 
 
              
              
        }  
    </script> 
      
 
David
Top achievements
Rank 1
 answered on 10 Jun 2009
2 answers
74 views
Before I upgraded to the this quarters release, my child tabs just displayed text and icons using the default css (which is what I wanted) but now all the child items have tabs which is ugly looking.

Is there any way to get rid of them?

Thanks,
Joe
Joe
Top achievements
Rank 2
 answered on 10 Jun 2009
1 answer
93 views
I have a bar chart that I want the Labels on the x axis to display a name not a count. Currently the x axis labels are just a count of 1,2,3,4. Here is the markup and the code behind :

<asp:SqlDataSource ID="SqlDataSource1" runat="server"  
                            ConnectionString="<%$ ConnectionStrings:tp %>"  
                            SelectCommand="tsp_PortalChart_Get"  
                    SelectCommandType="StoredProcedure"
                    <SelectParameters> 
                        <asp:CookieParameter CookieName="PortalAccountNumber" DefaultValue=""  
                                    Name="AccountNumber" Type="Int32" /> 
                    </SelectParameters> 
                </asp:SqlDataSource> 
<telerik:RadChart ID="RadChart1" runat="server"  
    Title="Account Summary" OnItemDataBound="RadChart1_ItemDataBound"  
    DataSourceID="SqlDataSource1"  
    ChartTitle-TextBlock-Appearance-TextProperties-Font="Verdana, 10pt"  
    Width="370px" Height="254px"
 
    <Appearance> 
        <Border Visible="False" /> 
    </Appearance> 
 
<ChartTitle> 
<TextBlock Text="Account Summary"
<Appearance TextProperties-Font="Verdana, 10pt"></Appearance> 
</TextBlock> 
</ChartTitle> 
 
                    <Legend Appearance-ItemTextAppearance-TextProperties-Font="Verdana, 8pt"
<Appearance> 
<ItemTextAppearance TextProperties-Font="Verdana, 8pt"></ItemTextAppearance> 
</Appearance> 
                    </Legend> 
                   <Series> 
                    <cc1:ChartSeries Name="Series 1" Type="Bar" DataYColumn="Count"
                    <Appearance LegendDisplayMode="ItemLabels" ></Appearance
                    </cc1:ChartSeries> 
                    </Series> 
                     </telerik:RadChart> 

Code Behind
Partial Class UserControls_AccountSummaryChart 
    Inherits System.Web.UI.UserControl 
 
    Protected Sub RadChart1_ItemDataBound(ByVal sender As ObjectByVal e As ChartItemDataBoundEventArgs) 
        e.SeriesItem.Name = CType(e.DataItem, DataRowView)("Name").ToString() 
    End Sub 
 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
 
        RadChart1.Skin = Application("TelerikTheme"
        RadChart1.ChartTitle.TextBlock.Text = Application("CompanyName").ToString 
        RadChart1.Chart.Appearance.FillStyle.MainColor = Color.Transparent 
        If Not IsPostBack Then 
 
            RadChart1.DataSourceID = "SqlDataSource1" 
            RadChart1.DataBind() 
            RadChart1.Series(0).Name = "Type" 
 
            Dim barColors As Color() = New Color(4) {Color.Purple, Color.SteelBlue, Color.Green, Color.Yellow, Color.Crimson} 
            Dim i As Integer = 0 
            For Each item As ChartSeriesItem In RadChart1.Series(0).Items 
                item.Appearance.FillStyle.MainColor = barColors(System.Math.Max(System.Threading.Interlocked.Increment(i), i - 1)) 
            Next 
        End If 
 
 
 
 
 
    End Sub 
End Class 


Thanks!
Sam



Sam
Top achievements
Rank 1
 answered on 10 Jun 2009
1 answer
76 views
Hi , Please help me to implement the combo box . I cant find a proper example for combo box . I did all steps described in the live demos and as soos as I add OnClientSelectedIndexChanging="LoadCities" or   OnClientItemsRequested="ItemsLoaded" I get "Microsoft JScript runtime error: Object doesn't support this property or method " What is the problem ?
Princy
Top achievements
Rank 2
 answered on 10 Jun 2009
3 answers
212 views
I have an requirement of selecting the first item/row of the RadGrid selected on client side. I have used following code snippet:--

var masterTable = $find("<%=RadGrid1.ClientID%>").get_masterTableView();
var dataItem
= masterTable.get_dataItems()[0];
dataItem.set_selected(true);

But somehow it is not working. Do i need to set some property of the RadGrid. I am getting the follwoing java script error:--

this._owner._owner._selection is null

Can any one help me?
Suneco
Top achievements
Rank 2
 answered on 10 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?