Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
212 views
Hello , I would like to use 'Toggle states in RADToolBar (ex. Play/Pause buttons).
Can you please help me implement it.

Thanks and Regards,
Vaneeth
Vaneeth
Top achievements
Rank 1
 answered on 04 Sep 2012
3 answers
191 views
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Menu.aspx.cs" Inherits="MyTelerikSamples.Menu" %>
 
<!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">
    <div>
 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
 
    <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Outlook" Width="190px">
       <Items>
           <telerik:RadPanelItem runat="server" Text="Root Panel Item" Expanded="true" Selected="true">
               <Items>
                   <telerik:RadPanelItem runat="server" Value="templateHolder">
                   </telerik:RadPanelItem>
               </Items>
           </telerik:RadPanelItem>
       </Items>
       <CollapseAnimation Duration="100" Type="None" />
       <ExpandAnimation Duration="100" Type="None" />
   </telerik:RadPanelBar>
     
    </div>
    </form>
</body>
</html>

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;
 
namespace MyTelerikSamples
{
    public partial class Menu : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                RadPanelItem panelItem = (RadPanelItem)RadPanelBar1.FindItemByValue("templateHolder");
                RadMenu myMenu = new RadMenu();
                      myMenu.Width = Unit.Percentage(100);   
                myMenu.Skin = "Outlook";
                myMenu.Flow = ItemFlow.Vertical;
                RadMenuItem MainItem = new RadMenuItem("Main Item");
                RadMenuItem Child1 = new RadMenuItem("Child 1");
                Child1.Width = Unit.Percentage(100);
                RadMenuItem Child2 = new RadMenuItem("Child 2");
                Child2.Width = Unit.Percentage(100);

                MainItem.Items.Add(Child1);
                MainItem.Items.Add(Child2);

                myMenu.Items.Add(MainItem);
                panelItem.Controls.Add(myMenu);
            }
        }
    }
}
I tried this solution given in the below link. Which did not work.
http://www.telerik.com/help/aspnet-ajax/radpanelbar-dynamically-created-radmenu.html

Unable to see the menu on top of RadPanelBar1 and only able to see only 1 submenu item "Child 1" if i donot set myMenu.Width to 100%. 
I donot want to increase the height of the panel as I have some other items to be shown  below myMenu.
Please help me.
Helen
Telerik team
 answered on 04 Sep 2012
9 answers
191 views
If the telerik static CDN is not available, will it fallback to pulling the CSS from my server?  If not, is it feasible for you to add that feature?  Even though it is not likely that the Amazon CDN would not be available, you can never completely rely on cloud services, as seen from the recent Azure downtime.  I would appreciate your thoughts on this one.
Peter Filipov
Telerik team
 answered on 04 Sep 2012
7 answers
142 views
In radeditor i have activated Find and replace functionallity, but it have strange behavior. 

For example:
1) in radeditor i have text : jan jan jan
2) i pres replace all text alike "jan" with 1
3) it works

an other example

1) in radeditor i have text : jan jan jan
2) i pres replace all text alike "jan" with jan1 
3) whole IE window freeze, and i need to stop it in process window


i thought it was smething to do with numbers, but i tryed replace "jan" with "abcdefg" and it make it freeze too. 


Any suggestions? 

Rumen
Telerik team
 answered on 04 Sep 2012
5 answers
191 views
Hi,

I was trying to add RadControls into my ASP.NET MVC Page but failed.  Finally, I was found the reason is that when ViewPage applying any MasterPage.  The page will always get "Validation of viewstate MAC failed" error after PostBack.  See below:

--- 

Server Error in '/' Application.

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

Source Error:

Line 113:            // Tracing requires Page IDs to be unique.
Line 114:            ID = Guid.NewGuid().ToString();
Line 115: ProcessRequest(HttpContext.Current);Line 116:        }
Line 117:

Source File: D:\Projects\TEST\SystemWebMvc\Mvc\ViewPage.cs    Line: 115 

---

I was tried to do any possible modification but still can't solve this problem.

Does anyone know how to overcome this situation?

Thanks.
Tsvetina
Telerik team
 answered on 04 Sep 2012
