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

I run my ASP.NET WebForm with C# Project, its appear some error message as below:

I try to add signalr mechanism. PassPDFRequest is the javascript function to send data to signalr server. But I also have another problem I cannot add valiad breakpoint in the aspx for debugging the javascript code. So I cannot see the parameters of the PassPDFRequest function in aspx.

I run the PassPDFRequest with RadScriptManager. I also used the ScriptManager. But the error message are the same.

Does somebody know how to solve this problem?

string szJs = "PassPDFRequest('" + ViewState["HospArea"].ToString() + "','" + pdfPath + "','" + szPathHttp + "','" + szPathPhy + "'," + pageIndex.ToString() + "," + isOpen.ToString() + ");";
RadScriptManager.RegisterStartupScript(this, this.GetType(), "KeyPassPDFRequest", szJs, true);

 

Uncaught ReferenceError: True is not defined   Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts…:15 Uncaught ReferenceError: True is not defined
    at <anonymous>:1:296
    at Sys._ScriptLoader._loadScriptsInternal (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts…:15)
    at Sys._ScriptLoader._loadScriptsInternal (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts…:15)
    at Sys._ScriptLoader._loadScriptsInternal (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts…:15)
    at Sys._ScriptLoader._nextSession (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts…:15)
    at Sys._ScriptLoader._loadScriptsInternal (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts…:15)
    at Sys._ScriptLoader._nextSession (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts…:15)
    at Sys._ScriptLoader.loadScripts (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts…:15)
    at Sys.WebForms.PageRequestManager._onFormSubmitCompleted (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts…:15)
    at Array.<anonymous> (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts…:6)
章民
Top achievements
Rank 1
 asked on 13 Jun 2017
6 answers
2.0K+ views
I have a RadGrid with 3 checkbox columns with a checkbox in the header of those 3 columns. I'm trying to check/uncheck only the checkboxes belonging to the column whose header checkbox is checked.

With the code that I have  even though I'm checking/unchecking checkbox of only one header, it is checking/unchecking all the checkboxes in all the 3 columns


How do I change my code to check/uncheck only the checkboxes belonging to the header checkbox that has been checked/unchecked?


Appreciate your help!

            var gridToCheckAll = '<%= rgrdTrips.ClientID %>';
 
            function checkAllRows(sender) {
                var checked = sender.checked;               
                var container = document.getElementById(gridToCheckAll);
                var checkboxes = container.getElementsByTagName('input');
                for (var i = 0, l = checkboxes.length; i < l; i++) {
                    if (checkboxes[i] != sender && !checkboxes[i].disabled)
                        checkboxes[i].checked = checked;
                }
            }
 
<telerik:RadGrid ID="rgrdTrips" runat="server" AutoGenerateColumns="true" AllowPaging="false"
        AllowMultiRowSelection="true" AllowSorting="true">
        <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="Trip_ID">
            <Columns>
                <telerik:GridTemplateColumn HeaderText="<input type='checkbox' id='checkAll' onclick='checkAllRows(this);'>"
                    HeaderStyle-Width="50px" UniqueName="Select">
                    <HeaderTemplate>
                        <asp:CheckBox ID="checkAll" runat="server" onclick="checkAllRows(this);" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="cboxSelect" runat="server" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <%-- <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn1">
                </telerik:GridClientSelectColumn>--%>
                <telerik:GridTemplateColumn HeaderText="<input type='checkbox' id='ResAvail' onclick='checkAllRows(this);'>"
                    HeaderStyle-Width="50px" UniqueName="ResourceAvailable">
                    <HeaderTemplate>
                        <asp:CheckBox ID="ResAvail" runat="server" onclick="checkAllRows(this);" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="cboxResAvailSelect" runat="server" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
                <telerik:GridTemplateColumn
                    HeaderStyle-Width="50px" UniqueName="RequestHelp">
                    <HeaderTemplate>
                        <asp:CheckBox ID="RqstHelp" runat="server" onclick="checkAllRows(this);" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="cboxRqstHelpSelect" runat="server" />
                    </ItemTemplate>
                </telerik:GridTemplateColumn>
            </Columns>
            <CommandItemTemplate>
                <asp:Button ID="btnExportAll" runat="server" Text="Export All" OnClientClick="showModalPopup('Are you sure you want to export all the trips?'); return false;" />
                <asp:Button ID="btnExportSelected" runat="server" Text="Export Selected" OnClick="ExportSelectedTrips" />
            </CommandItemTemplate>
        </MasterTableView>
        <ClientSettings>
            <Selecting AllowRowSelect="true"></Selecting>
        </ClientSettings>
    </telerik:RadGrid>
yuvaraj
Top achievements
Rank 1
 answered on 13 Jun 2017
0 answers
92 views

I have been using RadAsyncUploader to upload the files in my web application and it was working fine on all the instance Local, UAT as well as on Prodection Server.But now some time it does not upload the file(for detail error find the attachement). For example : When i upload any file on my local environment it works fine but when i rty to upload same file on UAT or Production server from my local machine it does not upload but the same time i try to upload same file on UAT or Production from UAT or Production machine it upload sucessfully.

Here my understanding is if there are some bug in my code then i should not able to upload any file from any environment or any machine.

Don
Top achievements
Rank 1
 asked on 13 Jun 2017
3 answers
446 views
Hi all!

In my Radgrid I inserted a <HeaderTemplate> with a checkbox where it checks/unchecks all the checkbox items. Now if I check/uncheck on of these checkbox items, I want to check/uncheck the header checkbox, but I can't find how.

I'm doing this client side via javascript. Can't do it server side.

