Telerik Forums
UI for ASP.NET AJAX Forum
21 answers
587 views

Recently, our pie chart has stopped displaying. The JS console says:

Uncaught TypeError: Cannot read property 'labels' of undefined

and on MouseOut

Uncaught TypeError: Cannot read property 'hideCrosshairs' of undefined

The HtmlChart object is defined on the aspx side and populated from the vb side.

However, even when taking the example directly from http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/chart-types/pie-chart, the example does not display, and the console gives me the same error messages.

We are using version 2017.1.228.45.

(Full JS error messages at the end.)

aspx:

<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" OnClientSeriesClicked="OnClientSeriesClicked" Height="300px" Transitions="false" />

vb:

RadHtmlChart1.Visible = True
 
Dim chartData As New PieSeries
chartData.StartAngle = "90"
chartData.LabelsAppearance.Position = HtmlChart.PieAndDonutLabelsPosition.OutsideEnd
chartData.LabelsAppearance.DataFormatString = "{0} %"
chartData.TooltipsAppearance.DataFormatString = "{0} %"
 
Dim chartItem1 As New PieSeriesItem
chartItem1.Name = "Closed" & " (" & yvalues(0) & ")"
chartItem1.Y = yvalues(0) 'Round(yvalues(0) / total * 100, 2)
chartItem1.BackgroundColor = Color.Green
chartItem1.Exploded = False
chartData.SeriesItems.Add(chartItem1)
 
Dim chartItem2 As New PieSeriesItem
chartItem2.Name = "Unclosed" & " (" & yvalues(1) & ")"
chartItem2.Y = yvalues(1) 'Round(yvalues(1) / total * 100, 2)
chartItem2.BackgroundColor = Color.LightGreen
chartItem2.Exploded = False
chartData.SeriesItems.Add(chartItem2)
 
Dim chartItem3 As New PieSeriesItem
chartItem3.Name = "Unfinished" & " (" & yvalues(2) & ")"
chartItem3.Y = yvalues(2) 'Round(yvalues(2) / total * 100, 2)
chartItem3.BackgroundColor = Color.LightGray
chartItem3.Exploded = False
chartData.SeriesItems.Add(chartItem3)
 
Dim chartItem4 As New PieSeriesItem
chartItem4.Name = "Overdue" & " (" & yvalues(3) & ")"
chartItem4.Y = yvalues(3) 'Round(yvalues(3) / total * 100, 2)
chartItem4.BackgroundColor = Color.Firebrick
chartItem4.Exploded = False
chartData.SeriesItems.Add(chartItem4)
 
RadHtmlChart1.PlotArea.Series.Clear()
RadHtmlChart1.PlotArea.Series.Add(chartData)
RadHtmlChart1.Legend.Appearance.Position = HtmlChart.ChartLegendPosition.Top

 

Full error messages (URLs redacted):