3 answers
67 views
Hi.
My first question is about Master-Details grid:
I've created a hirarchial grid where the details table is a many-to-many junction talbe (i.e - master is custumers, details is customerToProduct) and all the details have is a single dropdown column with the name of the detail.

My problem is that if I set the AutoGenerateEditColumn to True, I also get an Edit column in the details grid, that I don't want.
My question is How can I set the edit column only for the master table?


My second question is about validation. I used the code examples provided by telerik to add a RequiredFieldValidator to a textBox column, and with a little t & e managed to adapt it also to Numeric columns and DateTime columns.
Now I have 3 methods, each for every column type mentioned about (text, numeric, and datetime).
My problem with that is that all of these 3 methods have almost the exact same code, except for the editor part - see attached snippet:

If (TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode) Then
        Dim item As GridEditableItem = CType(e.Item, GridEditableItem)
        Dim editor As GridTextBoxColumnEditor = CType(item.EditManager.GetColumnEditor("ContactName"), GridTextBoxColumnEditor) 
        Dim cell As TableCell = CType(editor.TextBoxControl.Parent, TableCell)
        Dim validator As RequiredFieldValidator = New RequiredFieldValidator
       
editor.TextBoxControl.ID = "ID_for_validation"
        validator.ControlToValidate = editor.TextBoxControl.ID

        validator.ErrorMessage = "*"
        cell.Controls.Add(validator)
    End If

for Numeric column I use Dim editor As GridNumericColumnEditor = CType(item.EditManager.GetColumnEditor(ColumnUniqueName), GridNumericColumnEditor)
and for DateTime column I use Dim editor As GridDateTimeColumnEditor = CType(item.EditManager.GetColumnEditor(ColumnUniqueName), GridDateTimeColumnEditor)

My question is how can I use a single method to attach a required field validator to all kinds of built-in columns of the grid?
zoharp
Top achievements
Rank 1
 answered on 04 Sep 2012
1 answer
88 views

I use rad scheduler, and I translated the labels of the appointment  to Hebrew.
How can I change the position of the controls so that  the start date  will be before the end date (right to left)
?


thank you
Ivana
Telerik team
 answered on 04 Sep 2012
0 answers
77 views
I'm looking for a gauge with multiple concentric circles, each circle showing values of different entities. Something like this...(see attachment)

Here each needle shows value of corresponding entity. I saw some gauges in jQuery & Ajax. So I was wondering if I could find something like this.
Alekhine68
Top achievements
Rank 1
 asked on 04 Sep 2012
4 answers
210 views
Hi all,

 I am new to telerik controls, I am having two RadDatePickers(FromRadDatePicker and ToRadDatePicker) and a TextBox(TotalTextBox).I want the Number of days from the Two raddatepickers to the Textbox. I am getting it by using this below code
TimeSpan ts = ToRadDatePicker.SelectedDate.Value.Subtract(FromRadDatePicker.SelectedDate.Value);
           TotalTextBox.Text = ts.Days.ToString();
I also want subtracting the saturdays and sundays and custom holiday list if any.

For Example:-

FromRadDatePicker  31-Aug-2012
ToRadDatePiker     05-Sep-2012

The TotalTextBox Should be 2( 1 and 2-Sep is saturday, sunday and 4-sep is a custom created festival Holiday)

How to create Custom Created Holiday List, and Subtracting the Saturday and Sunday?

Any one Please help me out.
Princy
Top achievements
Rank 2
 answered on 04 Sep 2012
1 answer
91 views
With the GridSettingsPersister class, I can save the group by expression and it works great.

In addition, I have a situation where the user wants to save the collapse state of some of the groups. Is this possible?

For example, the user will:

1. Group the list by 'project status'
2. Collapse specific groups (i.e. Pending, Cancelled)
3. Go into the details screen (i.e. another page so I store the gird settings here)
4. Go back to the list (where I need to restore the grid settings)

At step 4, all the specific groups that have been collapse are now back to their un-collapsed state.

Thoughts?

Thanks,

Loy.
Marin
Telerik team
 answered on 04 Sep 2012
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?