Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
653 views

Folks,

Using VS 2010 with RadControls for ASP.NET AJAX Q1 2012. I am using below link as Prototype.

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/validation/defaultcs.aspx

My question's are:
1) I would like to hide the EditColumn Insert/Update/Cancel Button image based on certain condition of a Grid Column Data.

Example:

- If RadGrid DataItem Units in Stock is > 25, then show EditColumn Insert/Update/Cancel Button image.
- If RadGrid DataItem Units in Stock is < 25, then Just show EditColumn Cancel Button image and change CancelText ="Exit"

Attached is my screen printout.

2) Is it possible to hide Child Table Command item Template based on a Grid Dataitem column value of Parent Item? Ex: using Northwind Customer Table, if Customer Id = 'ALFKI', hide Command Item Template of its Child Table, if Customer Id is <> 'ALFKI', show Command Item Template of its Child Table.

Thanks a lot for help

GC_0620
Shinu
Top achievements
Rank 2
 answered on 28 May 2012
1 answer
854 views
Hi,
I have a master page with both ScriptManager and AjaxManager on it.The code block is as follows:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="900"
        EnablePageMethods="true">
        <Groups>
            <telerik:ScriptReferenceGroup>
            <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" />
                <asp:ScriptReference Path="~/Charts/updatepanelhook.fusioncharts.js" />
            </Scripts>
            </telerik:ScriptReferenceGroup>
        </Groups>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>

VS2010 gives the message ScriptReference is not a known element.  When I change from Source to Design view, I receive the message stating Error Creating Control RadScriptManager1.  Failed to create designer.  Telerik.Web.UI.RadScriptManager etc.

How can I remedy these two issues?

Thanks,
Sid
Genady Sergeev
Telerik team
 answered on 28 May 2012
3 answers
128 views
Hi,
some pages have a title. The title is shown in a div.
The problem is the div is not a Telerik control, so you have to manually manage the change of skin.
My question is:
What can I use Telerik controls to make these headers? (so the style would normally managed by skinmanager)
(I tried radtoolbar radmenu but you see that are clickable)


Thanks in advance
Kate
Telerik team
 answered on 28 May 2012
5 answers
256 views
I'm displaying a relatively simple chart plotting time of the xaxis and counts on the yaxis. the chart displays fine, but I simply cannot get the xaxis labels to display as time values! I've tried all the suggestions I could find in the forums with no luck.
Here is my aspx file:
<%@ Page Title="Tickets Received by Time of Day" Language="VB" AutoEventWireup="false" CodeFile="TixByTime.aspx.vb" Inherits="Statistics_Misc_TixByTime" MasterPageFile="~/MasterPage.master" %>
 
<%@ MasterType VirtualPath="~/MasterPage.master" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Charting" TagPrefix="telerik" %>
<asp:Content ID="cpHeadContent" ContentPlaceHolderID="mpHeadContent" runat="server">
</asp:Content>
<asp:Content ID="cpSideMenuContent" ContentPlaceHolderID="mpSideMenuContent" runat="server">
</asp:Content>
<asp:Content ID="cpMainContent" ContentPlaceHolderID="mpMainContent" runat="server">
    <telerik:RadChart ID="rcChart2" runat="server" Height="500px" Width="900px" Skin="WebBlue">
    </telerik:RadChart>
</asp:Content>

And here is my codebehind:
Imports Workforce
Imports System.Data
Imports Telerik.Charting
Imports System.Data.SqlClient
 
Partial Class Statistics_Misc_TixByTIme
    Inherits System.Web.UI.Page
 
    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        SetupChart()
        LoadData()
    End Sub
 
    Private Sub SetupChart()
        Dim dStart As Double = DateTime.Today.ToOADate()
        Dim dEnd As Double = DateTime.Today.AddDays(1).ToOADate()
        Dim dHourStep As Double = (1 / 24)
        With rcChart2
            .ChartTitle.TextBlock.Text = "Tickets Received by Time of Day"
            .SeriesOrientation = ChartSeriesOrientation.Vertical
            With .PlotArea.XAxis
                .AutoScale = False
                .IsZeroBased = False
                .LayoutMode = Styles.ChartAxisLayoutMode.Inside
                .AddRange(dStart, dEnd, dHourStep)
                .Appearance.MajorGridLines.Visible = False
                .Appearance.ValueFormat = Styles.ChartValueFormat.ShortTime
                .Appearance.CustomFormat = "hh:mm tt"
                .Appearance.LabelAppearance.RotationAngle = 90
                .Appearance.LabelAppearance.Position.AlignedPosition = Styles.AlignedPositions.Top
            End With
            With .PlotArea.YAxis
                .Step = 1
            End With
            Dim oSeries As New ChartSeries()
            With oSeries
                .Name = "TicketCounts2"
                .Type = ChartSeriesType.Area
                .Appearance.ShowLabels = False
            End With
            .Series.Add(oSeries)
        End With
    End Sub
 
    Private Sub LoadData()
        Dim oSeries As ChartSeries = rcChart2.Series(0)
 
        Dim oConn As SqlConnection = Nothing
        Dim oReader As SqlDataReader = Nothing
        Dim oCmd As SqlCommand = New SqlCommand()
        Dim sSQL As String
        Try
            Dim sConn As String = Profile.Company.ConnectionString
            oConn = New SqlConnection(sConn)
            oConn.Open()
 
            sSQL = <sql>
                SELECT Substring(Convert(nchar(8),recvdatetime,8), 1, 5) AS daTime
                        ,Count(*) AS daCount
                    FROM cwtg..tix4tbl
                    group by substring(convert(nchar(8),recvdatetime,8), 1, 5)
                    order by daTime
            </sql>.Value
            oCmd.CommandText = sSQL
            oCmd.Connection = oConn
            oReader = oCmd.ExecuteReader()
            Do While oReader.Read
                Dim dTime As Double = DateTime.Parse(oReader.GetString(oReader.GetOrdinal("daTime"))).ToOADate()
                Dim dCount As Double = oReader.GetInt32(oReader.GetOrdinal("daCount"))
                Dim oItem As New ChartSeriesItem()
                oItem.XValue = dTime
                oItem.YValue = dCount
                oSeries.Items.Add(oItem)
            Loop
        Finally
            If oReader IsNot Nothing Then oReader.Close()
            oConn.Close()
            oConn.Dispose()
        End Try
    End Sub
 