Telerik.Web.UI.WebResource.axd:23965 Uncaught TypeError: Cannot read property 'labels' of undefined
    at init.render (https://x.com/Telerik.Web.UI.WebResource.axd?_TSM_Hidden…3a69667591%3a6b6b9ee5%3a595e7652%3a6d43f6d9%3a58366029%3ae4f8f289:23965:37)
    at init.reflow (https://x.com/Telerik.Web.UI.WebResource.axd?_TSM_Hidden…3a69667591%3a6b6b9ee5%3a595e7652%3a6d43f6d9%3a58366029%3ae4f8f289:23970:28)
    at init.reflow (https://x.com/Telerik.Web.UI.WebResource.axd?_TSM_Hidden…%3a69667591%3a6b6b9ee5%3a595e7652%3a6d43f6d9%3a58366029%3ae4f8f289:24162:5)
    at aX.reflowCharts (https://x.com/Telerik.Web.UI.WebResource.axd?_TSM_Hidden…3a69667591%3a6b6b9ee5%3a595e7652%3a6d43f6d9%3a58366029%3ae4f8f289:22535:25)
    at aX.reflow (https://x.com/Telerik.Web.UI.WebResource.axd?_TSM_Hidden…%3a69667591%3a6b6b9ee5%3a595e7652%3a6d43f6d9%3a58366029%3ae4f8f289:22378:6)
    at init.reflow (https://x.com/Telerik.Web.UI.WebResource.axd?_TSM_Hidden…3a69667591%3a6b6b9ee5%3a595e7652%3a6d43f6d9%3a58366029%3ae4f8f289:17252:13)
    at init._getModel (https://x.com/Telerik.Web.UI.WebResource.axd?_TSM_Hidden…%3a69667591%3a6b6b9ee5%3a595e7652%3a6d43f6d9%3a58366029%3ae4f8f289:24996:3)
    at init._redraw (https://x.com/Telerik.Web.UI.WebResource.axd?_TSM_Hidden…3a69667591%3a6b6b9ee5%3a595e7652%3a6d43f6d9%3a58366029%3ae4f8f289:24931:33)
    at init.d.fn.(anonymous function) [as _redraw] (https://x.com/Telerik.Web.UI.WebResource.axd?_TSM_Hidden…3a69667591%3a6b6b9ee5%3a595e7652%3a6d43f6d9%3a58366029%3ae4f8f289:25726:22)
    at init.refresh (https://x.com/Telerik.Web.UI.WebResource.axd?_TSM_Hidden…%3a69667591%3a6b6b9ee5%3a595e7652%3a6d43f6d9%3a58366029%3ae4f8f289:25546:4)
 
Telerik.Web.UI.WebResource.axd:23965 Uncaught (in promise) TypeError: Cannot read property 'labels' of undefined
    at init.render (Telerik.Web.UI.WebResource.axd:23965)
    at init.reflow (Telerik.Web.UI.WebResource.axd:23970)
    at init.reflow (Telerik.Web.UI.WebResource.axd:24162)
    at aX.reflowCharts (Telerik.Web.UI.WebResource.axd:22535)
    at aX.reflow (Telerik.Web.UI.WebResource.axd:22378)
    at init.reflow (Telerik.Web.UI.WebResource.axd:17252)
    at init._getModel (Telerik.Web.UI.WebResource.axd:24996)
    at init._redraw (Telerik.Web.UI.WebResource.axd:24931)
    at Telerik.Web.UI.WebResource.axd:24855
    at <anonymous>
 
Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress=1&_TSM_CombinedScripts_…:25258 Uncaught TypeError: Cannot read property 'hideCrosshairs' of undefined
    at init.hideElements (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress=1&_TSM_CombinedScripts_…:25258)
    at init._mouseleave (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress=1&_TSM_CombinedScripts_…:25606)
    at HTMLDivElement.e (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress=1&_TSM_CombinedScripts_…:1577)
    at HTMLDivElement.handle (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress=1&_TSM_CombinedScripts_…:1578)
    at HTMLDivElement.dispatch (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress=1&_TSM_CombinedScripts_…:1578)
    at HTMLDivElement.r.handle (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_TSM&compress=1&_TSM_CombinedScripts_…:1578)


 

Vessy
Telerik team
 answered on 05 Apr 2018
3 answers
501 views

Wow, this has been fun. I have a project that uses .net member and roles to dynamically build a menu. The first item in the menu and the last item in the menu were always the same so I initially crated a radmenu on my master page with the following:

 

<telerik:RadMenu ID="RadMenu1" runat="server" Skin="Vista"
    OnClientItemClicked="onClickedMenuItem" Height="20px" Width="100%">
    <Items>
        <telerik:RadMenuItem runat="server" Text="logo" PostBack="False">
            <ItemTemplate>
                <asp:Image ID="Image1" runat="server" AlternateText="<%$ AppSettings:menuimgalttext %>"
                    Height="<%$ AppSettings:menuimgheight %>" ImageUrl="<%$ AppSettings:menuimg %>"
                    Width="<%$ AppSettings:menuimgwidth %>" />
            </ItemTemplate>
        </telerik:RadMenuItem>
        <telerik:RadMenuItem runat="server"  PostBack="False" CssClass="rightMenu">
            <ItemTemplate>
                <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="~/Default.aspx?logout=true">Logout: </asp:LinkButton>
                <asp:Label ID="lblUser" Text = "lblUser" runat="server"></asp:Label>
                <asp:Label ID="lblInstitution" Text="lblInstitution" runat="server"></asp:Label>
                <asp:Label ID="lbldate" Text="lbldate" runat="server"></asp:Label>
            </ItemTemplate>
        </telerik:RadMenuItem>
    </Items>
</telerik:RadMenu>


As you can see, the two template items were the only items in the menu. I then used Radmenu1.Insert(1,“Menu Item”) to put items between these templates. This works great unless there is a postback  in which case the radmenu items of the two initial templates are instantiated without the templates (On initial display the page works just fine, only on a postback is there a problem). Telerik told me it had to do with the viewstate and how insert worked and suggested I use the information from the following article (
http://www.telerik.com/help/aspnet-ajax/menu-templates-runtime.html)  to dynamically insert my templates.

 The deal with the article is it assumes the template is going to be applied to every item in the menu,  which for me is not the case. Based on article I created me a litTemplate class:

Imports Telerik.Web.UI
 
Public Class litTemplate
    Implements ITemplate
    Dim myId As String
 
    Public Sub New(ByVal id As String)
        myId = id
    End Sub
 
    Public Sub InstantiateIn(ByVal container As Control) Implements ITemplate.InstantiateIn
        Dim lit1 As New LiteralControl
        lit1.ID = myId
 
        AddHandler lit1.DataBinding, AddressOf lit1_DataBinding
        container.Controls.Add(lit1)
    End Sub
 
    Private Sub lit1_DataBinding(ByVal sender As Object, ByVal e As EventArgs)
        Dim target As LiteralControl = DirectCast(sender, LiteralControl)
        Dim item As RadMenuItem = DirectCast(target.BindingContainer, RadMenuItem)
        Dim itemText As String = DirectCast(DataBinder.Eval(item, "Text"), String)
        target.Text = itemText
    End Sub
 
End Class

It uses the new function to set the id for the template item.  Then, it uses the Text property from the radmenuitem to determine what the literal html to be inserted is.  

 I changed radmenu definition to:

<telerik:RadMenu ID="RadMenu1" runat="server" Skin="Vista"
    OnClientItemClicked="onClickedMenuItem" Height="20px" Width="100%">
    <Items>
    </Items>
</telerik:RadMenu>


I then used the following code at the end of my menu to always add the user login information with a Logout link:

Dim litString as String = "<a href=""Default.aspx?logout=true"">Logout :</a> " + auser.UserName.ToString + " / " + Session("Institution") + " " + Session("ProcessDate")
                Dim item6template As New litTemplate("lit1")
                RadMenu1.ItemTemplate = item6template
                Dim item6 As New RadMenuItem(litString)
                RadMenu1.Items.Add(item6)
                RadMenu1.ItemTemplate = Nothing
 
                RadMenu1.DataBind()

This creates the literal text template and sets the itemtemplate for the radmenu to the template. Now when a new radmenuitem is added it uses the template.  I then set it back to nothing so additional radmenuitems do not use the template. 

So I guess the trick is just setting the Radmenu.ItemTemplate before adding an item then setting it back to nothing when done.  It is a pretty simple way to use templates on a  per radmenuitem basis if your dynamically building your menus.

This litTemplate is flexible enough that I also used it to handle the logo as the first element of the menu. Using this technique, you could "literally", pun intended, insert anything in the menu.

Hope this helps someone.

 

 

 

 

Rumen
Telerik team
 answered on 05 Apr 2018
0 answers
286 views

Hello 

I am using Telerik RadHtml barchart and want to get Y axis max values on run time and wan to set this value on another bar chart 's y axis.

For now i have set it with below.

radhtmlBarChartDocSubmissionCurrentWeek.PlotArea.YAxis.MaxValue = Value;

here is value is custom calculated. 

Please do needful for this.

Thanks,

Mukesh Prajapati

Mukesh
Top achievements
Rank 1
 asked on 05 Apr 2018
3 answers
88 views

How do I fix the height  in upload window so I do not need to scroll to access the button....

See attached image

Rumen
Telerik team
 answered on 05 Apr 2018
3 answers
529 views

When I clicked expand button in Hierarchial Grid, only the event of MasterTableView's OnNeedDataSource event is fired but DetailTablesis not expand.

After that I got javascript error as follow:

Uncaught Error: Sys.WebForms.PageRequestManagerServerErrorException: 運算式中語法錯誤。
    at Function.Error$create [as create] (ScriptResource.axd?d=AfvFZH5yr9SFZO1uJIkxMNpyoCc9wNwM5tA7rEHIyT11kgJ5EkhPsEnUeQe2gORcoMk74AeuNrfWZk4A_j_7v5lioH7P8YDhj_y126_XtCoSPPNdre0pBH5g0aXaTJJzdo2SYuiCu7FqqqNIViB9M7L6OwjuBkcGg8R3slWkEDqT31jr0&t=2e2045e2:222)
    at Sys$WebForms$PageRequestManager$_createPageRequestManagerServerError [as _createPageRequestManagerServerError] (ScriptResource.axd?d=BtzRDy2CmDYUKa-SuQWd30NyzML3bPck27UBkLxHZlNcJHVeYeA95bRcApKHuXI97vaTH-l0DJz23dNFK7Npu-q_uLvjYEzlAeOLA8GXd5-c7zfzkWXjj_fMGwj7E4dpNw6jhFSeO2hP0vYeuy66i_uIiu4O5u29HZCZe92isT_W9MHp0&t=2e2045e2:360)
    at Sys$WebForms$PageRequestManager$_parseDelta [as _parseDelta] (ScriptResource.axd?d=BtzRDy2CmDYUKa-SuQWd30NyzML3bPck27UBkLxHZlNcJHVeYeA95bRcApKHuXI97vaTH-l0DJz23dNFK7Npu-q_uLvjYEzlAeOLA8GXd5-c7zfzkWXjj_fMGwj7E4dpNw6jhFSeO2hP0vYeuy66i_uIiu4O5u29HZCZe92isT_W9MHp0&t=2e2045e2:1111)
    at Sys$WebForms$PageRequestManager$_onFormSubmitCompleted [as _onFormSubmitCompleted] (ScriptResource.axd?d=BtzRDy2CmDYUKa-SuQWd30NyzML3bPck27UBkLxHZlNcJHVeYeA95bRcApKHuXI97vaTH-l0DJz23dNFK7Npu-q_uLvjYEzlAeOLA8GXd5-c7zfzkWXjj_fMGwj7E4dpNw6jhFSeO2hP0vYeuy66i_uIiu4O5u29HZCZe92isT_W9MHp0&t=2e2045e2:903)
    at Array.<anonymous> (ScriptResource.axd?d=AfvFZH5yr9SFZO1uJIkxMNpyoCc9wNwM5tA7rEHIyT11kgJ5EkhPsEnUeQe2gORcoMk74AeuNrfWZk4A_j_7v5lioH7P8YDhj_y126_XtCoSPPNdre0pBH5g0aXaTJJzdo2SYuiCu7FqqqNIViB9M7L6OwjuBkcGg8R3slWkEDqT31jr0&t=2e2045e2:47)
    at ScriptResource.axd?d=AfvFZH5yr9SFZO1uJIkxMNpyoCc9wNwM5tA7rEHIyT11kgJ5EkhPsEnUeQe2gORcoMk74AeuNrfWZk4A_j_7v5lioH7P8YDhj_y126_XtCoSPPNdre0pBH5g0aXaTJJzdo2SYuiCu7FqqqNIViB9M7L6OwjuBkcGg8R3slWkEDqT31jr0&t=2e2045e2:2399
    at Sys$Net$WebRequest$completed [as completed] (ScriptResource.axd?d=AfvFZH5yr9SFZO1uJIkxMNpyoCc9wNwM5tA7rEHIyT11kgJ5EkhPsEnUeQe2gORcoMk74AeuNrfWZk4A_j_7v5lioH7P8YDhj_y126_XtCoSPPNdre0pBH5g0aXaTJJzdo2SYuiCu7FqqqNIViB9M7L6OwjuBkcGg8R3slWkEDqT31jr0&t=2e2045e2:5103)
    at XMLHttpRequest.Sys$Net$XMLHttpExecutor._onReadyStateChange (ScriptResource.axd?d=AfvFZH5yr9SFZO1uJIkxMNpyoCc9wNwM5tA7rEHIyT11kgJ5EkhPsEnUeQe2gORcoMk74AeuNrfWZk4A_j_7v5lioH7P8YDhj_y126_XtCoSPPNdre0pBH5g0aXaTJJzdo2SYuiCu7FqqqNIViB9M7L6OwjuBkcGg8R3slWkEDqT31jr0&t=2e2045e2:4721)

html is here:

<td class="rgExpandCol"><button type="button" name="ctl00$cphMain$RadGrid1$ctl00$ctl04$GECBtnExpandColumn" value="Expand" onclick="javascript:__doPostBack('ctl00$cphMain$RadGrid1$ctl00$ctl04$GECBtnExpandColumn','')" id="ctl00_cphMain_RadGrid1_ctl00_ctl04_GECBtnExpandColumn" title="Expand" class="t-button rgActionButton rgExpand"><span class="t-font-icon rgIcon rgExpandIcon"></span></button></td>

C#

<p></p><p><telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" GridLines="Both" runat="server"<br>    OnItemCommand="RadGrid1_ItemCommand" <br>    OnItemDataBound="RadGrid1_ItemDataBound" <br>    OnDetailTableDataBind="RadGrid1_OnDetailTableDataBind" <br>    OnNeedDataSource="RadGrid1_NeedDataSource" <br>    AutoGenerateColumns="False" <br>    AllowPaging="false"<br>    MasterTableView-HierarchyDefaultExpanded="false"><br>    <MasterTableView <br>        CommandItemDisplay="TopAndBottom" <br>        DataKeyNames="mrno,itemno"<br>        HorizontalAlign="NotSet" <br>        EditMode="Batch" <br>        AutoGenerateColumns="False"><br>        <CommandItemTemplate><br>            <telerik:RadPushButton runat="server" ID="SaveChangesButton" Text="儲存" CommandName="UpdateAll"><br>                <Icon CssClass="rgSaveIcon" /><br>            </telerik:RadPushButton><br>            <telerik:RadLinkButton runat="server" ID="RadLinkButton2" Text="回上一頁" NavigateUrl="SW_INV_K11_03.ASPX?ReQuery=1" /><br>        </CommandItemTemplate><br>        <BatchEditingSettings EditType="Cell" SaveAllHierarchyLevels="true" /><br>        <DetailTables><br>            <telerik:GridTableView DataKeyNames="mrno,itemno" <br>                AllowPaging="false" <br>                CommandItemDisplay="Top"<br>                EditMode="Batch" <br>                Name="Details"<br>                Width="100%" runat="server" ><br>                <ParentTableRelation><br>                    <telerik:GridRelationFields MasterKeyField="mrno,itemno" DetailKeyField="mrno,itemno"></telerik:GridRelationFields><br>                </ParentTableRelation><br>                <Columns><br>                    <telerik:GridButtonColumn ConfirmText="確定要刪除嗎?"<br>                        CommandName="Delete" Text="刪除" UniqueName="DeleteColumn1"><br>                        <HeaderStyle Width="20px"></HeaderStyle><br>                        <ItemStyle HorizontalAlign="Center" CssClass="MyImageButton"></ItemStyle><br>                    </telerik:GridButtonColumn><br><br>                    <telerik:GridBoundColumn SortExpression="batch_no" HeaderText="批號"<br>                        DataField="batch_no" UniqueName="batch_no"><br>                    </telerik:GridBoundColumn><br><br>                    <telerik:GridTemplateColumn HeaderText="效期" UniqueName="valid_dt" HeaderStyle-Width="8%"><br>                        <ItemTemplate><br>                            <telerik:RadDatePicker RenderMode="Lightweight" ID="valid_dt_RadDatePicker" Width="50%" ClientEvents-OnDateSelected="OnDateSelected" runat="server"><br>                            </telerik:RadDatePicker><br>                        </ItemTemplate><br>                    </telerik:GridTemplateColumn><br>                    <telerik:GridBoundColumn SortExpression="valid_qty" HeaderText="數量" DataType="System.UInt32"<br>                        DataField="valid_qty" UniqueName="valid_qty"><br>                    </telerik:GridBoundColumn><br>                </Columns><br><br>            </telerik:GridTableView><br>        </DetailTables><br>        <Columns><br>            <telerik:GridBoundColumn DataField="mrno" HeaderText="補貨單編號" HeaderStyle-Width="8%"<br>                ReadOnly="True" SortExpression="mrno" UniqueName="mrno"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="itemno" HeaderText="材料編號" HeaderStyle-Width="10%"<br>                ReadOnly="True" SortExpression="itemno" UniqueName="itemno"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="item_nm" HeaderText="品名規格" HeaderStyle-Width="30%"<br>                HeaderStyle-HorizontalAlign="Center" ReadOnly="True" SortExpression="item_nm" UniqueName="item_nm"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="min_unit" HeaderText="單位" HeaderStyle-Width="6%"<br>                ReadOnly="True" SortExpression="min_unit" UniqueName="min_unit"><br>            </telerik:GridBoundColumn><br>            <telerik:GridBoundColumn DataField="real_qty" HeaderText="補貨數量" HeaderStyle-Width="8%"<br>                ReadOnly="True" SortExpression="real_qty" UniqueName="real_qty" ItemStyle-HorizontalAlign="Center"><br>            </telerik:GridBoundColumn><br>        </Columns><br>    </MasterTableView><br>    <ClientSettings AllowKeyboardNavigation="true"></ClientSettings><br></telerik:RadGrid></p>
Attila Antal
Telerik team
 answered on 05 Apr 2018
6 answers
526 views

In my wizard code, I want to send the user to a specific step based on a condition.

I can set the ActiveStepIndex to the index of the step but I am unable to figure out how to get the stepindex of a specific step based on the ID of the step.

Please suggest.

SDI
Top achievements
Rank 1
 answered on 04 Apr 2018
1 answer
213 views

I have a RadGrid inside of a Wizard step. 

Why is the GridTemplateColumn container control disabled when the Tab is disabled and then enablled? if I have the Wizard Step enabled=false and then set it to to True in client-side code, the RadButton inside of the GridTemplateColumn is disabled. If i set it to True from the start the RadGrid controls are fine.

What the heck?

 

<telerik:RadWizardStep runat="server" Title="Company" ID="RadWizardStepCompany" Enabled="false">

IF I SET THIS TO TRUE - THE BUTTON IN THE GRID IS FINE

<telerik:RadWizardStep runat="server" Title="Company" ID="RadWizardStepCompany" Enabled="true">

 

<telerik:GridTemplateColumn>
                                                                            <ItemTemplate>
                                                                                <div style="float: left; width: 100%;">
                                                                                    <telerik:RadButton ID="RadButtonSelect" runat="server" Text="Select" CommandName="Select" Enabled="true"
                                                                                        CommandArgument='<%# Eval("CompanyId")%>' AutoPostBack="false" OnClientClicked="RadButtonCompanySelectClicked" />
                                                                                </div>
                                                                            </ItemTemplate>
                                                                            <HeaderStyle Width="55px" />
                                                                        </telerik:GridTemplateColumn>

 

SDI
Top achievements
Rank 1
 answered on 04 Apr 2018
5 answers
228 views
Hi,

I have a splitter (Top and bottom) and in the bottom pane, i have 2 panes (left, and content panes)  where content  pane displays data controls like RadGrid.The content pane is loaded using ContentUrl property pointing aspx pages in my application.

If the user double click on a grid row in the content pane, a radwindow would open in the content pane, but the moment the user moves the radwindow to the left, it will hide under the left pane (it also stop moving top, under the top pane).This is not acceptable since my users will be using laptops most of the time,and also because my left pane is taking 160px, so this leave less than 800px for radwindow to be moved.

To solve this, I created a radwindow in the masterpage (outside the splitter) and added a javascript function to open the radwindow by calling this function from within the content pane.It works, and now radwindow sits on top of all the panes and can move on all the client area of IE, but the content pane becomes white will moving the window,and goes back to normal when i release the mouse.

Any ideas on why this is happening and how to fix it?

Thanks

Naveen
Top achievements
Rank 1
 answered on 04 Apr 2018
4 answers
517 views
Is there a way to toggle the display of a column depending on if it is being used as a group by expression?

Here's the scenario: As users create complex grouping sets, I want to remove the column they are grouping on from the list of columns. For example, they decide to group on category. Instead of showing category in the list of columns, now I don't need it since the items are grouped by category. They decide to remove the grouping for category, so it needs to be placed back into the grid.

Is this possible with a short amount of code?

Here's the code I'm currently using:

 

<telerik:RadGrid ID="CurrentCostCentersGrid" runat="server" Skin="Office2007" AllowMultiRowSelection="True"

 

 

AllowMultiRowEdit="True" ShowGroupPanel="True" AllowPaging="True" DataSourceID="DataSourceUnits"

 

 

GridLines="None" AutoGenerateColumns="False" PageSize="50" ShowFooter="true">

 

 

<ClientSettings AllowDragToGroup="true" AllowGroupExpandCollapse="true" AllowColumnsReorder="true"

 

 

AllowExpandCollapse="true">

 

 

<Selecting AllowRowSelect="true" />

 

 

<ClientEvents OnRowSelected="CostCenterSelected" OnRowDeselected="CostCenterUnselected" />

 

 

</ClientSettings>

 

 

<GroupPanel Enabled="true" Text="Groups">

 

 

</GroupPanel>

 

 

<PagerStyle Mode="NextPrevAndNumeric" NextPageText="Next" PrevPageText="Previous" />

 

 

<MasterTableView ShowGroupFooter="true" ShowFooter="true" DataSourceID="DataSourceUnits"

 

 

DataKeyNames="CostCenterItemID" CommandItemDisplay="None" ClientDataKeyNames="CostCenterItemID">

 

 

<CommandItemTemplate>

 

 

<asp:Button ID="BulkApproveButton" runat="server" Text="Bulk Approve" />

 

 

</CommandItemTemplate>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn Visible="False">

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridClientSelectColumn>

 

 

</telerik:GridClientSelectColumn>

 

 

<telerik:GridBoundColumn HeaderText="Fund" DataField="FundID" AllowFiltering="true"

 

 

DataType="System.Int32" SortExpression="FundID" ReadOnly="True" UniqueName="Fund" />

 

 

<telerik:GridBoundColumn HeaderText="Unit" DataField="UnitID" AllowFiltering="true"

 

 

DataType="System.Int32" SortExpression="UnitID" ReadOnly="True" UniqueName="Unit" />

 

 

<telerik:GridBoundColumn HeaderText="Line Item" DataField="LineItemID" AllowFiltering="true"

 

 

DataType="System.Int32" SortExpression="LineItemID" ReadOnly="True" UniqueName="LineItem" />

 

 

<telerik:GridBoundColumn HeaderText="Description" DataField="LineItemName" SortExpression="LineItemName"

 

 

UniqueName="Description" ReadOnly="true" Groupable="false" />

 

 

<telerik:GridBoundColumn HeaderText="Previous Budget" DataField="PreviousBudget"

 

 

AllowFiltering="true" DataType="System.Decimal" SortExpression="PreviousBudget"

 

 

UniqueName="PreviousBudget" DataFormatString="{0:C}" ReadOnly="True" Aggregate="Sum"

 

 

FooterAggregateFormatString="{0:C}" Groupable="false" />

 

 

<telerik:GridBoundColumn HeaderText="Previous Actual" DataField="PreviousActual"

 

 

DataType="System.Decimal" SortExpression="PreviousActual" UniqueName="PreviousActual"

 

 

DataFormatString="{0:C}" Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}" />

 

 

<telerik:GridBoundColumn HeaderText="Current Budget" DataField="CurrentBudget" DataType="System.Decimal"

 

 

SortExpression="CurrentBudget" UniqueName="CurrentBudget" DataFormatString="{0:C}"

 

 

Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}" />

 

 

<telerik:GridBoundColumn HeaderText="Current YTD" DataField="CurrentYTD" DataType="System.Decimal"

 

 

SortExpression="CurrentYTD" UniqueName="CurrentYTD" DataFormatString="{0:C}"

 

 

Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}" />

 

 

<telerik:GridBoundColumn HeaderText="Proposed Budget" DataField="ProposedBudget"

 

 

DataType="System.Decimal" SortExpression="ProposedBudget" UniqueName="ProposedBudget"

 

 

Groupable="false" Aggregate="Sum" FooterAggregateFormatString="{0:C}" DataFormatString="{0:C}" />

 

 

<telerik:GridBoundColumn DataField="Category" EmptyDataText="&amp;nbsp;" HeaderText="Category"

 

 

SortExpression="Category" UniqueName="Category">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="StatusName" EmptyDataText="&amp;nbsp;" HeaderText="Status"

 

 

SortExpression="StatusName" UniqueName="StatusName">

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn HeaderText="Modify Date" DataField="ModifyDate" DataType="System.DateTime"

 

 

SortExpression="ModifyDate" UniqueName="ModifyDate" />

 

 

</Columns>

 

 

<DetailTables>

 

 

<telerik:GridTableView DataSourceID="DataSourceHistory" AutoGenerateColumns="false"

 

 

ShowHeader="false" GroupsDefaultExpanded="false" NoDetailRecordsText="No notes currently exist for this item"

 

 

Width="85%" CommandItemDisplay="Top">

 

 

<CommandItemTemplate>

 

 

<telerik:RadToolBar ID="DetailsToolbar" runat="server" Skin="WebBlue" Width="100%"

 

 

AutoPostBack="true">

 

 

<ExpandAnimation Type="OutQuad" Duration="150" />

 

 

<CollapseAnimation Type="InQuad" Duration="150" />

 

 

<Items>

 

 

<telerik:RadToolBarButton Text="Make Request" CommandName="MakeRequest" ImageUrl="Images/request.gif">

 

 

</telerik:RadToolBarButton>

 

 

<telerik:RadToolBarButton IsSeparator="true">

 

 

</telerik:RadToolBarButton>

 

 

<telerik:RadToolBarDropDown Text="Approvals">

 

 

<Buttons>

 

 

<telerik:RadToolBarButton Text="Approved" CommandName="ManagerApprove" ImageUrl="Images/approve.gif">

 

 

</telerik:RadToolBarButton>

 

 

<telerik:RadToolBarButton Text="Rejected" CommandName="ManagerReject" ImageUrl="Images/reject.gif">

 

 

</telerik:RadToolBarButton>

 

 

<telerik:RadToolBarButton Text="Approve - Lock" CommandName="PortalApprove" ImageUrl="Images/paapprove.gif">

 

 

</telerik:RadToolBarButton>

 

 

<telerik:RadToolBarButton Text="Reject - Back to Manager" CommandArgument="PortalReject"

 

 

ImageUrl="Images/pareject.gif">

 

 

</telerik:RadToolBarButton>

 

 

</Buttons>

 

 

</telerik:RadToolBarDropDown>

 

 

</Items>

 

 

</telerik:RadToolBar>

 

 

</CommandItemTemplate>

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields MasterKeyField="CostCenterItemID" DetailKeyField="ItemID" />

 

 

</ParentTableRelation>

 

 

<RowIndicatorColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn>

 

 

<HeaderStyle Width="20px"></HeaderStyle>

 

 

</ExpandCollapseColumn>

 

 

<Columns>

 

 

<telerik:GridTemplateColumn>

 

 

<ItemTemplate>

 

 

<strong>

 

<%

#Eval("CreateDate","{0:d}") %>&nbsp;<%#Eval("CreateDate","{0:t}") %>&nbsp;-&nbsp;<%#Eval("UserName")%>:</strong>&nbsp;

 

<%

#Eval("NoteText")%><br />

 

 

<strong style="color: Red">Requested Increase:</strong>&nbsp;

 

<%

#Eval("RequestedBudget", "{0:C}")%>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

</Columns>

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

 

<PagerStyle Mode="NextPrevAndNumeric" />

 

 

<PagerTemplate>

 

Item Description

 

</PagerTemplate>

 

 

</MasterTableView>

 

 

<FilterMenu EnableTheming="True" Skin="Gray">

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

</FilterMenu>

 

 

</telerik:RadGrid>

 

Marin Bratanov
Telerik team
 answered on 04 Apr 2018
30 answers
1.5K+ views

First off, I think the Gantt is a nice little tool and I understand this is the first version but I'm encountering so many issues. Maybe these can be addressed in the next release or maybe I'm doing something wrong. 

1. When I try and enter a date manually, I have to enter the date with a space before and after it in order to take. I can't enter a 4 digit year either. Then when the "invalid date message is displayed" it is over the calendar so I can't even select a month because it is behind the message. 

2. If entering a start time, it must be after the end time. I understand this is a requirement, but what if I'm choosing the start date first? With the autoupdating, I have no control over when the database gets updated. I'd rather allow the user to select the dates (they might not always select the end date first) then save. 

3. There is no support for programmatic databinding. I don't understand why the method is there if it doesn't work?

4. There is no easy way to delete tasks without finding it on the calendar and then deleting it. It would work better if the calendar would automatically navigate to the task in the calender, but I'd rather be able to right click or have a delete column on the grid. Unfortunately there are not template columns available or options to build in my own delete functionality. 

5. When a task is a single day, I still can't figure out how to delete it. I have to make it at least 2 days to see the delete icon. Also, there is no way to modify a single day task from the calendar. 

6. Dependency should be an option and not a requirement. This is certainly a nice feature but it really gets confusing looking at these lines. There should be a way to turn this off. 

7. After playing with the Gantt for a while I occasionally get Javascript errors "Maximum call stack size exceeded" and the Gannt simply doesn't respond.  

8. Grid columns should be resizable. 

9. The Add Task button's text should be customizable, along with the split button text. 

10. New tasks are automatically added at the beginning of the calendar. It would be nice if the columns in the calendar were selectable and a new task was added to the selected day.

11. It would be nice to have a printing option for the calendar. 

12. I don't see a way to delete dependency lines. 

Again, I do understand this is a first version, but with so many obvious bugs, I just can't believe it was released. Hopefully some of these can be addressed in the next release. I wanted some of our users to start testing the new Gantt, but I wouldn't dare have them look at it in this state as it is almost unusable in my opinion. 


SDI
Top achievements
Rank 1
 answered on 04 Apr 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?