I recently discovered your "Mentions" feature in WinForms and am looking to produce a WebForms version of this. I did get close to creating this functionality; very close, actually. Building it within the RadEditor has proven to be problematic, as the HTML created by the Editor tended to wreak havoc on my code. It was pretty granular, in that I used character counts to track and locate "tagged"/"mentioned" users.
Is there a WebForms version of this coming soon? If not, can you offer some guidance on how to overcome some issues the Editor creates?
Hi ,
We are using Telerik ASP.Net AJAX version 2022.1.119.
Issue:
1. For From Date field from backend I am setting (current date -366 days) value for RadDatePicker , so it's not a current date, it's older date. Now via keyboard I cannot select the date.
But using mouse I selected some date then second time I can select date in calendar from keyboard.
2. The same issue available in DOB fields also. I have verified all the fields are editable fields only.
If I set RadDatePicker value as current date from backend then from keyboard I can select the dates perfectly. So the issue is available only if we set older dates from backend .
For POC we recently updated the 2022.3.1109.35 telerik version, but still the issue available in this 2022.3.1109.35 version too.
We used following prop to support keyboard navigation (EnableAriaSupport="true" EnableKeyboardNavigation="true").
Please let me know how can I resolve this.
Dear All,
I'm using radcontextmenu with radgrid. Normally right click event on all rows of radgrid is showing menus. It is ok. But after i drag and group roomtype column, some rows right click event is showing radcontextmenus and some rows right click event is showing browser default menus. When i debug in browser, showing "TypeError: Cannot read properties of undefined (reading 'getDataKeyValue')" in RadGridID.get_masterTableView().get_dataItems()[currentSelectedRowIndex].getDataKeyValue("ReservationKey")) of javascript file. I searched in google, but not found. Please ask me. What I need to change or code?
.aspx
<telerik:RadGrid ID="RadGrid1" EnableViewState="true" ViewStateMode="Enabled" GridLines="None" MasterTableView-GroupLoadMode="Server"
runat="server" ShowStatusBar="false" AllowSorting="true" ShowGroupPanel="true" ShowFooter="true"
OnNeedDataSource="grdReservation_NeedDataSource" OnSortCommand="grdReservation_SortCommand" OnItemDataBound="grdReservation_ItemDataBound" OnItemCommand="grdReservation_ItemCommand">
<MasterTableView AutoGenerateColumns="false" DataKeyNames="ReservationKey" ItemStyle-Wrap="true" Width="100%" GroupsDefaultExpanded="false"
ClientDataKeyNames="ReservationKey,Status,Remark,SubFolioBalance">
<Columns>
<telerik:GridBoundColumn DataField="Status" HeaderStyle-Width="25px" SortExpression="Status" UniqueName="Status">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ReservationType" HeaderStyle-Width="25px" SortExpression="ReservationType" UniqueName="Type">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Company" HeaderStyle-Width="160px" HeaderText="Group Name/Company" SortExpression="Company" ItemStyle-Wrap="false"
UniqueName="GroupNameCompany">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="RoomType" HeaderText="RoomType" SortExpression="RoomType" HeaderStyle-Width="80px"
UniqueName="RoomType">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Balance" HeaderStyle-Width="70px" HeaderText="Balance" SortExpression="Balance" ItemStyle-HorizontalAlign="Right"
UniqueName="Balance">
</telerik:GridBoundColumn>
</Columns>
<NoRecordsTemplate>
No Records
</NoRecordsTemplate>
</MasterTableView>
<ClientSettings AllowColumnsReorder="true" ReorderColumnsOnClient="true" AllowDragToGroup="true" EnableRowHoverStyle="true" AllowGroupExpandCollapse="false" AllowRowsDragDrop="true">
<Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
<Resizing AllowColumnResize="True" AllowRowResize="false" ResizeGridOnColumnResize="false" ClipCellContentOnResize="true" EnableRealTimeResize="false" AllowResizeToFit="true" />
<Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="380px" SaveScrollPosition="true" />
<ClientEvents OnRowDblClick="rowDblClick" OnRowSelected="OnRwSelected" OnRowMouseOver="OnRowMouseOver" OnRowContextMenu="rowContextMenu" />
</ClientSettings>
</telerik:RadGrid>
<telerik:RadContextMenu ID="RadContextMenu1" runat="server" EnableRoundedCorners="true" RenderMode="Lightweight" SkinID="MinimalSetOfTools" CssClass="centered-editor" Width="300px" EnableShadows="true"
OnClientItemClicking="onContextMenuItemClick"
OnClientShowing="onClientContextMenuShowing">
<DefaultGroupSettings ExpandDirection="Auto" Flow="Vertical" />
</telerik:RadContextMenu>
<script src="../JavaScripts/util/Utilities.js" type="text/javascript"></script>
<script src="../JavaScripts/util/WrapperRadGrid.js" type="text/javascript"></script>
<script src="../JavaScripts/bal/Reservation.js" type="text/javascript"></script>
<script src="../../JavaScripts/lib/jquery.blockUI.min.js" type="text/javascript"></script>
<script type="text/javascript">
function ReloadSelectedRow() {
var grid = $find("<%=grdReservation.ClientID%>");
var master = grid.get_masterTableView();
var scrollArea = document.getElementById(grid.get_element().id + "_GridData");
var row = master.get_selectedItems()[0];
currentSelectedRowIndex = row.get_itemIndex();
GlobalObjectControls.ResKey = row.getDataKeyValue("ReservationKey");
if (row) {
if ((row.get_element().offsetTop - scrollArea.scrollTop) + row.get_element().offsetHeight + 20 > scrollArea.offsetHeight) {
//scroll down to selected row
scrollArea.scrollTop = scrollArea.scrollTop + ((row.get_element().offsetTop - scrollArea.scrollTop) +
row.get_element().offsetHeight - scrollArea.offsetHeight) + row.get_element().offsetHeight + 150;
}
//if the position of the the selected row is above the viewable grid area
else if ((row.get_element().offsetTop - scrollArea.scrollTop) < 0) {
//scroll the selected row to the top
scrollArea.scrollTop = row.get_element().offsetTop;
}
}
}
</script>
<script type="text/javascript" id="commonMethods">
var GlobalObjectControls = {};
Sys.Application.add_load(
function loadHandler() {
Sys.Application.remove_load(loadHandler);
ReloadSelectedRow();
});
</script>
<script>
function rowContextMenu(sender, eventArgs) {
currentSelectedRowIndex = eventArgs.get_itemIndexHierarchical();
eventArgs.get_tableView().selectItem(eventArgs.get_itemIndexHierarchical());
var menu = GlobalObjectControls.ContextMenu;
var evt = eventArgs.get_domEvent();
menu.show(evt);
evt.cancelBubble = true;
evt.returnValue = false;
if (evt.stopPropagation) {
evt.stopPropagation();
evt.preventDefault();
}
}
function OnRwSelected(sender, args) {
GlobalObjectControls.ResKey = args.getDataKeyValue('ReservationKey');
currentSelectedRowIndex = args.get_itemIndexHierarchical();
}
function onClientContextMenuShowing(sender) {
enabledisableMenuItems();
}
function enabledisableMenuItems() {
var menu = GlobalObjectControls.ContextMenu;
alert("ok" + currentSelectedRowIndex); // this is ok, index is showing
var reservationkey = GlobalObjectControls.GridReservation.get_masterTableView().get_dataItems([currentSelectedRowIndex]
.getDataKeyValue("ReservationKey"); // this row is showing error "can't read properties of undefined
var status = GlobalObjectControls.GridReservation.get_masterTableView().get_dataItems()[currentSelectedRowIndex].getDataKeyValue("Status");
var reservationType = getReservationType();
menu.enable();
}
function onContextMenuItemClick(sender, args) {
}
</script>
I am having issues calling the asset_SN value from a grid that does have a value (see picture) and feel my syntax is wrong as it states there isnt an object and when I look at portion of file output it is blank in the debugger (attached error code).
Frontend:
<telerik:RadGrid ID="RadGrid" runat="server" RenderMode="Auto" AllowPaging="True" OnItemDataBound="RadGrid_ItemDataBound" OnNeedDataSource="RadGrid_NeedDataSource"
OnItemCommand="RadGrid_ItemCommand" OnItemCreated="RadGrid_ItemCreated" OnDeleteCommand="RadGrid_ItemDeleted" AllowSorting="true" AllowFilteringByColumn="true"
FilterType="HeaderContext" EnableHeaderContextMenu="True" EnableHeaderContextFilterMenu="True">
<telerik:GridBoundColumn DataField="asset_SN" FilterControlAltText="Filter asset_SN column" HeaderText="Serial Number" SortExpression="asset_SN" UniqueName="asset_SN"></telerik:GridBoundColumn>
Backend:
Dim assetSN As String = TryCast(editedItem.FindControl("asset_SN"), TextBox).Text
Error:
System.NullReferenceException: 'Object reference not set to an instance of an object.'Greetings all,
I have just discovered the margin properties in the PDFSettings sub-category of the RadClientExportManager.
Using the left & right margins, I could address some of my concerns as to how close the edge of the export comes to the edge of the displayed area, I cannot seem to make the bottom margin value work.
Across my exports, I am using:
RadClientExportManager1.PdfSettings.MarginLeft = "15"
RadClientExportManager1.PdfSettings.MarginRight = "15"
RadClientExportManager1.PdfSettings.MarginBottom = "30"
Can anyone let me know if there is a problem in setting the bottom margin, or any of the margins? Or even how the inner workings of the control handles blank space or padding around the indicated div?
Thanks in advance!
Hello,
Is any standard method to disable edit in the HTML mode available?
HTML mode must be visible to show output code, but now allowed for users to edit using it, only using Design.
Thank you.
Hello, At this time 3 edit modes are available. I wanted to add "Preview Accepted" mode, which will work like Preview + will show content as already Accepted. Because it is very helpful for user to be sure that after Accept all will be fine.
Alternative option to show button in the View tab of the RibbonBar, but Mode toolbox div is more preferable place.
Thank you.
Good evening,
I'm trying to export a RadGrid to xlsx using RadGrid_ItemCommand and RadGrid.ExportToExcelCommandName.
I have a template column:
<telerik:GridTemplateColumn HeaderText="Column1" SortExpression="Column1" DataField="Column1" UniqueName="Column1" ColumnGroupName="Column1Data" AllowFiltering="false">
<EditItemTemplate>
<telerik:RadTextBox ID="txtColumn1" runat="server" RenderMode="Lightweight" MaxLength="6" Width="200px" Text='<%# Bind("Column1") %>' />
<asp:RequiredFieldValidator ID="reqColumn1" runat="server" ControlToValidate="txtColumn1" CssClass="standard-text" ErrorMessage="RequiredFieldValidator" Text="This field is required" />
</EditItemTemplate>
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem, "Column1", "{0:@}")%>
</ItemTemplate>
</telerik:GridTemplateColumn>
It contains up to 6 alphanumeric characters e.g.:
When the value 07E3 is exported to xlsx (and there are other similar values that give this behaviour) it is exporting as Scientific format:
What can be done to make sure it is displayed as Text format in Excel, without having to use an Excel template file?
Kind regards,
Richard