Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
123 views

Hi,

I have an GridNumericColumn that is having diferent behaviours between environments (dev, prod). I'm not setting the decimal separator, so it's using the default one. On my dev environment it's using "." (ex.: 1.5) and in my prod ist's using "," (ex.: 1,5).

I don't know exactly what definition is used for this. I thought it was regional settings so i made them equal but it appears not to be.

 

I want to ensure the 1.5 format whatever the regional definitions (to view and edit).

 

I have two questions:

What exactly makes the decimal separators diferente?

What's the best way of ensuring the decimal separators i need?

joao
Top achievements
Rank 1
 asked on 20 Dec 2017
0 answers
182 views

I have a grid made up of bound columns.

Some of the columns have an aggregate (Sum) to show totals in the footer.

How can I access these values client side, using the column name if possible?

Can I make use of 'get_masterTableViewFooter()' ?

 

Example basic grid:

<telerik:RadGrid ID="itemsGrid" >
    <MasterTableView ShowFooter="True" Width="100%"
                     DataKeyNames="ID" ClientDataKeyNames="ID">
        <Columns>
            <telerik:GridBoundColumn DataField="ID" UniqueName="id" HeaderText="ID" />
            <telerik:GridBoundColumn DataField="quantity" HeaderText="Qty" UniqueName="quantity" />
            <telerik:GridBoundColumn DataField="price" HeaderText="Price" UniqueName="price" Aggregate="Sum" />
            <telerik:GridBoundColumn DataField="total" HeaderText="Total" UniqueName="total" Aggregate="Sum" />
        </Columns>
        <FooterStyle />
    </MasterTableView>
</telerik:RadGrid>

 

Javascript:

function CheckTotals(sender, eventArgs) {
    // get totals from footer
    var grid = $find('<%=itemsGrid.ClientID%>');
    var masterTableViewFooter = grid.get_masterTableViewFooter();
     
    // how to access 'Price' aggregate from footer??
}

 

Thanks

Jason

 

 

 

 

 

Jason
Top achievements
Rank 1
 asked on 20 Dec 2017
2 answers
1.2K+ views

the application I am developing has a detail popup which opens model

when it closes the parent window does not re-enable - the controls remain frozen

