Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
101 views
How can i download the Telerik Asp.Net ajax 2016 version?
Rumen
Telerik team
 answered on 30 Jul 2024
1 answer
65 views

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?

 

Rumen
Telerik team
 answered on 30 Jul 2024
0 answers
76 views

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.

Thillairaja
Top achievements
Rank 1
 updated question on 29 Jul 2024
1 answer
104 views
I was curious if anyone could point me in the right direction on how to show a webpage within telerik controls. I am not sure where to start on this and cant seem to find any relevant information.
Rumen
Telerik team
 answered on 23 Jul 2024
1 answer
87 views

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>

Vasko
Telerik team
 answered on 19 Jul 2024
1 answer
63 views

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.'

TryCast(..., System.Web.UI.WebControls.TextBox) returned Nothing.


Vasko
Telerik team
 answered on 19 Jul 2024
1 answer
113 views

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! 

Adam
Top achievements
Rank 1
Iron
 answered on 15 Jul 2024
1 answer
82 views

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.

Rumen
Telerik team
 updated answer on 12 Jul 2024
1 answer
108 views

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.

Rumen
Telerik team
 answered on 11 Jul 2024
1 answer
96 views

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

Vasko
Telerik team
 answered on 11 Jul 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?