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

I'm using ASP.net AJAX AsyncUpload 2016 2 504, is it possible to upload files using CORS, i'm trying to upload files to Box e.g.: https://www.box.com/blog/uploading-files-with-cors/ 

Thanks,

Plamen
Telerik team
 answered on 15 Jul 2016
5 answers
672 views
Hi,
how we can use the telerik components to upload multiple files selecting a directori o select it with a file explorer?

Thanks
Ivan Danchev
Telerik team
 answered on 14 Jul 2016
4 answers
121 views

Hi

I think that I found a bug.

Take a radnumeric, set decimaldigits zero.

use client event valuechanging like this:

                function valueChanging(sender, args) {
                    alert(args.get_newValue());
                }

If I digit "0,4" I'm expecting in the args.get_newValue() just 0 and not 0.4!

I think that the "." or "," (depends on cultureinfo, ok) not even should be arrived to the input, just like any alphanumeric character that is not a number!

Why you allow decimal digit in that event if I set decimaldigits zero? I don't want to use valueChanged.

Just.. I think that the radnumeric settings should be considered before any event.

All of this is on last ui for ajax version 2016.2.607.45

Thank you.

Regards

Fabio

Fabio
Top achievements
Rank 1
 answered on 14 Jul 2016
1 answer
123 views

I have an application for training attendance where a column in the database is a varchar but when editing the record they want a dropdown with Yes|No values. That is fine however, when updating the the records the UpdateCommand does not the dropdown values in the Hashtable.

BTW - the edimode for the grid is "InPlace".

Any help would greatly be appreciated. Thanks

 

ASPX

<telerik:GridTemplateColumn DataField="Attended" HeaderText="Attended" AllowFiltering="false">
                    <ItemTemplate>
                        <asp:Label ID="AttendedLabel" runat="server" Text='<%# Eval("Attended") %>'></asp:Label>
                    </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadDropDownList ID="ddAttended" runat="server" Width="55px">
                        <Items>
                            <telerik:DropDownListItem Text="" />
                            <telerik:DropDownListItem Text="Yes" />
                            <telerik:DropDownListItem Text="No" />
                        </Items>
                    </telerik:RadDropDownList>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>

VB

 

Protected Sub rgCourse_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs)
        If (e.CommandName = "UpdateAll") Then
            For Each editedItem As GridEditableItem In rgCourse.EditItems
                Dim newValues As Hashtable = New Hashtable
                'The GridTableView will fill the values from all editable columns in the hash
                e.Item.OwnerTableView.ExtractValuesFromItem(newValues, editedItem)
                dsCourses.UpdateCommand = String.Format("Update vwCurrentCourse SET Attended='{0}' WHERE Registration_ID='{1}'", newValues("Attended").ToString(), editedItem.GetDataKeyValue("Registration_ID").ToString())
                dsCourses.Update()
 
                editedItem.Edit = Falsetable
            Next
        End If
        rgCourse.Rebind()
    End Sub

Eyup
Telerik team
 answered on 14 Jul 2016
1 answer
83 views
I'm having an issue where the RadGrid ExportToExcel() method is generating output that includes a header item "<meta http-equiv="Content-Type" content="text/html; charset=utf-8">" in addition to the the header also showing a content-Type of "application/vnd.ms-excel (found via chrome dev tools or fiddler).  Our security scanning software is returning an error saying Multiple content types are specified.  Is there a way to get rid of the <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> content that is output in the response?
Kostadin
Telerik team
 answered on 14 Jul 2016
1 answer
149 views

Hi,

From my TileClicked method in javascript I would like to check whether the Ctrl/Shift key is hold during the click so I can implement different behavior in that cases. 

In Chrome I can use window.event to check this, but in Firefox the event is not accessible this way. I need the original click event of the dom element for that. Could this be provided through the TileClicked event as a parameter?

Marin Bratanov
Telerik team
 answered on 14 Jul 2016