the parent page below

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/OneColumn.master" AutoEventWireup="true" CodeFile="RosterTelerik.aspx.cs" Inherits="iGM_RosterTelerik" %>
<%@ MasterType VirtualPath="~/MasterPages/TwoColumn.Master" %>
<%@ Register Src="~/Controls/UserBox.ascx" TagName="UserBox" TagPrefix="uc1" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <link href="../Styles/Oxygen/NewRoster.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <uc1:UserBox ID="UserBox1" runat="server"></uc1:UserBox>
    <h1 style="float: left">Roster Page</h1>
    <br />
    <asp:Panel ScrollBars="Vertical" Width="100%" runat="server">
        <telerik:RadScriptManager ID="rsManager" runat="server" />
        <telerik:RadAjaxManager ID="raManager" runat="server" >
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rgRoster">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgRoster" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadCodeBlock ID="rcBlock" runat="server">
            <script type="text/javascript">
                function openRadWindow(playerID)
                {
                    var radwindow = $find('<%=rwmPlayer.ClientID %>');
                    radwindow.setUrl('../Library/PlayerPopup.aspx?PlayerID=' + playerID);
                    radwindow.set_width(900);
                    radwindow.set_height(540);
                    radwindow.set_modal(true);
                    radwindow.show();
                }
                function RowDropped(sender, eventArgs)
                {
                    var theItem = eventArgs.get_draggedItems()[0];
                    var theRole = theItem.findElement("rlbRole").innerText;
                    var theIndex = theItem.get_itemIndexHierarchical();
                    var stringofIDs = "";
                    var theMasterTable = $find("<%= rgRoster.ClientID %>").get_masterTableView();
                    var theItems = theMasterTable.get_dataItems();
                    for (var i = 0; i < theItems.length; i++)
                    {
                        var role = theItems[i].findElement("rlbRole").innerText
                            if (role == theRole)
                            {
                                stringofIDs = stringofIDs + role + '-' + theItems[i].get_itemIndexHierarchical() + '&';
                            }
                    }
                    var theHiddenField = document.getElementById("<%= hdnStringofIDs.ClientID %>");
                    theHiddenField.value = stringofIDs;
                }
            </script>
        </telerik:RadCodeBlock>
        <asp:HiddenField ID="hdnStringofIDs" runat="server" />
        <telerik:RadGrid ID="rgRoster" AutoGenerateColumns="False" OnNeedDataSource="rgRoster_NeedDataSource"
            OnItemCreated="rgRoster_ItemCreated" OnItemDataBound="rgRoster_ItemDataBound" OnEditCommand="rgRoster_EditCommand"
            OnUpdateCommand="rgRoster_UpdateCommand" Width="100%" runat="server" OnRowDrop="rgRoster_RowDrop"  OnColumnCreated="rgRoster_ColumnCreated" >
            <GroupingSettings CollapseAllTooltip="Collapse all groups" />
            <MasterTableView DataKeyNames="id" EditMode="InPlace" >
                <EditFormSettings>
                    <EditColumn UniqueName="CareerStageImage" ButtonType="ImageButton" >
                    </EditColumn>
                    <PopUpSettings />
                </EditFormSettings>
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldName="positionCategoryCode" />
                            <telerik:GridGroupByField FieldName="positionCategory" />
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="positionCategoryCode" SortOrder="Ascending" />
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldName="positionSubCategoryCode" />
                            <telerik:GridGroupByField FieldName="positionSubCategory" />
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="positionSubCategoryCode" />
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
                <RowIndicatorColumn Visible="False">
                </RowIndicatorColumn>
                <ExpandCollapseColumn Created="True">
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn UniqueName="id" DataField="id" Visible="false" ReadOnly="true" />
                    <telerik:GridTemplateColumn UniqueName="hiddenCareerStage" Visible="false" ReadOnly="true" >
                        <ItemTemplate>
                            <asp:HiddenField ID="hdnCareerStage" Value='<%#DataBinder.Eval(Container.DataItem, "careerStage")%>' runat="server" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridNumericColumn UniqueName="Depth" DataField="positionDepth" DecimalDigits="0" HeaderStyle-Width="20px" HeaderText="DPTH" ReadOnly="true">
                    </telerik:GridNumericColumn>
                    <telerik:GridTemplateColumn UniqueName="role" HeaderText="ROLE" ReadOnly="true">
                        <HeaderStyle Width="42px" />
                        <ItemTemplate>
                            <telerik:RadLabel ID="rlbRole" Text='<%#DataBinder.Eval(Container.DataItem, "role")%>' runat="server" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="nfl" HeaderStyle-Width="36px" HeaderText="NFL" ReadOnly="true">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn>
                        <HeaderStyle Width="96px" />
                        <ItemTemplate>
                            <asp:HyperLink ID="hlName" Text='<%#DataBinder.Eval(Container.DataItem, "name")%>' runat="server" />   
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>

more columns here

                    <telerik:GridDropDownColumn UniqueName="CareerStage" DropDownControlType="RadComboBox" HeaderStyle-Width="72px" HeaderText="CAREER STAGE" ItemStyle-ForeColor="Black"
                        DataField="careerStage" DataSourceID="xdsCareerStage" ListTextField="Text" ListValueField="Value" AutoPostBackOnFilter="true" />
                    <telerik:GridEditCommandColumn UniqueName="CareerStageImage" ButtonType="ImageButton" EditImageUrl="../Images/CareerStage/Career_0None.png" UpdateImageUrl="../Images/CareerStage/ThumbsUp.png" HeaderText="Click to Update" HeaderStyle-Width="32px" />
                    <telerik:GridBoundColumn DataField="notes" HeaderStyle-Width="160px" HeaderText="NOTES" ReadOnly="true" >
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings AllowRowsDragDrop="true">
                <Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
                <ClientEvents OnRowDropped="RowDropped" />
            </ClientSettings>
     </telerik:RadGrid>
     <telerik:RadWindowManager ID="rwmPlayer" DestroyOnClose="true" runat="server" >
        <Windows>
            <telerik:RadWindow ID="rwPlayer" NavigateUrl="../Library/PlayerPopup.aspx" CenterIfModal="false" runat="server" />
        </Windows>
    </telerik:RadWindowManager>
    </asp:Panel>
    <asp:XmlDataSource ID="xdsCareerStage" DataFile="~/App_Data/CareerStages.xml" runat="server"  />
</asp:Content>
Marin Bratanov
Telerik team
 answered on 20 Dec 2017
1 answer
99 views
Hi

Can someone please help me with a Radgrid issue I am having, when I run the app through VB on the ASP development server everything work fine, as soon as I publish the site into any IIS the button is visible but just does nothing when its clicked. No editform or inline updating textboxes or anything is visible the button is just unresponsive..
Please advise me on this

