Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
119 views
We are having a form section with a vertical scroll. We have placed a Rad Textbox at the top. We have noticed that when IE renders in IE 7.0 compatibility mode (default mode for Intranet sites), the textbox stays fixed when user scrolls.

I've pasted the sample code below:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="RadControlsWebApp1.WebForm2" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
    <style type="text/css">
        body
        {
            font-family: Arial, Helvetica, Sans-Serif;
            font-size: 11pt;
            color: Black;
        }
          
        div.MasterContainer
        {
            width: 600px;
            height: 400px;
            padding: 0px;
            margin: auto;
        }
          
        div.FormContainer
        {
            width: 95%;
            margin: 0px;
            padding: 0px;
            border-style: solid;
            border-width: 1px;
            border-color: Black;
            border-collapse: collapse;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.        
    </script>
    <div class="MasterContainer">
        <div style="width: 100%; height: 150px; overflow: auto;">
            <div class="FormContainer">
                <telerik:RadTextBox ID="txtTab2Title" runat="server" EmptyMessage="Enter Something Here"
                    Label="Enter:" Width="250px">
                </telerik:RadTextBox>
            </div>
            <div style="width: 95%; margin-top: 10px;">
                Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis
                egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet,
                ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
                Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra.
                Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean
                fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus
                lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent
                dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna
                eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor,
                facilisis luctus, metus
            </div>
        </div>
    </div>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    </form>
</body>
</html>

mosswgreentea
Top achievements
Rank 1
 answered on 20 Mar 2012
1 answer
76 views
I am trying to filter a GridDateTimeColumn that has the the DataFormatString = "{0:MM/dd/yyyy hh:mm tt}" and PickerType ="DatePicker"

The DataField = "ReferralDate" which is a Nullable<DateTime> property on my business object.

I would like to filter on date and simply ignore the time.  For example if the data in the grid contains:

3/11/2012 3:23 PM
1/4/2011 12:00 AM
3/11/2012 12:00 PM

Applying the filter "3/11/12" "EqualTo" will produce the following:

3/11/2012 3:23 PM
3/11/2012 12:00 PM

 I've been looking through the forums for a solution and found lots of posts related to GridDateTimeColumns and filtering which I'm finding to be either incomplete as far as a solution goes or not really applying to my specific need.  Any help/direction would be appreciated!
Jayesh Goyani
Top achievements
Rank 2
 answered on 20 Mar 2012
1 answer
64 views
Hello all,

Can someone point me to some examples of how to develop an online form capturing basic information of a user?

Ideally I would like to use all the Radcontrols and AJAX.

I am developing this to link in with a CRM system.

Thanks
Marin
Telerik team
 answered on 20 Mar 2012
1 answer
455 views
I've noticed after updating several sites to the newest hot fix version, and adjusting the Script Manager on the page to include the telerik's Jquery core Module. that $telerik is alot cleaner, easier to use and just generally better than the methods used in the tutorials and help files (eg. $find('Controlname');)

is there a reason we shouldn't be using the $telerik, are there situations where one shouldn't concisder this (like where Jquery isn't loaded or used) i'm at a loss for other situations where it's use would cuase issues.

I understand it takes time to update documentation. that's not really the point.

Slav
Telerik team
 answered on 20 Mar 2012
3 answers
200 views
hi

if user enter any url like www.google.com  in Radeditor it is getting anchor tag in html view.how to disable this one.

Thanks and Regards
Srikanth
<telerik:RadEditor ID="txtMessage" runat="server" Height="200px" Width="470px" Skin="Office2007"
                                                                    DialogHandlerUrl="Telerik.Web.UI.DialogHandler.axd" TabIndex="3" OnClientLoad="OnClientLoad"
                                                                    ContentFilters="MakeUrlsAbsolute,FixEnclosingP,IECleanAnchors "  >
                                                                    <RealFontSizes>
                                                                        <telerik:EditorRealFontSize Value="1pt" />
                                                                        <telerik:EditorRealFontSize Value="2pt" />
                                                                        <telerik:EditorRealFontSize Value="3pt" />
                                                                        <telerik:EditorRealFontSize Value="4pt" />
                                                                        <telerik:EditorRealFontSize Value="5pt" />
                                                                        <telerik:EditorRealFontSize Value="6pt" />
                                                                        <telerik:EditorRealFontSize Value="7pt" />
                                                                        <telerik:EditorRealFontSize Value="8pt" />
                                                                        <telerik:EditorRealFontSize Value="9pt" />
                                                                        <telerik:EditorRealFontSize Value="10pt" />
                                                                        <telerik:EditorRealFontSize Value="11pt" />
                                                                        <telerik:EditorRealFontSize Value="12pt" />
                                                                        <telerik:EditorRealFontSize Value="13pt" />
                                                                    </RealFontSizes>
                                                                    <Tools>
                                                                        <telerik:EditorToolGroup>
                                                                            <telerik:EditorTool Name="FindAndReplace" />
                                                                            <telerik:EditorSeparator />
                                                                            <telerik:EditorTool Name="Undo" />
                                                                            <telerik:EditorTool Name="Redo" />
                                                                            <telerik:EditorSeparator />
                                                                            <telerik:EditorTool Name="Cut" />
                                                                            <telerik:EditorTool Name="Copy" />
                                                                            <telerik:EditorTool Name="Paste" />
                                                                        </telerik:EditorToolGroup>
                                                                        <telerik:EditorToolGroup>
                                                                            <telerik:EditorTool Name="Bold" />
                                                                            <telerik:EditorTool Name="Italic" />
                                                                            <telerik:EditorTool Name="Underline" />
                                                                            <telerik:EditorSeparator />
                                                                            <telerik:EditorTool Name="ForeColor" />
                                                                            <telerik:EditorTool Name="BackColor" />
                                                                            <telerik:EditorSeparator />
                                                                            <telerik:EditorTool Name="FontName" />
                                                                            <telerik:EditorTool Name="RealFontSize" />
                                                                        </telerik:EditorToolGroup>
                                                                    </Tools>
                                                                   
                                                                </telerik:RadEditor>
Rumen
Telerik team
 answered on 20 Mar 2012
4 answers
100 views
I'm creating a line chart with multiple series created dynamically.

Here is the code.

For Each mdItem As ModalityTrendWrapper In ModalityTrend
            Dim newSeries As New Telerik.Charting.ChartSeries()
            newSeries.Name = mdItem.Modality
            newSeries.Type = ChartSeriesType.Line
             
            For Each dateCount As ModalityTrendItem In mdItem.DateCounts
                Dim chrItem As New ChartSeriesItem()
                chrItem.YValue = dateCount.Count
                chrItem.Name = dateCount.Modality
                chrItem.Label.TextBlock.Text = dateCount.Count
                chrItem.ActiveRegion.Tooltip =dateCount.Modality
                newSeries.Items.Add(chrItem)
            Next
 
 
            RadChart1.Series.Add(newSeries)
        Next
         
        Dim MaxValue As Integer = Enumerable.Range(0, CInt(ModalityTrend.Count)).Select(Function(ex) ModalityTrend(ex).DateCounts.Max(Function(dc) dc.Count)).Max()
        RadChart1.ClientSettings.XScale = DateList.Count / 7
        RadChart1.PlotArea.XAxis.AddRange(1, DateList.Count, 1)
        RadChart1.PlotArea.YAxis.MaxValue = MaxValue + 2
        For i As Integer = 0 To DateList.Count - 1
            RadChart1.PlotArea.XAxis(i).TextBlock.Text = DateList(i)
            RadChart1.PlotArea.XAxis(i).Appearance.Border.Visible = True
 
 
        Next


For some reason the tooltips just aren't showing up.  Is there anything that I'm missing?
Javier
Top achievements
Rank 1
 answered on 20 Mar 2012
1 answer
114 views
Dear All

I would like add a timer control to loop the different user control periodicity. I follow the Telerik Ajax Sample successful do that. In my user control, I have some Jquery/Javascripts would like to run. 

I try to add function pageLoad() in my user control, but still can't run. How can I do that? Thanks

default.aspx.vb
Protected Sub Timer1_Tick(sender As Object, e As System.EventArgs) Handles Timer1.Tick
        If LatestLoadedControlName = "uc1.ascx" Then
            Me.Timer1.Interval = 15000
            LoadUserControl("uc2.ascx")
        Else
            LoadUserControl("uc1.ascx")
        End If
End Sub

uc1.ascx
<script type="text/javascript">
    function pageLoad() {
        alert("test");
    }
</script>

Tsvetina
Telerik team
 answered on 20 Mar 2012
1 answer
135 views
Simple scenario: I want the edit form to appear above the column headers and I also want to hide the command item "row". I am not looking for a solution involving modals or placing the form outside of the radgrid.

Here's my code so far:

protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        RadGrid1.MasterTableView.IsItemInserted = true;
        RadGrid1.Rebind();
    }
 
    GridCommandItem commandItem = RadGrid1.MasterTableView.GetItems(GridItemType.CommandItem)[0] as GridCommandItem;
    commandItem.Visible = !RadGrid1.MasterTableView.IsItemInserted;
 
    if (!commandItem.Visible) // If edit form is open
    {
        GridEditFormItem editFormItem = RadGrid1.MasterTableView.GetItems(GridItemType.EditFormItem)[0] as GridEditFormItem;
 
        editFormItem.Parent.Controls.Remove(editFormItem);
        commandItem.Parent.Controls.AddAt(0, editFormItem);
    }
}

