Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
126 views
Hi, the ExportToPdf function works fine in my local dev environment. However the moment i move it to any uat or prod server it fails with the error:

System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it <IP ADDRESS>:80     at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)     at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP)     at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)

Everything else works find, the Radscheduler is bound to a sql data source and all works flawlessy. However i have been unable to determine why the above occurs on any webserver but not my local dev env. Is this a permissions thing? I am not sure what is occuring inside of ExportToPdf for this occur? I am assuming it just uses the same datasource as specified in DatasourceID that works fine elsewhere?  Any help would be greatly appreciated as the export to pdf is a big need for this project.
Thanks

 

Grace
Top achievements
Rank 1
 answered on 23 Oct 2017
0 answers
81 views

I see examples of setting the high and the low in the range series through hard code

 

            <SeriesItems>
                    <telerik:RangeSeriesItem From="56" To="76" />
                    <telerik:RangeSeriesItem From="56" To="76" />
                    <telerik:RangeSeriesItem From="56" To="76" />
                    <telerik:RangeSeriesItem From="56" To="76" />
                    <telerik:RangeSeriesItem From="56" To="76" />
                    <telerik:RangeSeriesItem From="56" To="76" />
                    <telerik:RangeSeriesItem From="56" To="76" />
                    <telerik:RangeSeriesItem From="56" To="76" />
                    <telerik:RangeSeriesItem From="56" To="76" />
                    <telerik:RangeSeriesItem From="56" To="76" />
                    <telerik:RangeSeriesItem From="56" To="76" />
                    <telerik:RangeSeriesItem From="56" To="76" />
                </SeriesItems>

 

How do I bind them to a data source?

 

thanks

Jeff
Top achievements
Rank 1
 asked on 23 Oct 2017
2 answers
828 views

We are using Bootstrap with Telerik ASP.Net Ajax controls and we're having trouble changing button styles.

<link href="Content/bootstrap.css" rel="Stylesheet" type="text/css" />

 

For example, this should be changing the style of our RadGridButton:

<telerik:RadButton ID="btnCopySlctdSteps" CssClass="btn-success" runat="server" OnClick="btnCopySlctdStep_Click" Text="Copy Selected Steps" />

 

But it doesn't seem to be working since the buttons are still simply gray.

 

Thanks

 

JazzBox
Top achievements
Rank 1
 answered on 23 Oct 2017
1 answer
159 views

I have a grid that has a gridtemplatecolumn for a checkbox. In the header I have a checkbox to select/unselect all.The grid allows pagination and filtering. I run an OnCheckedChanged function on the checkbox in the header. I disable paging, rebind, loop through the records to update my record(s) in the database, enable paging and rebind again. The saving and selecting of each row on the pages works. The problem is that when I enable paging and rebind the grid, the checkbox in the header goes to unselected. The grid/check box no longer knows that the user checked the check box and that all visible rows in the grid are selected so the checkbox should be selected still. This would give the user the option to unselected the header checkbox to unselect all the rows.

My question is how to tell the checkbox in the header, that all the rows that are visible in the grid (due to filtering applied, or pagination on) are selected so select the checkbox in the header to allow the user to unselect. At this point, my grid can show 10 records at a time, the user can filter to the rows they want while still having pagination on. They can select the header checkbox to select all of the rows but have no option to use the header to unselect all the rows.

Below are snippets of the aspx gridtemplate column and the aspx.vb OnCheckedChanged function.

<telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" HeaderText="Selected" AllowFiltering="false">
     <ItemStyle Width="45px" Wrap="false" />  
     <HeaderStyle Width="45px" Wrap="false" />
     <ItemTemplate>
                <asp:CheckBox ID="cbSelectedSearchResults" runat="server" Checked='<%# GetBooleanValue(Eval("Selected")) %>'                               OnCheckedChanged="ToggleRowSelectionSearchResults" AutoPostBack="True" />
      </ItemTemplate>
       <HeaderTemplate>
                <asp:CheckBox Text="" ID="headerChkboxSearchResults" runat="server" OnCheckedChanged="ToggleSelectedStateSearchResults" AutoPostBack="True" />
       </HeaderTemplate>

