Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
107 views

Does the IndexOf() method from GridColumnCollection return a zero based index? 

What will be returned if the column wasn´t found?

Thanks,

Frank

 

Remark to: http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/columns/reordering

...

GridColumnCollection cols = grid.MasterTableView.Columns;

GridColumn c = cols.FindByUniqueName(columnName);

if (c != null)

...

 

FindByUniqueName throws a GridException if the column wasn´t found.

So why testing c for null?

 

 

...

 

 

Viktor Tachev
Telerik team
 answered on 30 Mar 2016
1 answer
195 views

Hi

Is it possible to change the yAxis step client-side?

something like

chart._chartObject.options.yAxis.step = 2;

just after obtain the data.

 

function setDataFromService(sender, args) {
               //Get the returned data
               var newData = args.get_content().d;
               if (newData.length > 0) {                   
                   chart._chartObject.options.title.text = newData[0].Name;
                   //step Y AXIS
                   chart._chartObject.options.yAxis.step = 2;
               }
               else
                   chart._chartObject.options.title.text = "";
               //Set the new datasource to the RadHtmlChart
               chart.set_dataSource(newData);               
               //Repaint the RadHtmlChart
               chart.repaint();       
               //Avoid raising the OnClientResponseEnded client-side event
               //avoid setting the received data as content for the RadXmlHttpPanel
               args.set_cancel(true);
               if (currentLoadingPanel != null) {
                   currentLoadingPanel.hide(currentControl);
               }
           }

 

Chart

<telerik:RadHtmlChart runat="server" ID="DetailChart" ClientIDMode="Static" Transitions="false" RenderAs="Canvas" >
                        <ChartTitle>  
                            <Appearance Position="Top">
                                <TextStyle FontSize="9px" Margin="0" Padding="0"/>
                            </Appearance>
                        </ChartTitle>
                        <ClientEvents OnLoad="onChartLoad" />
                        <Legend>
                            <Appearance Position="Bottom" Visible="true"></Appearance>
                        </Legend>
                        <Pan Enabled="true" />
                        <Zoom Enabled="true">
                            <MouseWheel Enabled="true" Lock="Y" />
                            <Selection Enabled="true" ModifierKey="Shift" />
                        </Zoom>
                        <PlotArea>
                            <Series>
                                <telerik:ScatterLineSeries DataFieldY="YValue1" DataFieldX="XValue" MissingValues="Zero">
                                    <MarkersAppearance Visible="false" />
                                    <Appearance Overlay-Gradient="None">
                                        <FillStyle BackgroundColor="#e65100" />
                                    </Appearance>
                                    <LineAppearance Width="1px" />
                                    <LabelsAppearance Visible="false"></LabelsAppearance>
                                    <TooltipsAppearance Visible="False"></TooltipsAppearance>
                                    
                                </telerik:ScatterLineSeries>
 
                                <telerik:ScatterLineSeries DataFieldY="YValue2" DataFieldX="XValue" MissingValues="Zero">                                   
                                    <MarkersAppearance Visible="false" />
                                    <Appearance Overlay-Gradient="None">
                                        <FillStyle BackgroundColor="#000066" />
                                    </Appearance>
                                    <LineAppearance Width="1px" />
                                    <LabelsAppearance Visible="false"></LabelsAppearance>
                                    <TooltipsAppearance Visible="False"></TooltipsAppearance>                                  
                                </telerik:ScatterLineSeries>
                            </Series>
 
                            <XAxis BaseUnit="Auto" Type="Date" MaxDateGroups="8">
                                <MajorGridLines Visible="false" />
                                <MinorGridLines Visible="false" />                               
                                <LabelsAppearance DataFormatString="dd/MM HH:mm" Step="2">
                                    <TextStyle FontSize="10px" />
                                </LabelsAppearance>
                            </XAxis>
                            <YAxis >
                                <MajorGridLines Visible="true" Width="1" Color="#efefef" />
                                <MinorGridLines Visible="false" />
                                <LabelsAppearance >
                                    <TextStyle FontSize="10px" />
                                </LabelsAppearance>
                            </YAxis>
                        </PlotArea>
                    </telerik:RadHtmlChart>
                    <telerik:RadXmlHttpPanel runat="server" ID="XmlHttpPanelWCF" WcfRequestMethod="POST" ClientIDMode="AutoID"
                        OnClientResponseEnding="setDataFromService " WcfServicePath="HomeWebService.asmx" OnClientResponseError="OnClientResponseError"
                        WcfServiceMethod="GetHomeChartData">
                    </telerik:RadXmlHttpPanel>

 

