Telerik Forums
UI for ASP.NET AJAX Forum
19 answers
1.1K+ views
Please help me how to add a row in Header and merge some cells in row of Header

RJ
Top achievements
Rank 1
 answered on 30 Nov 2016
5 answers
637 views
I've a rad grid and I want to set the focus on a specified row of the grid using javascript.

I've done this function:


     function setActiveRow(p) {
         var grid = $find("<%=RadGridDati.ClientID%>");
         var masterTableView = grid.get_masterTableView();
         masterTableView.get_dataItems()[p].get_element().cells[0].focus();
     }

where p is the row number I want to set the focus.
It's running correctly with Explorer but not with Firefox and Crome.
Some ideas?

Thanks in advan ce
Eyup
Telerik team
 answered on 30 Nov 2016
2 answers
61 views

I noticed that the markers on the map looks mispositioned on many devices, like shifted to north/east.

I got this problem with my Android phone and even with a Surface pro, whatever the browser I 'm using.

You can see it even with the online demo:
http://demos.telerik.com/aspnet-ajax/map/examples/overview/defaultcs.aspx

On PC:
https://i.snag.gy/IzuexH.jpg

On my phone:
https://i.snag.gy/XTwYrK.jpg

I think it's just a css issue with the markers. I really need a quick solution to the problem. Any ideas? :/

zaza
Top achievements
Rank 1
 answered on 29 Nov 2016
1 answer
1.1K+ views

Hi Team,

I have a Radgrid which has DateTime Column with enable range filter. I am using AllowCustomPaging="True" And I am displaying the date as "24/11/2016 15:31:15" and I want that when I choose from date and To date the filter expression should format the filter date.

For example From date is "23/11/2016" and To Date is "24/11/2016" then it should change to "20161123" and "20161124" before passing to database.

Could you please help me on this.

~

Sandeep

Vasil
Telerik team
 answered on 29 Nov 2016
1 answer
140 views

Hello,

In the new version of UI for ASP.NET AJAX, v2016.3.1027,  the RadMenu no longer closes in Internet Explorer 11 when using the code below. When selecting "Action 2" under "Actions", the javascript code in the OnClientItemClicking handler would close the menu, but now the menu stays visible.  It had been working up to this point after several years, and still works in other browsers (Edge, Chrome).  Please Advise.

Thank You!

 

01.<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="RadMenuNotClosing.WebForm1" %>
02.<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
03.<!DOCTYPE html>
04. 
06.<head runat="server">
07.    <title></title>
08.</head>
09.<body>
10.    <form id="form1" runat="server">
11.        <telerik:RadScriptManager ID="rsm" runat="server">
12. 
13.        </telerik:RadScriptManager>
14.    <div>
15.        <telerik:RadMenu ID="rmTest"
16.                runat="server"
17.            OnClientItemClicking="MenuItemClicking"
18.            CollapseAnimation-Duration="0"
19.            ExpandAnimation-Duration="0"
20.            CollapseAnimation-Type="None"
21.            ExpanDelay="0"
22.            CollapseDelay="0"
23.            ClickToOpen="true"
24.            >
25.            <Items>
26.                <telerik:RadMenuItem Text="File">
27.                    <Items>
28.                        <telerik:RadMenuItem Text="Exit">
29.                        </telerik:RadMenuItem>
30.                    </Items>
31.                </telerik:RadMenuItem>
32.                <telerik:RadMenuItem Text="Actions">
33.                    <Items>
34.                        <telerik:RadMenuItem Text="Action 1" Value="Action1" >
35.                        </telerik:RadMenuItem>
36.                        <telerik:RadMenuItem Text="Action 2" Value="Action2"  >
37.                        </telerik:RadMenuItem>
38.                    </Items>
39.                </telerik:RadMenuItem>
40.            </Items>
41.        </telerik:RadMenu>
42.        <script type="text/javascript">
43.            function MenuItemClicking(sender,args)
44.            {
45.                var item = args.get_item();
46.                var itemValue = item.get_value();
47.                if (itemValue == "Action2")
48.                {
49.                    var txt = document.getElementById("txtText");
50.                    txt.value = "Action 2 taken";
51.                    args.set_cancel(true);
52.                    sender.close();
53.                    return;
54.                }
55.            }
56.        </script>
57.    </div>
58.        <br />
59.        <br />
60.        <br />
61.        <asp:TextBox ID="txtText" runat="server" Text="-" ClientIDMode="Static">
62.        </asp:TextBox>
63.    </form>
64.</body>
65.</html>
Dimitar
Telerik team
 answered on 29 Nov 2016
0 answers
92 views

I'm populating a box plot chart with a data table created from a sequel query. The query has an outliers field:

SELECT m.[periodEnd], m.[lower], m.[Q1], m.[Mean], m.[Median], m.[Q3], m.[upper],
[outliers] =
STUFF(
(SELECT ','+ CAST([DollarRepayment] AS varchar(12)) FROM #boxPlotList mm WHERE (mm.[DollarRepayment] < m.[lower]
OR mm.[DollarRepayment] > m.[upper]) AND mm.[periodEnd] = m.[periodEnd] FOR XML PATH('')),1,1,''
)
FROM #boxPlotDollarRepayments m
ORDER BY [periodEnd]