</telerik:GridTemplateColumn>

 

    Protected Sub ToggleSelectedStateSearchResults(ByVal sender As Object, ByVal e As EventArgs)
        Dim headerCheckBox As CheckBox = TryCast(sender, CheckBox)
        selectAll = headerCheckBox.Checked
        Dim strSQL As String = ""
        Dim selected As Integer = 0
        Dim ID As Integer = 0
        rgSelections.MasterTableView.AllowPaging = False
        rgSelections.Rebind()

        For Each dataItem As GridDataItem In rgSelections.MasterTableView.Items
            TryCast(dataItem.FindControl("cbSelectedSearchResults"), CheckBox).Checked = headerCheckBox.Checked
            dataItem.Selected = headerCheckBox.Checked

            ID = dataItem.GetDataKeyValue("ID")

            If headerCheckBox.Checked Then
                selected = 1
            End If

            Try
                strSQL = "update bridge.dbo.Tmp_BridgeJobOptions" & ucHeader1.SessionId & " set selected = " & selected & " where id = " & ID
                mobjBridgeDatabase.subExecuteNonQuery(strSQL)
            Catch ex As SqlException
                Throw New Exception(ex.Message & ", SQL: " & strSQL & ",frmBridgeLineCreation.ToggleSelectedStateSearchResults")
            End Try

        Next
        rgSelections.MasterTableView.AllowPaging = True
        rgSelections.Rebind()


        For Each dataItem As GridDataItem In rgSelections.MasterTableView.Items
            TryCast(dataItem.FindControl("cbSelectedSearchResults"), CheckBox).Checked = headerCheckBox.Checked
            dataItem.Selected = headerCheckBox.Checked
        Next

    End Sub

Attached is a picture of my grid right after I checked the checkbox in the header. You can see all my rows are selected, but the header is back to unselected.

 

 

 

Attila Antal
Telerik team
 answered on 23 Oct 2017
6 answers
1.9K+ views
I just found this nasty error this morning, for what seemed like no reason.  And I found a solution that worked for me, but it might not be readily available to fix for everyone, I'll explain.

I've attached two screenshots, a before and after that displays my Visual Studio 2010 Design Views with the errors and the fixed result.

The part that helped me figure it out was with the RadScheduler.  It displayed a much more helpful message that helped me find the solution.

If you notice in the "error" screen shot the RadTreeView and RadMenu controls do not display anything but the error message.  But when I dragged a RadScheduler on the page, it displayed a much more helpful message. 

Since I had just upgraded my ASP.NET AJAX controls to the latest version yesterday, the local cached version was still the prior version. This is what caused the errors.

So here's what I did:
  1. Close Visual Studio
  2. Navigate to the location of the older Telerik assembly
  3. Delete it
  4. Open Visual Studio - and everything works!

 

If you don't see a message that shows the path of the problem assembly, try dragging a RadScheduler onto the page to see if that shows the details paths.

Edit - 1/23/2012
This problem seemed to persist in later days, and I finally found a good work around.  In your web.config, you need to change this...

<pages>
    <controls>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI" />
    </controls>
</pages>

... to this.

<pages>
    <controls>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI, Version=2011.3.1305.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
    </controls>
</pages>

Remember to change the version number to the version you have installed in your application.

This works, but it does mean that you will have to manually update the version number if you ever upgrade your application in the future, but at least it will not generate all those errors.

If anyone has a better solution, I would love to hear it.

I hope this helps.

Thanks,

King Wilder

Tricewebdevelopment
Top achievements
Rank 1
 answered on 23 Oct 2017
4 answers
355 views

Is the a standard way of setting the default filter in the vb code-behind for a GridDateTimeColumn that has RangeFiltering?  

My problem is not with making the initial FilterExpression string, but rather how to set the boxes so that if someone filters by a different value without manually setting the dateTimePicker, the values will still be picked up for the FilterExpression.

I have thought up alternate solutions to this problem like storing my starting value. Because of some rarities in my code, I view and edit my FilterExpression every time  a filter is called, therefore when a filter is changed I can see if the FilterExpression contains the GridDatePickerColumnFilter filtering information and if it does not (meaning that nobody has manually changed the dateTimePicker fields) then i can re-add it myself from the labels (or recalculate it again). 

Unfortunately this requires alot of additional code and paying close attention. I would be really appreciative if someone knows if there is a way to set the dateTimePicker similar to how "column.CurrentFilterValue = [string]" will set the filter textbox so that the next time a filter is called or the table is rebound, it still remember the filter value.

