What is the best way to remove the style tag from tables (table, tr, td tags)?
I've been working with the OnClientPasteHtml event but I don't know how to reference the pasted content or the most effective way to accomplish this. Anyone have any ideas?
Is it possible to export the Scheduler as a PDF document in memory? I dont want the PDF to open in the current window or in another window. I wish to load the PDF in memory so i can either save it to a database or manipulate the PDF to merge it with another PDF.
Thanks
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,
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
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
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?
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.
When i try to filter dynamically created column ii get "is neither a DataColumn nor a DataRelation for table .. "
Ideas?