Thank you

Ianko
Telerik team
 answered on 30 Mar 2016
5 answers
196 views
hi,

I have a pivotgrid connected to an OLAP cube.
I have placed on the columns fields the Year field and I wish to filter this field on a specific year in Code-behind in C #

I browsed the online documentation and the forum but I have not found the proper use for the methods FilterByLabel, FilterByValue, SetFilterIncludes.
I think that the examples provided are suitable for connections to relational databases but not multidimensional.

Could someone tell me how I can implement that kind of filter.

thank you in advance

best regards
Jérome
Top achievements
Rank 1
 answered on 30 Mar 2016
5 answers
88 views

Hi,

The color picker doesn't looks good when zooming in the browser.

Try zooming to 120% and run your demo:

http://demos.telerik.com/aspnet-ajax/colorpicker/examples/overview/defaultcs.aspx

You need to reload the page after zooming!

The Web colors wraps, and the HSB/HSV tabs also wraps a lot!

Regards
Andreas

Danail Vasilev
Telerik team
 answered on 30 Mar 2016
1 answer
65 views

I am running asp.net framework 4.0; Windows 10; Telerik UI for ASP.NET AJAX v2015.2.729.40

In a webforms asp.net project, I have created multiple RadGauges in my C# codebehind, using data pulled from a SQL Server database. Now I need to do one or more of the following:

-save the RadGauges to PDF or as an image file (that can later be emailed)--preferably mutiple gauges per file;

-OR email the gauges

-OR print the gauges

If I can do the FIRST option, I can, obviously do the other two...

I have searched and searched for several days to attempt to do this on my own before sending in a request...and I simply cannot seem to work this out. Can someone assist me? Thanks in advance for any assistance!

Danail Vasilev
Telerik team
 answered on 30 Mar 2016
8 answers
1.3K+ views
Hello,

I want to implement that if you click one row,then you can edit, And you click another row, the row you just edited will update and the new row will go into edit mode.

I got some examples, but they just implement it as do one thing at one time.

Anyone can help me I really appreciate it.

Thank you.
Konstantin Dikov
Telerik team
 answered on 30 Mar 2016
1 answer
93 views

Hi, 

I have a radgridview with a ColumnHeader group.

one of the column header group is pinned.

If i drop a column on the pinned column group header, the column is getting removed.I can not even drag it back from the column chooser

Is there a setting to prevent this from happening. it basically hangs with that column label floating around.

 

 

Maria Ilieva
Telerik team
 answered on 30 Mar 2016
2 answers
58 views
Ok so i have got unavailable times working following the code found elsewhere in this form but for some reason it is not being specific to the Resource
01./// <param name="e">The <see cref="TimeSlotCreatedEventArgs"/> instance containing the event data.</param>
02.    protected void apertureAppointments_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
03.    {
04.        foreach (DateTime dt in SpecialDays)
05. 
06.        {
07.            if (DateTime.Compare(e.TimeSlot.Start.Date, dt) == 0)
08.            {
09.                //Set the CssClass property to visually distinguish your special days.
10.                e.TimeSlot.CssClass = "Disabled";
11.            }
12. 
13. 
14. 
15. 
16.        }
17. 
18.          
19.        List<Resource> resources = new List<Resource>(apertureAppointments.Resources.GetResourcesByType("Managers"));
20.        Resource res = resources[5];
21. 
22.        DateTime dt1 = DateTime.Parse("2016/03/25 10:00");
23.        DateTime dt2 = DateTime.Parse("2016/03/25 16:00");
24.        if (res.Text == "Adam Adair")
25.        {
26.            if (DoDateRangesOverlap(e.TimeSlot.Start, e.TimeSlot.End, dt1, dt2))
27.            {
28.                e.TimeSlot.CssClass = "UnavailableCssStyle";
29.            }
30.        }
31.    }

 

 

