How to get the primary key value in DeleteCommand event of a RadGrid

4 Comments

First of all you should set the MasterTableView.DataKeyNames property of the RadGrid to the primary key columns: <MasterTableView DataKeyNames="Id"> <telerik:RadGrid ID="customerOverviewRadGrid" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="customersDS" EnableLinqExpressions="false" runat="server" ondeletecommand="customerOverviewRadGrid_DeleteCommand" > <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle> <MasterTableView DataKeyNames="Id"> <Columns>

Exception on filtering a telerik RadGrid

0 Comments

I was getting an error when I filtered a telerik RadGrid:   Error System.Web.HttpUnhandledException (0x80004005): Exception of type ‘System.Web.HttpUnhandledException’ was thrown. —> No property or field ‘Name’ exists in type ‘EntityBase2’ (at index 5) at

Using the Telerik GridHyperlinkColumn

7 Comments

I wanted a GridHyperlinkColumn to have a static text   DataTextField, contains the datasource columns that can be used in the property “DataTextFormatString” DataTextFormatString, is used to display the text of the hyperlink. Must be

Set initial sorting on a Telerik RadGrid column

0 Comments

If you want to set an initial sorting on a column on a Telerik RadGrid, use the “NeedDataSource” event and add a GridSortExpression to the MasterTableView.SortExpressions protected void RadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) { // Set

Set initial filter on GridDateTimeColumn in a Telerik RadGrid

3 Comments

If you want to set an initial filter on a Telerik RadGrid, use the “NeedDataSource” event and set the MasterTableView.FilterExpression and use the function MasterTableView.GetColumnSafe protected void RadGrid_NeedDataSource(object source, GridNeedDataSourceEventArgs e) { // Set datasource

How to disable beep when pressing enter on telerik RadGrid

0 Comments

If you are using the <asp:ScriptManager in you’re master page and press enter for filtering the RadGrid, you might hear a beep. Solution This can be avoided by changing the <asp:ScriptManager to <terlerik:RadScriptManager Note: you