Telerik Forums
UI for ASP.NET AJAX Forum
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
66 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
209 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
90 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
3 answers
131 views
hello,
how to Access NoRecordsTemplate control Using Javascript/jquery?
Jayesh Goyani
Top achievements
Rank 2
 answered on 04 Sep 2012
5 answers
633 views

Hi

I have a RadComboBox with a EmptyMessage and want to clear the content, I've tried:

cboSearchGenre.Text = null;
cboSearchGenre.clearSelection();
and
cboSearchGenre.Text = "";
cboSearchGenre.clearSelection();
and
cboSearchGenre.set_text(cboSearchGenre.get_emptyMessage());
cboSearchGenre.clearSelection();

But I always get a empty ComboBox without the EmptyMessage or in the last example I get a ComboBox with the EmptyMessage as Text content not empty, how can I clear the CombBox and get the EmptyMessage from Client Side?

/Keivan

 

 

Krishna Chaitanya
Top achievements
Rank 1
 answered on 04 Sep 2012
8 answers
326 views
I am using RadSplitter on my master page for layout. My layout is similar to layout in THIS demo. Thea only difference is that I have one extra pane at the bottom for footer. So, my master page layout would be something like this:
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<head runat="server">
    <title>FullWindow</title>
    <style type="text/css">
    html, body, form
    {
        height: 100%;
        margin: 0px;
        padding: 0px;
        overflow: hidden;
    }
    </style>
     <asp:ContentPlaceHolder ID="HeadContent" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form2" runat="server">
        <asp:ScriptManager ID="ScriptManager" runat="server" />
        <div id="ParentDivElement" style="height: 100%;">
            <telerik:RadSplitter ID="MainSplitter" runat="server" Height="100%" Width="100%"
                Orientation="Horizontal" Skin="Outlook">
                <telerik:RadPane ID="TopPane" runat="server" Height="100" MinHeight="85" MaxHeight="150"
                    Scrolling="none">
                    <!-- Place the content of the pane here -->
                </telerik:RadPane>
                <telerik:RadSplitBar ID="RadsplitbarTop" runat="server" CollapseMode="Forward" />
                <telerik:RadPane ID="MainPane" runat="server" Scrolling="none" MinWidth="500">
                    <telerik:RadSplitter ID="NestedSplitter" runat="server" Skin="Outlook" LiveResize="true">
                        <telerik:RadPane ID="LeftPane" runat="server" Width="200" MinWidth="150" MaxWidth="400">
                            <!-- Place the content of the pane here -->
                        </telerik:RadPane>
                        <telerik:RadSplitBar ID="VerticalSplitBar" runat="server" CollapseMode="Forward" />
                        <telerik:RadPane ID="ContentPane" runat="server">
                            <asp:ContentPlaceHolder ID="MainContent" runat="server" />
                        </telerik:RadPane>
                                    <telerik:RadPane ID="FooterPane" CssClass="footer" Height="35px" runat="server">
                                       My footer © 2012. All rights reserved.
                                  </telerik:RadPane>
                    </telerik:RadSplitter>
                </telerik:RadPane>
            </telerik:RadSplitter>
        </div>
    </form>
</body>
</html>


I want NestedSplitter to resize according to ContentPane height, with no vertical scroll bar within ContentPane. I've also found THIS article describing how to accomplish that but I keep getting some JavaScript error: "undefined" is null or not an object. Could you please help me?

asimptota
Top achievements
Rank 1
 answered on 04 Sep 2012
3 answers
138 views
Hello,
we are using RadEditor in SharePoint 2010.
If we put the below tags:

<figure class="freestyl
e left">
       <img src="/csvstories-cookingcaravan.jpg"/>
       <figcaption class="caption">
               Caption Arial Regular 11px #666666<br />
               Image format: Landscape 300 x 180 px
       </figcaption>
</figure>

RadEditor will remove it the final tags and we are not able to use it.
Is there some specific configuration we are missing?

thanks

manuel

Rumen
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
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
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?