This is a migrated thread and some comments may be shown as answers.

Problem in using gauge inside hierarchical rad grid

1 Answer 26 Views
Gauge
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 21 Apr 2013, 06:28 AM
Hi,
I wanted to use the gauge inside the hierarchical rad grid.
and i did as in this thread
http://www.telerik.com/community/forums/aspnet-ajax/gauge/how-to-use-gauge-inside-the-grid.aspx
But it works fine for normal radgrid and
when I am using hierarchical grid. I am not able to expand the details table in the grid.

here is my code.
ASPX:
<telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="Progress"
                                UniqueName="StatusIndicator">
                                <ItemTemplate>
                                    <center>
                                        <telerik:RadLinearGauge runat="server" ID="RadLinearGauge1" Scale-Vertical="false"
                                            Scale-MajorTicks-Visible="false" Scale-Labels-Visible="false" Width="120px" Height="20px">
                                            <Pointer Shape="BarIndicator">
                                                <Track Opacity="0.4" />
                                            </Pointer>
                                            <Scale Min="0" Max="100">
                                                <Ranges>
                                                    <telerik:GaugeRange Color="#c20000" From="0" To="100" />
                                                </Ranges>
                                            </Scale>
                                        </telerik:RadLinearGauge>
                                    </center>
                                </ItemTemplate>
                                <HeaderStyle Width="100px" HorizontalAlign="Center" />
                            </telerik:GridTemplateColumn>
C#:
protected void OnItemDataBound1(object sender, GridItemEventArgs e)
   {
       if (e.Item.ItemType == GridItemType.Item || e.Item.ItemType == GridItemType.AlternatingItem)
       {
           GridDataItem item = e.Item as GridDataItem;
           DataRowView currentRow = (DataRowView)item.DataItem;
           decimal currValue = decimal.Parse(currentRow.Row["pc"].ToString());
           RadLinearGauge radialGauge1 = (RadLinearGauge)item.FindControl("RadLinearGauge1");
           radialGauge1.Pointer.Value = currValue;
       }
   }
Please give solution for this.

Thanks
--Alex

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 22 Apr 2013, 06:29 AM
Hi Alex,

I have already replayed to your question in this forum thread, so please find my answer there.

All the best,
Danail Vasilev
the Telerik team
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 their blog feed now.
Tags
Gauge
Asked by
Alex
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or