Thanks, 
Morgan
Madhavi
Top achievements
Rank 1
 answered on 23 Oct 2017
0 answers
94 views

Following is the aspx code :

 <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server" IsSticky="True" EnableSkinTransparency="true" Transparency="40" >
    </telerik:RadAjaxLoadingPanel>

    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server" >
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Button1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="TestDiv"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="Button3">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="abcd"/>
                    <telerik:AjaxUpdatedControl ControlID="TestDiv" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
    <asp:Button ID="Button3" runat="server"  Text="Make Visible" OnClick="Button3_Click" />
    <asp:Button ID="Button4" runat="server"  Text="Make Invisible" OnClick="Button4_Click" />
        <div id="abcd" runat="server" class="col-md-16 text-align-right top-margin-10" >
            <div class="col-md-7">
                &nbsp;
            </div>
            <div class="col-md-9">
                <div class="col-md-5" runat="server" style="display:block; text-align:center; ">
                        <fieldset class="border-for-div">
                            <legend class="caption-for-div">&nbsp;Video streaming&nbsp;</legend>                
                            <video id="video" autoplay="autoplay" width="200" height="120" style="border:solid; border-width:1px;" runat="server"></video>
                        </fieldset>
                </div>
                <div class="col-md-5" runat="server" style="display:block; text-align:center; ">
                        <fieldset class="border-for-div">
                            <legend class="caption-for-div">&nbsp;Take Photo&nbsp;</legend>                
                            <canvas width='160' height='120' style="border:solid; border-width:2px;" > </canvas>
                        </fieldset>
                </div>
                <div class="col-md-5">
                    <img id="Img1" runat="server" style="border:solid; border-width:5px;" width="160" height="120" visible="false" />
                </div>
            </div>
            <br />
            <input type="button" value="start capture" onclick="startCapture()" />
            <input type="button" value="take snapshot" onclick="takePhoto()" />
            <%--<input type="button" value="stop capture" onclick="stopCapture()" />--%>
            <asp:TextBox ID="TextBox1" runat="server" ClientIDMode="Static"></asp:TextBox>
        </div>
    
    <div id="TestDiv" class="col-md-16 text-align-right top-margin-10" runat="server" >
        <asp:textbox ID="textbox5" runat="server" Text="textbox5"></asp:textbox>
    </div>
    <script type="text/javascript">
        var localMediaStream = null;
        var video = document.querySelector('video'); 
        var canvas = document.querySelector('canvas');
 
        function takePhoto() {
            if (localMediaStream) {
                var ctx = canvas.getContext('2d');
                ctx.drawImage(video, 0, 0, 160, 120);
                //document.querySelector('img').src = canvas.toDataURL('image/jpeg');
                var base64 = canvas.toDataURL('image/jpeg');
                document.getElementById('TextBox1').value = base64;
            }
        }
 
        navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
        window.URL = window.URL || window.webkitURL;
 
        function startCapture() {
            navigator.getUserMedia({ video: true }, function (stream) {
                video.src = window.URL.createObjectURL(stream);
                localMediaStream = stream;
            }, function (e) {
                console.log(e);
            });
        }
 
        function stopCapture() {
            video.pause();
            localMediaStream.stop();
        }
    </script>

Following is C# code :

protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                abcd.Attributes["style"] = "Display:Normal;"; //None
                TestDiv.Attributes["style"] = "Display:None;"; //Normal
            }
        }

        protected void Button3_Click(object sender, EventArgs e)
        {
            abcd.Attributes["style"] = "Display:Normal;"; //None
            video.Attributes["style"] = "Display:Normal;"; //None
            TestDiv.Attributes["style"] = "Display:None;"; //Normal

        }

        protected void Button4_Click(object sender, EventArgs e)
        {
            abcd.Attributes["style"] = "Display:None;"; //None
            video.Attributes["style"] = "Display:None;"; //None
            TestDiv.Attributes["style"] = "Display:Normal;"; //Normal

        }

The problem is as follows :

 

When the page is loaded and I click on Start Capture the video streaming starts. Click on Take Snapshot also puts an image on the canvas.

Now click on the button Make Invisible. This will hide the div in which the video and captured image are displayed and show the div with one textbox.