This is the last element of a long running project and if can get this working they will be very please is their anyway to add a icon to represent a holiday?.

 

Veselin Tsvetanov
Telerik team
 answered on 30 Mar 2016
1 answer
115 views

Hi,

I want to show media list in Repeater, but it's not working.

I have tried to set file name static,t works out of the Repeater.

 

This is code is not working;

<form id="form1" runat="server">
    
  <telerik:RadScriptManager ID="RadScriptManager4" runat="server" EnablePageMethods="true" >
    </telerik:RadScriptManager>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Windows7" >
    </telerik:RadSkinManager>
    <asp:Repeater ID="rpDetay" runat="server" OnItemDataBound="FormatearPublicaciones">
    <ItemTemplate>
        <div>   
               
    <telerik:RadMediaPlayer RenderMode="Lightweight" ID="RadMediaPlayer1" runat="server" Width="700px" BackColor="Black"
                         AutoPlay="false" HDActive="false" Height="394px" HDSource="files/xxx.mp4" Source="files/xxx.mp4">
        </telerik:RadMediaPlayer>
        
    </div>
    </ItemTemplate>
    <SeparatorTemplate>
        <br />
    </SeparatorTemplate>
    </asp:Repeater>

    </form>

 

Also I see that errors on Chrome Developer Tools;

 

 

 

RadMediaPlayerScripts.js:1031 Uncaught TypeError: Cannot read property 'get_element' of null

RadMediaPlayerScripts.js:770 Uncaught TypeError: Cannot read property 'setBytesLoaded' of null

RadMediaPlayerScripts.js:764 Uncaught TypeError: Cannot read property 'setProgressRailMaxValue' of null

 

This code is working;

 

<form id="form1" runat="server">
    
  <telerik:RadScriptManager ID="RadScriptManager4" runat="server" EnablePageMethods="true" >
    </telerik:RadScriptManager>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Windows7" >
    </telerik:RadSkinManager>
   
         <telerik:RadMediaPlayer RenderMode="Lightweight" ID="RadMediaPlayer1" runat="server" Width="700px" BackColor="Black"
                         AutoPlay="false" HDActive="false" Height="394px" HDSource="files/xxx.mp4" Source="files/xxx.mp4">
        </telerik:RadMediaPlayer>
        
    </form>

 

 

Uncaught TypeError: Cannot read property 'get_element' of null     RadMediaPlayerScripts.js:1031 

Uncaught TypeError: Cannot read property 'setBytesLoaded' of null       RadMediaPlayerScripts.js:770 

Uncaught TypeError: Cannot read property 'setProgressRailMaxValue' of null        RadMediaPlayerScripts.js:764 

Uncaught TypeError: Cannot read property 'get_element' of null     RadMediaPlayerScripts.js:1031 

Uncaught TypeError: Cannot read property 'setBytesLoaded' of null       RadMediaPlayerScripts.js:770 

Uncaught TypeError: Cannot read property 'setProgressRailMaxValue' of null        RadMediaPlayerScripts.js:764 

Eyup
Telerik team
 answered on 30 Mar 2016
1 answer
46 views
In one of the scenarios we have a grid with horizontal scroll and in the grid last column have telerik calendar (RadDatePicker), when clicking on calendar icon calendar is not visible completely. Can we set the position to make sure come it is visible properly. This is the same case with Filter dropdown as well.
Viktor Tachev
Telerik team
 answered on 30 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?