End Class
 
The values are all correct, but the xaxis labels display as 41047, 41047.0416, ... 41047.9999 (the last digits of the labels are truncated)

Peshito
Telerik team
 answered on 28 May 2012
3 answers
77 views
Hello,

I have these two controls on the same page, the splitter containing a RadTreeview, a Formview and a gridview (left, right and bottom panes).
When I add a MOSSRadEditor, the vertical splitter shows a horizontal resizing icon, and allows resizing "horizontally" (though the orientation is "Vertical")...

Is there a workaround ?
Rumen
Telerik team
 answered on 28 May 2012
1 answer
111 views
see screenshot
Bozhidar
Telerik team
 answered on 28 May 2012
1 answer
248 views
I'm having a problem with my RadAjaxPanel and my viewstate.

We are keeping our last ten viewstates in session. The problem is on a certain page.. the user hits the page and selects a CATEGORY from a drop down. Another drop down is populated with CategoryTYPES depending on the CATEGORY that was selected.

To keep the page from posting back, I have a RadAjax panel around the controls on the page.

After selecting a CATEGORY/TYPE, the user can add that combination to a listbox and select another CATEGORY/TYPE. These selections are then used in a search that populates a RadGrid.

Our legacy system allowed the users to then use the browser back / forward buttons to move backward and forward, which loaded each viewstate version from memory. So each step was saved.

With my RadAjax panel on the page though, the hidden __VIEWSTATE value is not being updated on the page. I can see my SavePageStateToPersistenceMedium Sub is firing and that my subsequent viewstates are being saved to memory, but since the hidden field isn't being updated on the page, I'm continually loading the wrong version of the page (the original version from when I first hit the page)  after doing an actual postback.

I think my main problem is the hidden field __VIEWSTATE is not getting updated. The hidden field has no runat="server" on it since it's being put there dynamically, and although I've managed to find the control and read the value from it, I can't find a way to update it during the ajax postback.  

I've tried adding EnableViewState="true" to my ajax panel, but I'm still not updating the hidden field on the page when then ajax postback occurs.

I know I can't be the only one who's run into this and I'm hoping someone has a solution or even a work around that will allow me to keep track of where I'm at and what viewstate version I'm supposed to be loading when the user tries to browse backwards or forwards.

And yes, I know.. but they insist on being able to use the BACK and FORWARD browser buttons, so I have to live with it.  :)

I appreciate any suggestions or tips on how I can get around this problem...
~TFlick
Maria Ilieva
Telerik team
 answered on 28 May 2012
15 answers
329 views
Hi,

If i create a control like this:

RadDatePicker date = new RadDatePicker();
            date.EnableTyping = false;
            date.ShowPopupOnFocus = true;

Disabling typing also disables Popup.. ..but i only want the popup, that's why i disable typing! :D

So now i have a control that allows no input at all!

Disabling typing should actually force popup = true

Also, you should probably not show a caret in the input box when typing is disabled. Very misleading.
Maria Ilieva
Telerik team
 answered on 28 May 2012
1 answer
107 views
basically I have radtabstripe with 3 levels so for 1st and 2nd i want default behavior of radtab but for third level i want to show tab items in dropdown / radcombo format. so is there any way to style 3rd level different than 1 and 2nd so that i get 3 level dispalyed in combobox style. or is there any way i can have radcombo box for 3rd level.
Kate
Telerik team
 answered on 28 May 2012
1 answer
92 views
Hi Mike,

As you suggested i have started a new thread here. Could you please let me know by what time this will be functioning properly?
Bozhidar
Telerik team
 answered on 28 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?