Now click on the button Make Visible. This will show the div in which the video and captured image are to be displayed and hide the div with one textbox.

The problem starts from here. Now if I press Start Capture button the web camera is started. but the video streaming is not visible.

I tried disabling the compression in my web.config file but still the problem is not resolved.

If I stop using radajaxmanager then every thing works fine.

Can any body help me in resolving this ?

 

Thanks

Milind

Milind
Top achievements
Rank 1
 asked on 23 Oct 2017
5 answers
154 views
hi , any body know that in teleric Editor how can write in Arabic if know then please tell me its very argent ?
thanks
yagnesh(Software developer)
Rumen
Telerik team
 answered on 23 Oct 2017
3 answers
360 views
I have a Dot Net 4.0 web app using Telerik controls version 2012.2.607.40.  (I know, we're going to upgrade soon.... I hope)

I'm using a simple window.radopen call to open windows:   
var oWnd = window.radopen("ScreenName.aspx?Id=" + Id, "Screen Title" );    

Do I understand correctly?  

This version of radopen is not capable of setting the opening position (left and top) of a window?  I've been trying to control position but so far no good.
Scott
Top achievements
Rank 2
 answered on 20 Oct 2017
2 answers
219 views
When the page is reloaded with initial scroll, the appointments that are not visible and some who are at the top rows cannot be moved ( all other at the lower part are working fine). It depends of the page scroll, if i scroll down even more and hit refresh, more of the upper appointments will be disabled for moving.
This problem start to occur after chrome version 61. On Mozilla Firefox and IE it works fine. 

I tried with 2017.1.330 and 2017.3.913 version of telerik and the problem still persist.

This is how i use RadScheduler
<telerik:RadScheduler ID="DayViewScheduler" runat="server"
                                Height="960" ShowFooter="False" OverflowBehavior="Expand"
                                DataKeyField="Id" HoursPanelTimeFormat="hh:mm tt"
                                DataSubjectField="Subject" DataStartField="StartDate" ShowAllDayRow="False" ShowViewTabs="False"
                                DataEndField="EndDate" TimeLabelRowSpan="1" CustomAttributeNames="ServiceInstanceId,ServiceTypeValue,Details,ReservationColor,BlinkIndicator"
                                OnNavigationComplete="DayViewScheduler_NavigationComplete" OnDataBound="DayViewScheduler_DataBound"
                                OnAppointmentDataBound="DayViewScheduler_AppointmentDataBound" OnFormCreating="DayViewScheduler_FormCreating"
                                OnAppointmentDelete="DayViewScheduler_AppointmentDelete" OnAppointmentInsert="DayViewScheduler_AppointmentInsert"
                                OnAppointmentUpdate="DayViewScheduler_AppointmentUpdate" OnClientAppointmentResizeStart="OnClientAppointmentResizeStart"
                                OnAppointmentCreated="DayViewScheduler_AppointmentCreated"
                                OnClientAppointmentMoveEnd="onAppointmentMoveEnd" OnClientAppointmentResizing="onAppointmentResizing"
                                OnClientAppointmentResizeEnd="onAppointmentResizeEnd" EditFormDateFormat="dd/MM/yyyy"
                                EditFormTimeFormat="HH:mm" meta:resourcekey="DayViewSchedulerResource2"  Width="960px">
                                <MonthView UserSelectable="False" />
                                <WeekView UserSelectable="False" />
                                <TimelineView UserSelectable="False" />
                                <ExportSettings>
                                    <Pdf PageBottomMargin="1in" PageLeftMargin="1in" PageRightMargin="1in" PageTopMargin="1in" />
                                </ExportSettings>
                                <AdvancedForm Modal="True" />
                                <AppointmentTemplate>
                                    <div class="personPopupTrigger" rel='<%#Eval("Id")%>' url='<%=ResolveUrl("~") %>'>
                                        <%# FormatText(Eval("Subject")) %>
                                        <dx:ASPxImage ID="ASPxImage1" ImageUrl="~/CSS/images/alertAppointment.gif" runat="server"
                                            Visible='<%#Convert.ToBoolean(Eval("BlinkIndicator"))%>'>
                                        </dx:ASPxImage>
                                    </div>
                                </AppointmentTemplate>
                            </telerik:RadScheduler>
Bobi
Top achievements
Rank 1
 answered on 20 Oct 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?