Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
70 views
I am working on a new project that requires items to be shown in the following manner:
1. The Rooms (resources) are shown on the left side of the page and used as the GroupBy attribute
2. The GroupingDirection attribute is set to Vertical
So far, so good
3. I need to show all 24 hours of the day in as little space as possible since the appointments will all be 8-16 hours in length. Basically, there is an AM appt, and a PM appt for each day.

How can I display this in the RadScheduler? I know I'll need to use a template, just need help setting it up.

UPDATE: Figured it out with MinutesPerRow attribute :)

Thanks,
Kevin
Kevin Price
Top achievements
Rank 1
 asked on 07 Dec 2010
9 answers
521 views

Hi,

I am following this link to implement RadTabStrip:

http://demos.telerik.com/ASPNET/Prometheus/TabStrip/Examples/Appearance/CustomCssClasses/DefaultCS.aspx

My problem is the following:

1. I want to align the text for the tabs in the center. At present, they are getting aligned to the left by default.

2. The enabled tab should have the text in black and the not-selected tab should have text in white.

Please let me know how is that possible.

Thanks.




Yana
Telerik team
 answered on 07 Dec 2010
2 answers
146 views

I currently upgraded to the 2010 Q3 ASP.NET AJAX controls from 2009.3.1314 and have encountered an issue which I did not previoulsy have. Basically, when the grid columns are created dynamically and a calculated column is included, the following exception is encountered in the ItemDataBoundEvent for the grid:

System.InvalidCastException
{"Unable to cast object of type 'DynamicClass1' to type 'DataXY'."}


The exception occurs in the ItemDataBound event when the DataItem is cast back to its original type. In my previous version, I was able to perform the cast. Provided is sample code that will reproduce the error.

 

 

 

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
  
  
using Telerik.Web.UI;
  
public partial class Default2 : System.Web.UI.Page
{
    RadGrid RadGridData;
  
  
    override protected void OnInit(EventArgs e)
    {
        // Call base init.               
        base.OnInit(e);
  
        InitializeGrid();
    }
  
    protected void Page_Load(object sender, EventArgs e)
    {
  
    }
      
    private void InitializeGrid()
    {        
        GridBoundColumn boundColumn;
          
        RadGridData = new RadGrid();
  
        // Set required event handlers.
        RadGridData.NeedDataSource += new GridNeedDataSourceEventHandler(RadGridData_NeedDataSource);
        RadGridData.ItemDataBound += new GridItemEventHandler(RadGridData_ItemDataBound);
          
  
        // Set grid properties.
        RadGridData.ID = "GridDataId";        
        RadGridData.AutoGenerateColumns = false;
  
        // Required for row highlighting.        
        RadGridData.ClientSettings.Selecting.AllowRowSelect = true;
  
        RadGridData.MasterTableView.AllowPaging = true;
        RadGridData.MasterTableView.PageSize = 8;
        RadGridData.MasterTableView.PagerStyle.Mode = GridPagerMode.NextPrev;
        RadGridData.MasterTableView.PagerStyle.Position = GridPagerPosition.Top;
  
        RadGridData.MasterTableView.Name = "GridData";
        RadGridData.MasterTableView.DataMember = "DataXY";
  
        // *** Grid columns. ***
  
        boundColumn = new GridBoundColumn();
        RadGridData.MasterTableView.Columns.Add(boundColumn);
        boundColumn.UniqueName = "XId";
        boundColumn.DataField = "X";
        boundColumn.HeaderText = "X";
  
        boundColumn = new GridBoundColumn();
        RadGridData.MasterTableView.Columns.Add(boundColumn);
        boundColumn.UniqueName = "YId";
        boundColumn.DataField = "Y";
        boundColumn.HeaderText = "Y";
  
  
        // *** Grid Calculated Column ***
        GridCalculatedColumn calculatedColumn = new GridCalculatedColumn();
        RadGridData.MasterTableView.Columns.Add(calculatedColumn);
        calculatedColumn.UniqueName = "CalculatedColumn1";
        calculatedColumn.DataFields = new string[] { "X", "Y" };
        calculatedColumn.Expression = "{0} + {1}";
        calculatedColumn.Visible = true;
        calculatedColumn.HeaderText = "X + Y";
         
        PlaceHolder1.Controls.Add(RadGridData);
    }
      