1 answer
159 views

this is my code in javascript, by using asp.net gridview .Now i am trying to convert it to the Radgrid code using javascript but i cant find the suitable  value.

plz look below asp.net gridview  javascript code.

  var varRow1 = 0;
        var varcol = 0;
        var varIndex = 0;
        function fApplyToAllMenu(e, varLoop, varcell, varObj) {
            if (document.getElementById('<%=gvDetails.ClientID %>') != null) {
                var SelectAllObj = new Object();
                SelectAllObj = document.getElementById("<%=divApplyToAll.ClientID %>");
        
                var xPosition = getPosition(e).x + 15;
                var yPosition = getPosition(e).y + 5;
                SelectAllObj.style.position = "absolute";
                SelectAllObj.style.top = String(yPosition) + "px";
                SelectAllObj.style.left = String(xPosition) + "px";
                SelectAllObj.style.display = "inline";
                varIndex = varObj.parentNode.parentNode.rowIndex ;
        
                //varRow1 = varLoop;
                varRow1 = varObj.parentNode.parentNode.rowIndex ;
                if (varRow1 == 0)
                    varRow1 = 1;
                varcol = varcell;
            }
            return false;
        }
        
        function fApplyToAll() {
            if (document.getElementById('<%=gvDetails.ClientID %>').rows[varRow1].cells[varcol].getElementsByTagName('INPUT')[0] != null) {
                if (document.getElementById('<%=gvDetails.ClientID %>').rows[varRow1].cells[varcol].getElementsByTagName('INPUT')[0].readOnly == false) {
                    if (document.getElementById('<%=gvDetails.ClientID %>') != null)
                        if (document.getElementById('<%=gvDetails.ClientID %>').rows.length > 0)
                            for (var i = Number(varRow1); i < document.getElementById('<%=gvDetails.ClientID %>').rows.length - 1; i++) {
                                if (document.getElementById('<%=gvDetails.ClientID %>').rows[i + 1].cells[varcol].getElementsByTagName('INPUT')[0] != null)
                                    document.getElementById('<%=gvDetails.ClientID %>').rows[i + 1].cells[varcol].getElementsByTagName('INPUT')[0].value = document.getElementById('<%=gvDetails.ClientID %>').rows[varRow1].cells[varcol].getElementsByTagName('INPUT')[0].value;
                            }
                }
            }
            if (document.getElementById('<%=gvDetails.ClientID %>').rows[varRow1].cells[varcol].getElementsByTagName('SELECT')[0] != null) {
                if (document.getElementById('<%=gvDetails.ClientID %>').rows[varRow1].cells[varcol].getElementsByTagName('SELECT')[0].disabled == false) {
                    if (document.getElementById('<%=gvDetails.ClientID %>') != null)
                        if (document.getElementById('<%=gvDetails.ClientID %>').rows.length > 0)
                            for (var i = Number(varRow1); i < document.getElementById('<%=gvDetails.ClientID %>').rows.length - 1; i++) {
                                if (document.getElementById('<%=gvDetails.ClientID %>').rows[i + 1].cells[varcol].getElementsByTagName('SELECT')[0] != null) {
                                    document.getElementById('<%=gvDetails.ClientID %>').rows[i + 1].cells[varcol].getElementsByTagName('SELECT')[0].value = document.getElementById('<%=gvDetails.ClientID %>').rows[varRow1].cells[varcol].getElementsByTagName('SELECT')[0].value;
                                   
                                }   
                            }
                }
            }

}

 

