Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
118 views
Hello,

I want to stop the grid from highlighting text when the user clicks, holds, and drags across the cell.  Is this possible?
Attached is an image of what I'm trying to avoid.
I want a single click to highligh the row (which works fine), a double click to return a postback (works fine), but don't want any text highlighted on single click / drag.

Thanks!
William
Top achievements
Rank 1
Iron
 updated answer on 26 Mar 2024
0 answers
5 views

I have a Telerik RadGrid that has a DetailTable that can be expanded by the user. The DetailTable contains several selectable rows. The user is able to select some rows, then click a "Process Data" button that saves the row data in a Visual Basic code-behind file.

The RadGrid uses HierarchyLoadMode="conditional" to keep track of the DetailTable.

Two Problems-

1. When a user:
    - expands the DetailTable,
    - selects a row,
    - collapses the DetailTable,
    - clicks "Process Data,"
no data is saved because RadGrid.SelectedItems has 0 items. Even though the selected row is shown as selected in the UI.

However, if a user:
    - selects a row,
    - collapses the detail table,
    - clicks "Process Data" + gets an error from the VB saying "No rows selected," 
    - expands the detail table again,
    - selects the row again,
    - clicks "Process Data" again,
then the data will be saved because RadGrid.SelectedItems will include the row. Perhaps this is a bug?

In other words, a post back is needed to clear the detail table selections before RadGrid.SelectedItems actually includes items that have been selected in a collapsed HierarchyLoadMode="conditional" table.

2. Is there a way to have selections persist across pagination? Eg. If the user expands the DetailTable, selects a row, navigates to "page 2" of the detail table, then navigates back to "page 1," their selection is not saved.

John
Top achievements
Rank 1
 asked on 25 Mar 2024
2 answers
44 views

We have an application which is using Telerik RadGrid controls - RadGrid.net2 dll.

Our security team has reported vulnerabilities in this application and a lot of them are in these RadControls, for example RadGrid.js client DOM stored code injection. They are looking us to fix these.

What is the solution for this?

Rumen
Telerik team
 answered on 21 Mar 2024
1 answer
14 views

Dear Sir,

Can I enable grid column total function like below screen? thanks

 

Rumen
Telerik team
 updated answer on 19 Mar 2024
1 answer
16 views

We have a RadAsyncUpload control on a page.  The "Select" button is displayed to allow the user to choose files.  All good.  What we'd like is a way to detect when the Select button is clicked to clean up other parts of the page. 

For example... we also have a RadGrid on the page.  The user might have a row open in an EditForm.  We'd like to close that edit form when the user clicks the Select button of the RadAsyncUpload control.  I don't see an obvious client side event for that, and the Select button doesn't trigger a server side event.  

Is there a client-side equivalent for the RadGrid ClearEditItems method that could be called as part of the click event on the RadAsyncUpload Select button?

Any suggestions would be appreciated.

Rumen
Telerik team
 answered on 13 Mar 2024
1 answer
19 views

Greetings,

I'm currently trying to revamp one of my pages from server side binding to a web service binding and encountered a hickup.

The page is as follows (see picture attached):

The Outside is a RadSplitter.
On the left side of the RadSplitter is an update panel, where inside is the RadTreeView.
On the right side, also inside an update panel, is a RadGrid.

The RadTreeView gets a basic set of nodes ("stations") on creation, but everything after that is loaded on demand by webservice. If a "station" is expaned, and the webservice is triggered and supplies nodes to the radgrid. This works correctly.
If I click on a "station", a client side event is triggered, which expands the node (therefore triggering the webservice and supplying nodes) and also calling the RadGrid to rebind (by client side). The Rebind triggers the OnNeedDataSource event of the RadGrid, where it loads its data server side. 

The problem is with the click & expand, as the nodes are then only briefly visible in the RadTreeView and immediately removed again.

Is this a know problem? What can I do? I need the nodes in the tree but also the data in the RadGrid.
I made a video of the error, but it seems I cannot upload the video here. I also created a very basic test project.

I'm using Telerik 2023.1.117.45.

Thank you in advance!

Vasko
Telerik team
 answered on 12 Mar 2024
0 answers
10 views

Hi,

I have following grind in Batch Edit mode, is it possible to change cboKAC DataSourceID in code behind or JS? In other words - how to access controls on EditTemplate in Batch Edit mode?

Thanks,

Alex

