Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
819 views

Hello,

Is there any event, if I select some item from DropDownList?

Yes, I know, there is onEntryAdded and onClientEntryAdded events, but only if mode is set to Token, and moreover this events are fired also when AutoCompleteBox lost focus.

I need to things:
1. set AllowCustomEntry to "true"
2. read item value, when user select some item from DropDownList

How can I do it?

Thanks
Jan

Vessy
Telerik team
 answered on 14 Jun 2017
0 answers
105 views

First Issue,I have two controls (a radcombox and a Treelist controls) on my page which SelectedIndexChanged populating data from database.Now I want to fire NeedDatasource event on SelectedIndexChanged. How I could do that ?

 

Second issue,

As I am facing some issues with needdatasource, I have manually binded using databind method of radtreelist.After binding it shows only parent nodes at first.

After clicking on PageSize combo it loads with respective child nodes.Why this is happening here ?

Suvankar
Top achievements
Rank 1
 asked on 14 Jun 2017
13 answers
467 views
I have tried searching for this problem, so if this is a re-post please link to the original.

I have two RadComboBoxes inside a RadAjaxPanel (the latter is actually in a MasterPage), along with a regular ASP.NET Button control. When I click the button, I go through some simple validation to see if the user selected an item in each RadComboBox. If not, I make a <div> element visible with an error message, and exit the subroutine.

This works fine. However, after the button click and error message is displayed, the RadComboBox controls are disabled. They don't look grayed out, but clicking the drop down arrow does nothing, and mousing over the controls doesn't produce the normal "highlight" effect that shows when controls are active.

Regular ASP.NET DropDownLists do not produce this behavior. I'd really like to use the RadComboBox because I want the checkbox feature of it, but if I can't get this figured out in a couple hours I'll have to switch to ListBox controls.

Any idea what's wrong here?

Thank you,

Adam
Peter Milchev
Telerik team
 answered on 14 Jun 2017
4 answers
347 views

I am having serious issues with Telerik controls not loading on the page without multiple refreshes.

Here is an example of how the HTML editor looks when it fails to load. This happens to pretty much all controls.

Using version: Telerik_UI_for_ASP.NET_AJAX_2015_3_930_Dev

No errors are being thrown on the server.

 

Omar
Top achievements
Rank 1
 answered on 14 Jun 2017
2 answers
486 views

Hello,

I was looking for a way to allow my users to customize their interface, and to choose the columns order of some grids.
I choose a client side reordering as I don't want the data to be reloaded (too long) and the ongoing modification lost (GridEditMode.Batch).

In order to save the preference of the user, I susbcribed to the "onColumnSwapped" event. Then my javascript function calls "ajaxManager.ajaxRequest" (which save the new columns order into my database)

First issue: in my "RadAjaxManager1_AjaxRequest" (server side), if I look the OrderIndex of the columns of my grid, they have their original values. Is this normal ?

I could decide to save the profil with a custom button "Save Column Order" (I tried and the OrderIndex are the correct / changed ones)  but I want to avoid adding another button to my interface.

As I already have the column order stored server side, I decided to simply send the two argument from the javascript to my server function:

var sourceIndex = eventArgs.get_gridSourceColumn().get_element().cellIndex;
var destinationIndex = eventArgs.get_gridTargetColumn().get_element().cellIndex;

Then I make the change myself server side and save it to the database.

It works well with GridClientSettings.GridColumnsReorderMethod.Swap.

However it doesn't work with GridClientSettings.GridColumnsReorderMethod.Reorder. The javascript event is called multiple times (swapping multiple time) but the ajax request is called only 1 time ! (the last time).

Example: If I move the 4th columns to position 1.
The javascript event is called 3 times with the following parameters (source, destination):
4,3
3,2
2,1

And my AjaxRequest is called only 1 time with the following parameters (source, destination):
2,1

Any suggestions ?

Thank you

Guilhem
Top achievements
Rank 1
 answered on 14 Jun 2017
1 answer
99 views

Hi,

The image does not appear in Chrome on Android (Version 55.0.2883.91). On Windows, the image is displayed correctly.

The version of Telerik.Web.UI is 2017.1.228.40.

My code is:

<telerik:RadDatePicker ID="rdpLieferTermin" runat="server" Culture="de-CH" Skin="Bootstrap">
    <Calendar runat="server" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x"
    Skin="Bootstrap"></Calendar>
    <DateInput runat="server" DisplayDateFormat="dd.MM.yyyy" DateFormat="dd.MM.yyyy" onchange="validateText(this)"
    onkeyup="validateText(this)"></DateInput>                                      
</telerik:RadDatePicker>

 

See attached files (on windows: File1.png, on Android: File2.png)

Thank you for your help!

Sébastien
Top achievements
Rank 1
 answered on 13 Jun 2017
0 answers
823 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
87 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
442 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?