Regards 
Lee'Roy
Rumen
Telerik team
 answered on 20 Dec 2017
5 answers
299 views

Hi,

Is is possible to reach a Filtered Template Combobox outside the event

Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As Telerik.WebControls.GridCommandEventArgs)

My code for a FilterTemplate is
<telerik:GridBoundColumn DataField="MeasuringPointName" FilterControlAltText="Filter MeasuringPointName column"
    HeaderText="Изм. т-ка" SortExpression="MeasuringPointName" UniqueName="MeasuringPointName" >
    <ItemStyle Wrap="False" />
    <FilterTemplate>
        <telerik:RadComboBox ID="RadComboBoxMeasuringPointName" DataSourceID="ObjectDataSourceMeasuringPointsNames" DataTextField="MeasuringPointName"
            DataValueField="MeasuringPointName" AppendDataBoundItems="true"  Width="100%" DropDownAutoWidth="Enabled"
            SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("MeasuringPointName").CurrentFilterValue %>'
            runat="server" OnClientSelectedIndexChanged="MeasuringPointNameIndexChanged">
            <Items>
                <telerik:RadComboBoxItem Text="Всички" />
            </Items>
        </telerik:RadComboBox>
        <telerik:RadScriptBlock ID="RadScriptBlockMeasuringPointName" runat="server">
            <script type="text/javascript">
                function MeasuringPointNameIndexChanged(sender, args) {
                    var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>");
                    tableView.filter("MeasuringPointName", args.get_item().get_value(), "EqualTo");
                }
            </script>
        </telerik:RadScriptBlock>
    </FilterTemplate>
</telerik:GridBoundColumn>

I have a RadComboBox and a RadButton which are used to fill SqlDataSource and invoke RadGrid.Prerender with RadGrid.Rebind(). I also use RadAjaxmanager with following code:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
       <AjaxSettings>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="btnExecute">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="Panel1" />
               </UpdatedControls>
           </telerik:AjaxSetting>
           <telerik:AjaxSetting AjaxControlID="MeasuringPointsDataGrid">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="Panel1" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
       <ClientEvents OnRequestStart="onRequestStart" />
   </telerik:RadAjaxManager>
   <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Telerik"
       Transparency="30" meta:resourcekey="RadAjaxLoadingPanel1Resource1">
   </telerik:RadAjaxLoadingPanel>

On first select everithing work correctly. I select item from FilterTemplate and filtering works correct. If I change the the criteria to be completed the RadGrid the FilterTemplate retains the old chosen value instead to change to "All".
My idea is to handle

btnExecute_Click(sender As Object, e As System.EventArgs) Handles btnExecute.Click
event and inside it  any help would me more than welcome  to set the RadComboBoxMeasuringPointName SelectedIndex to 0. 

Any help would me more than welcome. Thank you.

yassin wakeel
Top achievements
Rank 1
 answered on 20 Dec 2017
9 answers
492 views

I have upload Video using Media Manager in Editor with size around 50MB, but radeditor slow rendering the video.

How to improve the performance when render the video in radeditor?

I also want to insert external Mp4 Video from our http server not from Youtube / vimeo, how to do that ? Is it possible ?

Perhaps anyone can help me.

Thanks,

Rumen
Telerik team
 answered on 20 Dec 2017
2 answers
153 views

Is there such a way where I can do a onclick on the pie chart series from a code behind?  I need to redirect to another web page on a series click and in the target page, I will show a grid of the detail data base of which series it got clicked and thus would like to pass the variable using a session.

 

Thx.

Frank
Top achievements
Rank 1
 answered on 20 Dec 2017
7 answers
399 views

I am having problems with bullets in RadEditor - basically, the html code it creates is wrong.

I attach three images showing the steps to create the problem. The intention was to bullet the four lines starting with 'Item'. The same happens with a numbered list.

Prior to bulleting/numbering, the html view shows this (which is correct):

 

This is the course information for the course. It contains:<br />
<br />
Item1<br />
Item2<br />
Item3<br />
Item4<br />
<br />
This text is below the bullet points

 

When the bullet button is pressed, Bullets3.jpg happens. The corresponding html view shows:

<ul>
    <li>This is the course information for the course. It contains:<br />
    <br />
    Item1<br />
    Item2<br />
    Item3<br />
    Item4<br />
    <br />
    This text is below the bullet points</li>
</ul>

 

For numbering, it shows:

 