<telerik:RadGrid ID="grdLinks" runat="server" AllowSorting="true" AllowPaging="false" Width="300px" Height="120px">
    <ClientSettings><Scrolling AllowScroll="true" /><Selecting AllowRowSelect="true" /></ClientSettings>
    <MasterTableView CommandItemDisplay="Top" AllowFilteringByColumn="false" AllowSorting="false" EditMode="Batch" EnableViewState="True" Width="100%" AutoGenerateColumns="false"
        CommandItemSettings-ShowCancelChangesButton="false" CommandItemSettings-ShowSaveChangesButton="false" CommandItemSettings-ShowRefreshButton="false"
        NoMasterRecordsText="" ShowHeader="false">
        <EditFormSettings EditFormType="AutoGenerated" EditColumn-ButtonType="PushButton" />
        <Columns>
            <telerik:GridTemplateColumn HeaderText="Task" HeaderStyle-Width="150px" DataField="lfaNum" UniqueName="lfaNum">
                <ItemTemplate>
                    <a target='_blank'  href='XXX.aspx?Num=<%# Eval("lfaNum")  %>'><%# Eval("lfaNum")  %></a>
                </ItemTemplate>
                <EditItemTemplate>
                    <telerik:RadComboBox ID="cboKAC" DataTextField="lfaNum" DataValueField="lfaID" DataSourceID="dsLFA"
                        DropDownAutoWidth="Enabled" Filter="Contains" runat="server"
                        EnableAutomaticLoadOnDemand="True" ItemsPerRequest="20" ShowMoreResultsBox="true" EnableVirtualScrolling="true" CausesValidation="false">
                    </telerik:RadComboBox>
                </EditItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridButtonColumn CommandName="Delete" Text="Delete" ButtonType="ImageButton" UniqueName="DeleteButton" HeaderStyle-Width="30px" />
        </Columns>
    </MasterTableView>        
</telerik:RadGrid>

 

Alex Dybenko
Top achievements
Rank 2
 asked on 04 Mar 2024
0 answers
28 views

Hi All,

We are using the below code for xlsx format export using the Telerik.Web.UI.dll.

  "gridControl.ExportSettings.Excel.Format = GridExcelExportFormat.Xlsx;"

Is that enough to work in production? and advice if we purchase the DevCraft Ultimate, will it be working fine?

Dev
Top achievements
Rank 1
 asked on 01 Mar 2024
0 answers
17 views

I need to get a reference to a telerik control contained in the commanditemtemplate of a radgrid using javascript.

Given the following:


<CommandItemTemplate>
<asp:Table>
<asp:TableRow>
<asp:TableCell>
<telerik:RadComboBox runat=server ID="RadComboBox_CommandItem">


How would I get the reference to the ComboBox?

 

I've tried window.$find, $telerik.findControl and $telerik.findElement, but I keep getting a " CS0103: The name 'RadComboBox_CommandItem' does not exist in the current context"

ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
 asked on 27 Feb 2024
0 answers
20 views

I have a fairly standard data grid


<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" BackgroundPosition="Center" Skin="Default">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel" LoadingPanelID="RadAjaxLoadingPanel1">
	<asp:UpdatePanel ID="UpdatePanel2" runat="server">    
		<ContentTemplate>
		<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" EnableViewState="true" AutoGenerateColumns="false" Height="100%"
			AllowSorting="true" GroupingEnabled="false" EnableLinqExpressions="false" AllowCustomSorting="true"
			EnableHeaderContextMenu="false" OnNeedDataSource="RadGrid1_NeedDataSource" AllowMultiRowSelection="true" AllowPaging="false">
			<MasterTableView TableLayout="Fixed" ClientDataKeyNames="ID" AllowCustomPaging="true" AllowPaging="True" PageSize="50"/>
			<ClientSettings EnableRowHoverStyle="true">
				<Virtualization EnableVirtualization="true" InitiallyCachedItemsCount="50"
					LoadingPanelID="RadAjaxLoadingPanel1" ItemsPerView="50" RetrievedItemsPerRequest="50"/>
				<Scrolling AllowScroll="true" UseStaticHeaders="true"/>
				<Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true"/>
				<Selecting AllowRowSelect="True" UseClientSelectColumnOnly="true" CellSelectionMode="None" />
				 <ClientEvents OnKeyPress="KeyPress" />
			</ClientSettings>
			<PagerStyle Mode="NextPrevAndNumeric" PageSizeControlType="RadDropDownList" CssClass="TelerikPager"/>
		</telerik:RadGrid>
		</ContentTemplate>
	</asp:UpdatePanel>
</telerik:RadAjaxPanel>

I have 1007 items to show. Everything work fine, until I get to the last page, be it with scroll, clicking next pages, or jump to end button. For the last page (page 21, so index 20) the Grid in RadGrid1_NeedDataSource on it's MasterTableView.CurrentPageIndex has 19. So I return the wrong portion of the data.

Is something set up wrong or is there some other issue?

Up until that point everything is great, for page 19, index is 18, for 20 index is 19, and then for 21 it's again 19.

There is no rebind happening in the code and there is nothing really interesting happening on the server side code.

 

Valent
Top achievements
Rank 1
 asked on 22 Feb 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?