function CheckReview(chk) {
   var grid = $find("<%=RadGrid.ClientID %>");
   var masterTable = grid.get_masterTableView();
 
   var flag = true;
 
   //this line doesn't find the header control
   var gridHeaderElement = masterTable.get_dataItems()[0].findElement("chkH");
                     
   for (var i = 0; i < masterTable.get_dataItems().length; i++) {
      if (!chk.checked) {
         flag = false;
      }
   }
 
   if (flag) {
      gridHeaderElement.checked = true;
   }
   else {
      gridHeaderElement.checked = false;
   }
}

yuvaraj
Top achievements
Rank 1
 answered on 13 Jun 2017
1 answer
183 views

Hi, We are using Telerik 2017.1.228.45 RadTree controls. We have implemented RadTree contract inside a usercontrol and it's getting called through a master page. all Radtree nodes has a customUrl field populated,so when they are clicked on the same page, a user control appears and when some changes are made to that user control and is closed, RadTree loses its expanded state.

 

Is there a way to persist RadTree in that expanded state please? if yes, then how?

 

Thank you

Eyup
Telerik team
 answered on 13 Jun 2017
1 answer
179 views

Would it be possible to take the following recordset example and divide into multiple columns and then rows?  Currently we use a repeater to accomplish the goal but like the styling of the grid.  The RadGrid would give us more control of styling and exporting of the data much easier.

state   TotalCUs    TotalExcess TotalQualified
AL  4   3   0
CA  18  10  1
CO  1   1   0
DC  2   2   0
FL  6   6   0
GA  1   1   0

 

What we would like is to have 3 columns and then however many rows to complete the recordset.

state   TotalCUs    TotalExcess TotalQualified
AL  4   3   0   CA  18  10  1   CO  1   1   0
DC  2   2   0   FL  6   6   0   GA  1   1   0
ID  8   3   0   IL  26  9   0   IN  18  4   0
KS  1   1   0   KY  2   2   0   MD  2   0   0
ME  4   4   0   MI  4   3   0   MN  5   4   1
MO  5   5   0   NH  2   2   0   NJ  3   3   0
NV  7   4   0   OH  61  19  0   OK  2   2   0
OR  1   1   0   PA  6   6   0   TX  9   5   0
WA  2   2   0

Thanks for your help in advance.

Eyup
Telerik team
 answered on 13 Jun 2017
0 answers
64 views

Hi guys,

I need to create entirely RadWindow pop up screen from C# class library.

How can I do that?

thanks.

Vitaly.

Vitaly
Top achievements
Rank 1
Iron
Iron
 asked on 12 Jun 2017
0 answers
140 views

I want to implement this on our admin sites & been looking at the demos, particularly the default save options. The issue is we save images in various locations. I am presuming that the 'Save on Server' option uses the path in ImageUrl, so saving it just in one place will not be applicable in this case. So I was thinking of hiding or disabling that option, and hide the overwrite check box, to only have 'Download Image' as the only option?

Now, what I might end up doing is implementing the custom save option and have a dropdown of all the various image paths on the site to save to when the user is saving. However, can you look into my query above and see if that is an option?

Also, is there a way to add a custom aspect ratio to the dropdown in the crop function?

Paul
Top achievements
Rank 1
Iron
 asked on 12 Jun 2017
0 answers
146 views

 

I use a combination of different controls in an ASP.Net Repeater. Included are now already 2 RadComboBoxes. I add the SelectedIndexChanged to them in this way:

for (var i = 0; i < aClientIds.length; i++) {<br>     var comboBox = $find(aClientIds[i]);<br>     var id = comboBox.get_id();<br>     comboBox.add_selectedIndexChanged(ddlList_SelectedIndexChanged);<br>}

The list of ClientIds are saved to a hidden field from Codebehind and retrieved to a JavaScript array in the js.file associated with the usercontrol where the Repeater is shown. Works nicely. I also must include a RadDatePicker and attach ClientEvents-OnDateSelected in the same way. Already have this working and get the correct id:

for (var i = 0; i < aDateClientIds.length; i++) {<br>     var calendar = $find(aDateClientIds[i]);<br>     var id = calendar.get_id();<br>     alert('id:' + id);<br>}

But how do I attach ClientEvents-OnDateSelected from JavaScript? I can't find this in the Telerik documentation or on Google.

My Company uses Telerik.Web.UI  version 2015.3.1111.45
 

Jorgen Vester
Top achievements
Rank 1
 asked on 12 Jun 2017
1 answer
72 views

Hey, 

So I'm using the RadScheduler and I have Agenda View enabled, but I've noticed that anytime I click on it, the scheduler displays the agenda for the next week, not the current week. Any ideas why this could be? 

<telerik:RadScheduler ID="RadScheduler1" runat="server" DataKeyField="ID" AllowInsert="False" DataSubjectField="Subject"
                    DataStartField="StartDate" DataEndField="EndDate" FirstDayOfWeek="Monday" LastDayOfWeek="Friday" ReadOnly="True" SelectedView="WeekView" Height="650px" WorkDayEndTime="18:00:00">

                    <ExportSettings>
                        <Pdf PageTopMargin="1in" PageBottomMargin="1in" PageLeftMargin="1in" PageRightMargin="1in"></Pdf>
                    </ExportSettings>
                    <TimelineView UserSelectable="False" />
                    <AgendaView ReadOnly="True" UserSelectable="True" ResourceMarkerType="Bar" NumberOfDays="5" />

 </telerik:RadScheduler>

TanChen
Top achievements
Rank 1
 answered on 09 Jun 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?