But during asynch postbacks all goes to hell: the edit form disappears.
Tsvetina
Telerik team
 answered on 20 Mar 2012
2 answers
287 views
We've implemented a custom server-side function which combines cropping and applying text to an image. Ultimately, our server side method saves a new version of the cropped image to the file system. We are attempting to re-render the saved, cropped image back into the ImageEditor. However, when the ImageEditor is updated after the server-side operation, the cropped image is skewed and seems to be stretched to the width and height of the original image.

I've observed that setting args.cancel = true in our server-side method causes the same behavior I've described above to occur.

What is the appropriate way to refresh/repaint the RadImageEditor after a server-side operation?

<asp:UpdatePanel ID="updtImagepanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <div style="height: 600px" id="designDiv" runat="server">
            <table>
                <tr>
                    <td>
                        <div style="height: 600px; width: 400px;">
                            <telerik:RadImageEditor ID="RadImageEditor" runat="server" StatusBarMode="Hidden"
                                Width="400px" Height="600px" OnImageEditing="Image1_ImageEditing" EnableResize="true">
                                <Tools>
                                    <telerik:ImageEditorToolGroup>
                                    </telerik:ImageEditorToolGroup>
                                </Tools>
                            </telerik:RadImageEditor>
                        </div>
                    </td>
    </ContentTemplate>
