Using RadRadialGuage inside radgrid

2 posts, 0 answers
  1. Sandra
    Sandra avatar
    1 posts
    Member since:
    Mar 2013

    Posted 24 Jun 2013 Link to this post

    I followed the instructions on this thread

    But the find control line does not find the control and turns up with nothing.

    'here is my aspx


    <telerik:RadGrid ID="rgCARS" runat="server" ClientSettings-Scrolling-AllowScroll="true" AllowSorting="true" ShowFooter="true"



    OnSortCommand="RadGrid1_SortCommand" AutoGenerateColumns=False height="400px" EnableViewState="true" > <



    <Columns >



    <telerik:GridTemplateColumn UniqueName="Progress" AllowFiltering="false" HeaderText="Progress" DataField="Progress">






    <telerik:RadRadialGauge ID="RadRadialGauge1" Width="100" Height="100" runat="server" Min="0" Max="100">


















    <ClientSettings EnablePostBackOnRowClick="true">



    <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" AllowResizeToFit="true" />



    <Selecting AllowRowSelect= "true"/>







    note that I am coding the rest of the columns in the code behind to save viewstate:






    Dim column1 As New GridBoundColumn






    Dim column2 As New GridDateTimeColumn






    Dim column3 As New GridBoundColumn






    Dim column4 As New GridBoundColumn






    Dim column5 As New GridBoundColumn






    Dim column6 As New GridNumericColumn






    Dim column7 As New GridBoundColumn






    Dim column8 As New GridBoundColumn










































    'Then set properties





    column1.DataField =

    "Project #"





    column1.HeaderText =

    "Project #"





    column2.DataField =

    "Date Initiated"





    column2.HeaderText =

    "Date Initiated"





    column2.UniqueName =






    column3.DataField =






    column3.HeaderText =






    column4.DataField =

    "Main Type"





    column4.HeaderText =

    "Main Type"





    column5.DataField =






    column5.HeaderText =






    column6.DataField =






    column6.HeaderText =






    column7.DataField =

    "Waiting on"





    column7.HeaderText =

    "Waiting on"





    column8.DataField =

    "Waiting on 2"





    column8.HeaderText =





    'then in my itemdatabound I am trying to set the pointer value



    Private Sub rgCARS_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles rgCARS.ItemDataBound





    If e.Item.ItemType = GridItemType.Item Or e.Item.ItemType = GridItemType.AlternatingItem Then



    Dim item As GridDataItem = CType(e.Item, GridDataItem)



    Dim currentRow As DataRowView = CType(item.DataItem, DataRowView)



    Dim currValue As Decimal = Decimal.Parse(currentRow.Row("Progress").ToString())



    Dim radialGauge1 As RadRadialGauge = CType(item.FindControl("RadRadialGauge1"), RadRadialGauge)



    Dim value As Integer



    If currValue = 0 Then


    value = 0




    value = currValue / 2


    End If



    'RaidalGuage is nothing and throws an error


    radialGauge1.Pointer.Value =





    End If

    Any ideas?




  2. Misho
    Misho avatar
    197 posts

    Posted 27 Jun 2013 Link to this post

    Hello Sandra,

    I tried to replicate the issue you are experiencing using the markup provided but no avail.
    It looks like the markup and the code is partially incomplete and I was not able to run it. I am willing to help you resolve the problem, but I need to reproduce the issue first.
    What I could suggest you at this point is to try to isolate the issue in a simple, fully runnable project and send it back, which will allow us to run and examine it locally.
    Since I've verified the solution provided by Danail on the following forum thread is runnable, you could use it for a reference.

    Best Regards,
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top