    void RadGridData_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
    {
        RadGridData.MasterTableView.DataSource = this.GetGridData();
    }
  
    void RadGridData_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (!(e.Item is GridDataItem))
            return;
  
        GridDataItem item = e.Item as GridDataItem;
  
        DataXY dataXY = (DataXY)item.DataItem;
    }
  
    private List<DataXY> GetGridData()
    {
        List<DataXY> list = new List<DataXY>();
  
        list.Add(new DataXY(1, 1));
        list.Add(new DataXY(2, 2));
        list.Add(new DataXY(3, 3));
        list.Add(new DataXY(4, 4));
        list.Add(new DataXY(5, 5));
        list.Add(new DataXY(6, 6));
        list.Add(new DataXY(7, 7));
  
        return list;
    }
  
  
    private class DataXY
    {
        public DataXY()
        {
        }
  
        public DataXY(int x, int y)
        {
            this.X = x;
            this.Y = y;
        }
  
  
        public int X
        {
            get;
            set;
        }
  
        public int Y
        {
            get;
            set;
        }        
    }
}


Any help in resolving this issue would be greatly appreciated.


Thanks,

Tony

tlp
Top achievements
Rank 1
 answered on 07 Dec 2010
1 answer
268 views
Hello Everybody. This is my first post in this site. I hope that I get a response as I am under tremendous pressure to finish this task. I am using Telerik Web.UI_2010_3_1109 along with ASP.net & VS 2008. I have attached two files. The page which I am designing has to look like in image homepage_payroll.jpg and it currently looks like the one in image  paroll_current.jpg. I am using

RadTabStrip and RadMultiPage. I am creating the tab pages dynamically. Please find below the css file which I have used to style the tab pages.

 

 


I have also attached an image of my VS solution explorer which shows the list of Tab Strip skins I have. I am totally confused and unable to design the tab strip & pages as per the requirement. It would be great if any one can help me on this.

.CSS File

 

.RadTabStrip_Green .rtsLI,
.RadTabStrip_Green .rtsLink
{
 color: black;
 font: 12px/26px "Segoe UI", Arial, sans-serif;
 
  
}

.RadTabStrip_Green .rtsLI.rtsLast { color:blue; }

.RadTabStripLeft_Green .rtsSeparator,
.RadTabStripRight_Green .rtsSeparator
{
 background: #F7DBEF;
}

/* <disabled tabs> */
.RadTabStrip_Green .rtsDisabled
.RadTabStripLeft_Green .rtsDisabled,
.RadTabStripRight_Green .rtsDisabled,
.RadTabStripBottom_Green .rtsDisabled,
.RadTabStrip_Green_disabled .rtsDisabled
{
color: #bcb;
cursor: default;
}
/* </disabled tabs> */

/* <scrolling arrows> */
.RadTabStrip_Green .rtsNextArrow,
.RadTabStrip_Green .rtsPrevArrow,
.RadTabStrip_Green .rtsPrevArrowDisabled,
.RadTabStrip_Green .rtsNextArrowDisabled
{
 background-image: url('TabStrip/TabStripStates.png');
}
/* </scrolling arrows> */

/* <tab backgrounds> */

.RadTabStripTop_Green .rtsLevel
{
     background-color: #D6D3D6;
     border-bottom-color:#F7DBEF;
     border-bottom-style:solid;
     border-bottom-width:1px;
}

.RadTabStripTop_Green .rtsLevel .rtsLink,
.RadTabStripTop_Green .rtsLevel .rtsOut,
.RadTabStripBottom_Green .rtsLevel .rtsLink,
.RadTabStripBottom_Green .rtsLevel .rtsOut,
.RadTabStripTop_Green_Baseline .rtsLevel,
.RadTabStripBottom_Green_Baseline .rtsLevel { background-image: url('TabStrip/TabStripStates.png'); }

.RadTabStripLeft_Green .rtsLink,
.RadTabStripRight_Green .rtsLink { background-image: url('TabStrip/TabStripStates.png'); }