And this is my code. for Radgrid which i am using.

 

 var varRow1 = 0;
        var varcol = 0;
        var varIndex = 0;
        
        function fApplyToAllMenu(e, varLoop, varcell, varObj) {
            debugger;
            var grid = $find("<%= griddetails.ClientID %>");
            if (grid != null) {
                var SelectAllObj = new Object();
                SelectAllObj = document.getElementById("<%=divApplyToAll.ClientID %>");
                
                var xPosition = getPosition(e).x + 15;
                var yPosition = getPosition(e).y + 5;
                SelectAllObj.style.position = "absolute";
                SelectAllObj.style.top = String(yPosition) + "px";
                SelectAllObj.style.left = String(xPosition) + "px";
                SelectAllObj.style.display = "inline";
                varIndex = varObj.parentNode.parentNode.rowIndex;

                varRow1 = varObj.parentNode.parentNode.rowIndex;
                if (varRow1 == 0)
                    varRow1 = 2;
                varcol = varcell + 2;
            }
           
            return false;
        }
        
        function fApplyToAll() {
            debugger;
            var grid = $find("<%= griddetails.ClientID %>");
            var MasterTable = grid.get_masterTableView();
            var Rows = MasterTable.get_dataItems();
     
            var elements = grid.getElementsByTagName("*");
            for (var i = 0; i < elements.length; i++) {
                var element = elements[i];
                if (element.id.indexOf(serverID) >= 0)
                    return element;
            }

            if (MasterTable.getCellByColumnUniqueName(Rows[varRow1].cells[varcol]).getElementsByTagName('INPUT')[0] != null) {
                if (Rows[varRow1].cells[varcol].getElementsByTagName('INPUT')[0].readOnly == false) {
                    if (grid != null) {
                        if (Rows.length > 0) {
                            for (var i = Number(varRow1) ; i < Rows.length; i++) {
                                if (Rows[i + 1].cells[varcol].getElementsByTagName('INPUT')[0] != null) {
                                    Rows[i + 1].cells[varcol].getElementsByTagName('INPUT')[0] = Rows[varRow1].cells[varcol].getElementsByTagName('INPUT')[0].value;
                                }
                            }
                        }
                    }
                }
            }
        
            if (Rows[varRow1].cells[varcol].getElementsByTagName('SELECT')[0] != null) {
                if (Rows[varRow1].cells[varcol].getElementsByTagName('SELECT')[0].disabled == false) {
                    if (grid != null) {
                        if (Rows.length > 0) {
                            for (var i = Number(varRow1) ; i < Rows.length; i++) {
                                if (Rows[i + 1].cells[varcol].getElementsByTagName('SELECT')[0] != null) {
                                    Rows[i + 1].cells[varcol].getElementsByTagName('SELECT')[0] = Rows[varRow1].cells[varcol].getElementsByTagName('SELECT')[0].value;
                                }
                            }
                        }
                    }
                }
            }

}

 

 

This code working for if i select checkbox in radgrid, then press my right click of mouse, then context menu open on click on that  then all the below checkbox get also checked.
I am attaching the image file for this.

Viktor Tachev
Telerik team
 answered on 14 Jul 2016
2 answers
103 views

When i try to filter dynamically created column ii get "is neither a DataColumn nor a DataRelation for table .. "

Ideas?

David
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 14 Jul 2016
2 answers
170 views

In the OnItemDeleted event of RadDataForm there is a method for retrieving the deleted record (e.Item.ExtractValues()) and e.Item.SavedOldValues.  After successfully deleting a row I am finding that both the method and property listed above returns null.  This should not be the case -- in RadGrid and other controls these fields are populated.  What is the prescribed approach for accessing deleted data in an OnItemDeleted event?  (I also tried OnItemDeleting).  Any feedback is appreciated.

 

Thanks,

Shaun

Kostadin
Telerik team
 answered on 14 Jul 2016
1 answer
154 views

I've created a dynamic grid which allows me to load different sets of data.  I've now turned it into a widget so it can be placed and configured multiple times on a page.  The problem I have now is I'm receiving this error when I load more than one widget.  

There must be only one instance of RadStyleSheetManager per page. 

Same is true for the RadPersisgenceManager.  How might I overcome this issue so I can load multiple controls dynamically on a page?

Eyup
Telerik team
 answered on 14 Jul 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?