The outliers column shows like this:

10000.00,543901.00,783930.00,25325.00,403267.00,922911.00,850953.00,39815.00,20697.00,31654.00,39540.00,1385234.00,29954.00,507726.00

The code behind picks up the data table and binds it to the chart. The HTML looks like this:

<telerik:RadHtmlChart ID="RadHtmlChart5" runat="server" Width="100%" Height="500px">
<PlotArea>
<Series>
<telerik:BoxPlotSeries DataLowerField="lower" DataQ1Field="Q1" DataMeanField="Mean" DataMedianField="Median" DataQ3Field="Q3" DataUpperField="upper" DataOutliersField="outliers">
<OutliersAppearance MarkersType="Circle"></OutliersAppearance>
<ExtremesAppearance MarkersType="Cross"></ExtremesAppearance>
</telerik:BoxPlotSeries>
</Series>
<YAxis>
<TitleAppearance Text="Repayment Amount" RotationAngle="-90"></TitleAppearance>
<LabelsAppearance DataFormatString="{0:C0}"></LabelsAppearance>
</YAxis>
<XAxis DataLabelsField="periodEnd">
<TitleAppearance Text="Month Ending"></TitleAppearance>
<LabelsAppearance RotationAngle="-90"></LabelsAppearance>
</XAxis>
</PlotArea>
<ChartTitle Text="Repayments Plotting">
<Appearance Align="Center">
<TextStyle Bold="true" FontSize="16"/>
</Appearance>
</ChartTitle>
</telerik:RadHtmlChart>

If I remove the outliers column from the stored procedure and the chart tag, it works. If I put the outliers column in the stored procedure, whether I specify DataOutliersField or not in the BoxPlotSeries tag, the chart fails: chart displays the outliers all at 0 and 1 for each axis item, and the boxes, mean, median, upper and lower bounds do not appear.

Can anyone tell me what I am doing wrong?

 

 

Ralph
Top achievements
Rank 1
 asked on 29 Nov 2016
2 answers
269 views

Hi: Here are a part of RadGrid ! when I in edit & insert mode, I want hide Id (because it PK and auto increment), How Can I do ?

<Columns>
<telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
</telerik:GridEditCommandColumn>

<telerik:GridBoundColumn DataField="Id" HeaderText="Id" SortExpression="Id"
UniqueName="Id" Visible="false" >
</telerik:GridBoundColumn>

<telerik:GridBoundColumn DataField="Catagory" HeaderText="題目類別" SortExpression="Catagory"
UniqueName="Catagory">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CataPercentage" HeaderText="百分比" SortExpression="CataPercentage"
UniqueName="CataPercentage">

</telerik:GridBoundColumn>
<telerik:GridButtonColumn Text="Delete" CommandName="Delete" />
                </Columns>

Liu
Top achievements
Rank 1
 answered on 28 Nov 2016
16 answers
592 views
I have built a custom from on the server using Rad controls that include a DropDownList.  All the controls return a select value except for DropDownList.

Each control returns a pair of values, the singular selected value and a second long dictionary type string with more information on the control and its selected value

For example a Rad Input Text box will return two fields:

key = "ctl00$MainContentMembers$tsupcontrol_0"
value = "Mick"

and
key = "ctl00_MainContentMembers_tsupcontrol_0_ClientState"
value = "{\"enabled\":true,\"emptyMessage\":\"Display Name\",\"validationText\":\"Mick\",\"valueAsString\":\"Mick\",\"lastSetTextBoxValue\":\"Mick\"}"

Isn't it nice how the number zero can fall be take off the end of $tsupcontrol_ to get the control number.

A DropDownList  only returns the second dictionary item and no single value with the selection.
key = "ctl00_MainContentMembers_tsupcontrol_3_ClientState" 
value = "{\"enabled\":true,\"logEntries\":[],\"selectedIndex\":3,\"selectedText\":\"Four%20is%20square\",\"selectedValue\":\"Four\"}"

My post parsing looks for $tsupcontrol_ to find the values and gets to ignore the more complicated compound values.  Now I must complicate my code having to look for non $tsupcontrol_ values because DropDownList does not output a single return value which can be easily seen as "selectedValue" in the complicated string.  I have a Asp radio button list that gives the selected value just fine.

Is this a bug I must work around or is there a way to make the control return its selected value properly like the other well behaved controls?  Since the control is constructed in server code I cannot use Javascript to reference it or reference it as a runat control on the server.

George
Ivan Danchev
Telerik team
 answered on 28 Nov 2016
6 answers
98 views

Hi...

I use RadEditor in page when i import image and click right image and open properties dialog but code error 

 

Please Help.

Thanks.

John
Top achievements
Rank 1
 answered on 28 Nov 2016
6 answers
450 views
Hi, I have a grid connected to a clientdatasource and I need to refresh the grid from the web service, how can I do that using client side methods?
I tried the fetch() method of the datasource, or rebind() from the master table view but nothing works.
Thanks.
Viktor Tachev
Telerik team
 answered on 28 Nov 2016
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?