</asp:UpdatePanel>

Server-Side Code:

protected void Image1_ImageEditing(object sender, ImageEditorEditingEventArgs args){
            args.Cancel = true;
            string fileFolder = ConfigurationManager.AppSettings["Telerik_FileUpload"];
            string fileName = string.Empty;
 
            var commandArguments =
                (Dictionary<string, object>)args.ClientObjectsDictionary["commandArgument"];
 
            if (args.CommandName == "SaveImage")
            {
                EditableImage editableImage = args.Image;
                // Cropping Of an Image
                Rectangle cropRectangle = new Rectangle(
                    Convert.ToInt16(commandArguments["viewportX"]) - Convert.ToInt16(commandArguments["topX"]),
                    Convert.ToInt16(commandArguments["viewportY"]) - Convert.ToInt16(commandArguments["topY"]),
                    400,
                    600);
                     
                editableImage.Crop(cropRectangle);
 
                // Applying Title, Subtitle on Image
                //
                //Code to set variables for ApplyText method omitted for brevity
                //
                //Custom function to apply text to the cropped image
                Image newImage = ApplyText(titlePosition, subTitlePosition, authorNamePosition, title, subtitle, authorName, editableImage);
 
                newImage.Save(Path.Combine(fileFolder, fileName), ImageFormat.Jpeg);
 
                RadImageEditor.ImageUrl = //path to my image
 
                updtImagepanel.Update();
            }
        }

Dobromir
Telerik team
 answered on 20 Mar 2012
1 answer
103 views
I'm trying to handle AJAX calls differently in ASP.NET, depending on whether they are made by the end user or through my own code.

I'm using the Telerik RAD drop down and Telerik date picker control in my page.

Both have Client events that can be triggered and handled.

Are these client events only able to be triggered via user interaction?
Tsvetina
Telerik team
 answered on 20 Mar 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?