.RadTabStripLeft_Green .rtsLast .rtsLink,
.RadTabStripRight_Green .rtsLast .rtsLink
{
 border-bottom: 1px solid red;
}

/* </tab backgrounds> */

/* <background positioning: overlapping tabs> */

/* <orientation: top> */

.RadTabStripTop_Green .rtsLink
{
    background: #D6D3D6;
    /*background-position: 0 -52px;*/
}
/*.RadTabStripTop_Green .rtsFirst .rtsLink { background-position: 0 0; }*/
.RadTabStripTop_Green .rtsOut { background-position: 100% -52px; }
/*.RadTabStripTop_Green .rtsLast .rtsOut { background-position: 100% 0; }*/

.RadTabStripTop_Green .rtsLI .rtsSelected { background-position: 0 -26px;}
.RadTabStripTop_Green .rtsSelected { background: #F7DBEF url('TabStrip/TabStripStates.png') no-repeat 0 -272px; }
.RadTabStripTop_Green .rtsSelected .rtsOut { background: #F7DBEF url('TabStrip/TabStripVStates_rtl.jpg') no-repeat 100% -72px; }
.RadTabStripTop_Green .rtsFirst .rtsSelected { background: #F7DBEF url('TabStrip/TabStripVStates.png') no-repeat 0 -180px; }
.RadTabStripTop_Green .rtsLI .rtsAfter { background-position: 0 -78px; }
.RadTabStripTop_Green .rtsLast .rtsSelected { background: #F7DBEF url('TabStrip/TabStripVStates.png') no-repeat 100% -180px; }
.RadTabStripTop_Green .rtsLast .rtsSelected .rtsOut { background: #F7DBEF url('TabStrip/TabStripVStates.png') no-repeat 0 -72px; }
.RadTabStripTop_Green_Baseline .rtsLevel { background-position: 0 100%; background-repeat: repeat-x; }

/* </orientation: top> */

/* <orientation: bottom> */

.RadTabStripBottom_Green .rtsLevel .rtsLink { background-position: 0 -130px;}
.RadTabStripBottom_Green .rtsLevel .rtsFirst .rtsLink { background-position: 0 -182px;}
.RadTabStripBottom_Green .rtsLevel .rtsOut { background-position: 100% -130px;}
.RadTabStripBottom_Green .rtsLevel .rtsLast .rtsOut { background-position: 100% -182px;}

.RadTabStripBottom_Green .rtsLevel .rtsLI .rtsSelected { background-position: 0 -156px;}
.RadTabStripBottom_Green .rtsLevel .rtsSelected .rtsOut { background-position: 100% -104px; }
.RadTabStripBottom_Green .rtsLevel .rtsLI .rtsAfter { background-position: 0 -104px;}

.RadTabStripBottom_Green .rtsLevel .rtsLast .rtsSelected .rtsOut { background-position: 100% -156px;}

.RadTabStripBottom_Green_Baseline .rtsLevel { background-position: 0 -599px; background-repeat: repeat-x;}

/* </orientation: bottom> */

/* <orientation: right> */

.RadTabStripRight_Green .rtsUL .rtsLink,
.RadTabStripRight_Green .rtsUL .rtsLI .rtsDisabled:hover { background-position: 100% 0; text-align: left;}
.RadTabStripRight_Green .rtsUL .rtsLink:hover { background-position: 100% -200px;}
.RadTabStripRight_Green .rtsUL .rtsSelected,
.RadTabStripRight_Green .rtsUL .rtsSelected:hover { background-position: 100% -400px;}

/* </orientation: right> */

/* <orientation: top (RTL)> */

.RadTabStripTop_Green_rtl .rtsLevel .rtsLink
{
 padding-left: 0;
 padding-right: 9px;
 
}

.RadTabStripTop_Green_rtl .rtsLevel .rtsOut
{
 padding-left: 9px;
 padding-right: 0;
 
}

.RadTabStripTop_Green_rtl .rtsLevel .rtsLink,
.RadTabStripTop_Green_rtl .rtsLevel .rtsOut
{
     background-image: url('TabStrip/TabStripStates.png');
       
}

.RadTabStripTop_Green_rtl .rtsLevel .rtsLink { background-position: 100% -52px;}
.RadTabStripTop_Green_rtl .rtsLevel .rtsFirst .rtsLink { background-position: 100% 0;}
.RadTabStripTop_Green_rtl .rtsLevel .rtsOut { background-position: 0 -52px;}
.RadTabStripTop_Green_rtl .rtsLevel .rtsLast .rtsOut { background-position: 0 0;}

.RadTabStripTop_Green_rtl .rtsLevel .rtsLI .rtsSelected { background-position: 100% -26px;}
.RadTabStripTop_Green_rtl .rtsLevel .rtsSelected .rtsOut { background-position: 0 -78px;}
.RadTabStripTop_Green_rtl .rtsLevel .rtsLI .rtsAfter { background-position: 100% -78px;}

 

.RadTabStripTop_Green_rtl .rtsLevel .rtsLast .rtsSelected .rtsOut { background-position: 0 -26px; }

/* </orientation: top (RTL)> */

/* </background positioning: overlapping tabs> */

/* <simplistic sub-item styles> */

.RadTabStrip_Green_SimpleSubItems .rtsLevel2,
.RadTabStrip_Green_SimpleSubItems .rtsLevel3,
.RadTabStrip_Green_SimpleSubItems .rtsLevel4 { background: #fff; }

.RadTabStrip_Green_SimpleSubItems .rtsLevel2 .rtsSelected,
.RadTabStrip_Green_SimpleSubItems .rtsLevel3 .rtsSelected,
.RadTabStrip_Green_SimpleSubItems .rtsLevel4 .rtsSelected
{
 text-decoration: underline;
}

.RadTabStrip_Green_SimpleSubItems .rtsLevel2 .rtsLink,
.RadTabStrip_Green_SimpleSubItems .rtsLevel2 .rtsOut,
.RadTabStrip_Green_SimpleSubItems .rtsLevel2 .rtsIn,
.RadTabStrip_Green_SimpleSubItems .rtsLevel3 .rtsLink,
.RadTabStrip_Green_SimpleSubItems .rtsLevel3 .rtsOut,
.RadTabStrip_Green_SimpleSubItems .rtsLevel3 .rtsIn,
.RadTabStrip_Green_SimpleSubItems .rtsLevel4 .rtsLink,
.RadTabStrip_Green_SimpleSubItems .rtsLevel4 .rtsOut,
.RadTabStrip_Green_SimpleSubItems .rtsLevel4 .rtsIn
{
 background: #F7DBEF;
}
.RadTabStrip_Green .rtsIn
{
font: 12px/20px arial,sans-serif;
padding: 0 5px 5px;
font-weight:bold;
/*background:#F7DBEF;*/
}
/* </simplistic sub-item styles> */


Thanks & Best Regards,
Bharath

 

 

 

 

Kamen Bundev
Telerik team
 answered on 07 Dec 2010
4 answers
68 views
Hello,

I'm on a small intranet website, and on my server I have a shared directory. But apparently I can't access it with every browser. Let me explain you.

So I access my directory without any problem with windows explorer. I just do: \\10.199.137.90\Affaires\ And it's perfect.

In my website, I have:
<a ID="lnkToClick" runat="server" target="_blank"> quality of the case file </ a>
and
protected void Page_Load (object sender, EventArgs e)
{
    lnkToClick.HRef = @ "\\\\10.199.137.90\Affaires\";
}


And it works on IE6, IE7, IE8, IE9. Yes, when I click on the link it launch my windows explorer and target the good directory.

But this doesn't work with Firefox, Google Chrome... etc etc... I have an error.

Do you have any ideas?

Thank you very much :))

Jean-Yves
Jean-Yves
Top achievements
Rank 1
 answered on 07 Dec 2010
1 answer
202 views
Hi,

I am using Master/Content page in my system. The content page is aspx which calls user control.
The user control creates the dynamic template column and binds to the grid. There is a asp link button called "log" in one of the columns in the grid and when I click the button, it inserts record into the db and disables the link button, so that user can not click the button again. I got the log button disabled but the grid is not refreshing the updated data.
I have used AjaxManagerproxy in my ascx. I call the binding of the grid inside gridview_NeedDataSource.

The following code is in Page_PreRender.

if (IsPostBack)
{
if (Session["isLog"] != null && Session["isLog"].ToString() == "true")
{
//gridview.DataSource = new string[] { };
//gridview.DataSource = null;
this.BindGrid();
//gridview.Rebind();
Session["isLog"] = "";
}

The grid binds the data twice when I tried clearing the grid by using "gridview.DataSource = null;", just before binding the grid.

The grid does not display any data if I use "gridview.DataSource = new string[] { };" just before binding the grid.

Can you please help me in fixing the Refresh inside the grid?

Thanks!
Veli
Telerik team
 answered on 07 Dec 2010
1 answer
46 views
Hi,

I generate a line graph. I do not define the series' color. When the series appears it has a color (presumably just assigned a default/random). I would like to have my series' pointmark be this color.

I tried:

series.Appearance.PointMark.FillStyle.MainColor = series.Appearance.LineSeriesAppearance.Color;

This does not work because the color is still define as ARGB 0,0,0 at the time of PageLoad.

How would I fix this issue?

Evgeni "Zammy" Petrov
Telerik team
 answered on 07 Dec 2010
6 answers
262 views
hello


i am using the radnumeric textbox with spin buttons and dynamic Increment Steps depending on previous user input.
during testing i discovered the following wrong behaviour:

Value of the Textbox set on server: 50
Increment Step: 0.127
after clicking 3 times (numbers vary) the value in the textbox is wrong because it decrements by 0.128.
so it shows the value 49.618 (=50-(2*0.127)-0.128) instead of 49.619 (=50-(3*0.127))
this seems to occur for prime numbers after 0. for example 0.127 or  0.05
when the user then sends the values my custom validations on the server reject the value.

i checked the javascript code for the textbox and as a temporary solution i set the "KeepNotRoundedValue" to true.
the value in the textbox is then wrong but sending and saving to server works. the value is then changed to the correct value.
this auto correct after sending will confuse some users so i need a clean solution.

another question regarding the spin button:
is it possible to customize the behaviour? in my use case i only allow specific values for example:
the value in the textbox is 98 and the step value is set to 5. valid values are 93,88, and so on.
if the user now enters 95 and then uses the decrement spin button it changes the value to 90 which is not allowed.
i would like to set the next valid number when using the spin button or better have some auto-rounding to the next valid number when the value is changed
Radoslav
Telerik team
 answered on 07 Dec 2010
3 answers
159 views
Is there a clean, modular way to do this?

For example, the following code is dangerous because it may erase any existing function that is attached to OnRequestStart:

RadAjaxManager.GetCurrent(Page).ClientEvents.OnRequestStart = "DoSomething";
Maria Ilieva
Telerik team
 answered on 07 Dec 2010
1 answer
131 views
Hi freinds,
I am using radalert in codebehind for displaying message and after desplaying message am calling another javascript function to retun to the parent page.
following is my code.

private

 

bool UpdateCounter()

 

{

 

 

    string radalerts = "<script language='javascript'>function save(){radalert('Counter Saved Succesfully!', 330, 210); Sys.Application.remove_load(save);};     Sys.Application.add_load(save);</script>";

 

Page.ClientScript.RegisterStartupScript(

 

this.GetType(), "radalert", radalerts);
return true;

 

}

 

if

 

 

(UpdateCounter())

 

{

hdnChange.Value =

 

"Y";

 

ClearControl();

Page.RegisterStartupScript(

 

"myScript", "<script language=JavaScript>returnToParent();</script>");

 

}

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> 
<script type="text/javascript"> 
function returnToParent() { 
var oArg = new Object(); 
var oWnd = GetRadWindow(); 
oArg.IsChange = $get(
"<%=hdnChange.ClientID%>").value;

 

 

oWnd.close(oArg);

}

 

 

</script>

 

 

 

</telerik:RadCodeBlock>

but my radalert not displaying any message its just close the popup window and return to parent window without showing any radalert.

What is the wrong with above.
please help
Thanks in advance.
Manoj Gupta

 

 

 

 

Georgi Tunev
Telerik team
 answered on 07 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?