<ol>
    <li>This is the course information for the course. It contains:<br />
    <br />
    Item1<br />
    Item2<br />
    Item3<br />
    Item4<br />
    <br />
    This text is below the bullet points</li>
</ol>

 

Looking at this, the ul /ul and ol /ol have been inserted in completely the wrong place. This actually makes the bullet/number features completely unusable because there doesn't seem to be any logic in how it screws up the html.

Any ideas on how to fix this ?

I am using 2014.1.403.40 with .NET 4.0 under VS2010 and Chrome, although it also does it under IE.

Thanks

John
Top achievements
Rank 1
 answered on 19 Dec 2017
2 answers
483 views
I'm posting this because I had a really hard time finding the exact documentation that would resolve the issues I was having.

The issue I was having is when I published my webapp to my webserver the telerik controls were not rendering and functioning properly. 

So for anybody who's having issues with .Net4.0 (perhaps on a stand alone server) here is how I resolved them.
Prerequisite:
Make sure Microsoft.net 4.0 is installed.
~ This install guide was created using Windows 2008 server R2 standard
(in lamest terms so of the x64 directories listed below might need to be changed to either 32/86)


Instructions:
  1. Install the "AutoMatic Installation" files on your webserver (login to www.telerik.com, -> account overview -> manage products -> download -> browse all product files -> Automatic installation)
  2. Install the "AutoMatic Installation" on your server (copy the file over or download it directly there)

------------------------------------------
This is where I got thrown a curve ball, i'm assuming that everything I need will be installed on the webserver, however this does not seem to be the case.

A few notes :
The directions here are accurate, however a bit misleading: http://www.telerik.com/help/aspnet-ajax/moss-deploying-radcontrols.html

What is misleading about these is the directions shown indicate a Share Point server, in my case I'm not using Share Point.  Also what is misleading is Visual Studio is not installed on my webserver. 

Also: The drag and drop feature for installation of GAC is not available in .Net 4.0, you must use the GACUTIL.exe from either the SDK or VS.  The correct directory for .Net4.0 GAC is "C:\Windows\Microsoft.NET\assembly"

Instructions (Part 2):

  1. Install Windows SDK found here: http://www.microsoft.com/en-us/download/details.aspx?id=8279
  2. When installation has been completed open up a command prompt "AS ADMINISTRATOR"
  3. in the command prompt type cd "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\NETFX 4.0 Tools\x64" hit enter
  4. in the command prompt type gacutil.exe -i "C:\Program Files (x86)\Telerik\RadControls for ASP.NET AJAX Q2 2012\Bin40\Telerik.Web.UI.dll"

And that fixed all the problems for me!

What seemed to be the issue for the .net 4.0 GAC is installer only seemed to install Telerik.Web.Design in the .net4.0 GAC "C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Telerik.Web.Design"
I had to manually install ""C:\Windows\Microsoft.NET\assembly\GAC_MSIL\Telerik.Web.UI".

Is this designed or a bug or a windows issue?  I chose to install all the aspx dlls (which included reporting) and they did install under the 2.0/3.5 GAC "C:\Windows\assembly".

However, the .Net 4.0 only installed the Telerik.Web.Design.


Ahmed
Top achievements
Rank 1
 answered on 19 Dec 2017
4 answers
129 views
Hello,

I am using a combobox with an OData data source as defined here:

<telerik:RadODataDataSource runat="server" ID="RadODataDataSource1" EnablePaging="True" EnableSorting="True" EnableFiltering="True">
    <Transport>
        <Read Url="http://localhost/DataService/" DataType="JSONP"></Read>
    </Transport>
    <Schema>
        <telerik:DataModel ModelID="Country" Set="CustomCountries">
            <telerik:DataModelField FieldName="Name"></telerik:DataModelField>
            <telerik:DataModelField FieldName="ISOCountryCode"></telerik:DataModelField>
        </telerik:DataModel>
    </Schema>
</telerik:RadODataDataSource>
 
<telerik:RadComboBox runat="server" ID="RadComboBox1" ODataDataSourceID="RadODataDataSource1" Filter="Contains"
    DataModelID="Country" DataTextField="Name" DataValueField="ISOCountryCode" EnableLoadOnDemand="True"
    MaxHeight="200">
</telerik:RadComboBox>

I was expecting that when filtering, the combobox would use the $filter parameter but when inspecting the request, it is always empty. Am I missing something?


Thanks in advance,

Baptiste

PS: One more question, will OData v3 be supported in a near future? :)
msky92
Top achievements
Rank 1
 answered on 19 Dec 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?