Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
1.0K+ views
 My radgrid paging is not showing.
My code is:
<telerik:RadGrid ID="rdtgContactUs" runat="server" AutoGenerateColumns="False" GridLines="None" 
                                AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" OnInit="rdtgContactUs_Init" 
                                OnNeedDataSource="rdtgContactUs_NeedDataSource" OnItemCommand="rdtgContactUs_ItemCommand" 
                                AllowMultiRowSelection="true" PageSize="25" PagerStyle-Mode="NextPrevAndNumeric" 
 > 
                         
                                <PagerStyle AlwaysVisible="True"  Position="TopAndBottom"  /> 
                                <ClientSettings> 
                                    <Selecting AllowRowSelect="true" /> 
                                </ClientSettings> 
                                <GroupingSettings CaseSensitive="false" /> 
                                <MasterTableView DataKeyNames="ContactID,Replied"
                                    <RowIndicatorColumn> 
                                        <HeaderStyle Width="20px"></HeaderStyle> 
                                    </RowIndicatorColumn> 
                                    <ExpandCollapseColumn> 
                                        <HeaderStyle Width="20px"></HeaderStyle> 
                                    </ExpandCollapseColumn> 
                                    <HeaderStyle Font-Bold="true" /> 
                                    <Columns> 
                                         
                                    </Columns> 
                                </MasterTableView> 
                            </telerik:RadGrid> 
I'm using RadControls for ASP.NET AJAX Q1 2010.
The grid is inside an update panel.
Sarang
Top achievements
Rank 1
 answered on 09 Jan 2017
1 answer
79 views

I have a Telerik RadGrid within a .ascx (user control) that requires a *_NeedDataSource method to populate the grid's DataSource.

The same user control is doing some user authentication, simply checking HttpContext.Current.User.Identity.IsAuthenticated and doing a Response.Redirect(url, false) if it is false.

I'm seeing exceptions being raised on our live system due to the *_NeedDataSource method being called when the user is not logged in, this seems to be possible because I pass false as the value of the endResponse parameter to Response.Redirect. The original author coded it this way as I assume he was going on the guidance of the community:

  1. http://stackoverflow.com/questions/947197/using-endresponse-in-a-response-redirect
  2. https://blogs.msdn.microsoft.com/tmarq/2009/06/25/correct-use-of-system-web-httpresponse-redirect/

I've been trying to work out a way that I can reliably prevent execution of *_NeedDataSource without reverting to an endResponse value of true.

I can think of some ways which involve flag setting and checking but that seems inelegant and subsequent developers could forget to implement the same pattern. I've also tried implementing a base control type to derive from which overrides OnPreRender (or whatever), similar to the response from Spongeboy to this question: ASP.NET Redirect and End Page but I cannot work out the method to override that will prevent execution of *_NeedDataSource.

Can anyone recommend an approach that would work in this situation and wouldn't require too much cognitive overhead?

Apologies, egregiously copied from http://stackoverflow.com/questions/41483271/avoid-grid-needdatasource-call-if-response-redirect-is-called-previously

Konstantin Dikov
Telerik team
 answered on 09 Jan 2017
1 answer
172 views
I have a client-side bound grid with filtering. I also have a GridNumericColumn set to type Int32. When I type in the grid filter box, the value displayed automatically includes a comma group separator, like "96,546". How do I get rid of the comma separator so it only displays "96546"?
Viktor Tachev
Telerik team
 answered on 09 Jan 2017
3 answers
125 views

Hello,

Now I am looking into this demo 

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/batch-editing/defaultcs.aspx

When I click "Add new record" button,  I can see that the delete button in the inserted row  is available.

But I cannot see the delete button with my own code.

<%@ Page Language="c#" CodeFile="Default.aspx.cs" Inherits="Telerik.GridExamplesCSharp.DataEditing.BatchEditing.Default" %>
  
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<head runat="server">
    <title>Telerik ASP.NET Example</title>
    <link href="styles.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" />
 
    <div id="demo" class="demo-container no-bg">
     <telerik:RadGrid ID="RadGrid1" GridLines="None" runat="server" AllowAutomaticDeletes="True"
            AllowAutomaticInserts="True" PageSize="10"
            AllowAutomaticUpdates="True" AllowPaging="True"
            AutoGenerateColumns="False" OnNeedDataSource="ApiGrid_NeedDataSource">
            <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="ProductID"
                HorizontalAlign="NotSet" EditMode="Batch" AutoGenerateColumns="False">
                <BatchEditingSettings EditType="Cell" />
                <SortExpressions>
                    <telerik:GridSortExpression FieldName="ProductID" SortOrder="Descending" />
                </SortExpressions>
                <Columns>
                    <telerik:GridBoundColumn DataField="ProductName" HeaderStyle-Width="210px" HeaderText="ProductName" SortExpression="ProductName"
                        UniqueName="ProductName">
                        <ColumnValidationSettings EnableRequiredFieldValidation="true">
                            <RequiredFieldValidator ForeColor="Red" Text="*This field is required" Display="Dynamic">
                            </RequiredFieldValidator>
                        </ColumnValidationSettings>
                    </telerik:GridBoundColumn>
                    <telerik:GridButtonColumn ConfirmText="Delete this product?" ConfirmDialogType="RadWindow"
                        ConfirmTitle="Delete" HeaderText="Delete" HeaderStyle-Width="50px" ButtonType="ImageButton"
                        CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                    </telerik:GridButtonColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings AllowKeyboardNavigation="true"></ClientSettings>
        </telerik:RadGrid>
    </div>
    </form>
</body>
</html>

using System;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
  
namespace Telerik.GridExamplesCSharp.DataEditing.BatchEditing
{
 
    public class Data
    {
        public string ProductName { get; set; }
        public string ProductID { get; set; }
    }
    public partial class Default : System.Web.UI.Page
    {
        /// <summary>
        ///     Process need data source event from ApiGrid.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void ApiGrid_NeedDataSource( object sender, GridNeedDataSourceEventArgs e )
        {
            RadGrid1.DataSource = new Data[]
            {
                new Data()
                {
                    ProductName = "AAA",
            ProductID ="111"
                },
                 
                new Data()
                {
                    ProductName = "AAA",
                    ProductID ="222"
                }
            };
        }
    }
}

 

Could you please give me some advice?

Thanks.

Kostadin
Telerik team
 answered on 09 Jan 2017
1 answer
712 views

I have a radGrid on a page which periodically refreshes the data from the server.

The grid has filter and sorting enabled.

Is it possible to keep the sort order/filter option when the page refreshes itself? As currently it all reset on auto-refresh.

 

Konstantin Dikov
Telerik team
 answered on 09 Jan 2017
43 answers
3.7K+ views
Hi,

I have a main page with a radgrid. Double clicking the grid opens up a radwindow that lets the users edit the grid row data. I want the grid on the parent page to refresh without having to do a full page refresh. I tried the Ajax call. Everything seem to work as expected. But the grid does not seem to refresh. I can debug the code and see that the server side code does fireup and the grid rebinds successfully. It just does not show up on screen. Here is my code.

On the main page, I have the AJAX manager as below.

<

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="grdAdminList" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>


Here is the server side code:

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
if (e.Argument == "Rebind")
{
grdAdminList.Rebind();
}

Here is the code that I have on my radwindow close:
This function calls the actual refreshGrid function that is on the main page.

function

refreshGrid()
{
GetRadWindow().BrowserWindow.refreshGrid();
}

Main page function:
function refreshGrid()
{
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}

What  am I missing here?

Thanks!
vithiya

Konstantin Dikov
Telerik team
 answered on 09 Jan 2017
10 answers
285 views
Greetings, I am curious thing is happening with a grid:

The fact is that they're missing all the filtering menu styles, displayed no borders, no background color or mouse pointer, etc.

Actually I have searched everywhere and can not find any solution.

This problem is presenting with any skin you use, and the only thing different I've done is to translate the texts of the menu and nothing else.

Attached image problem

Any ideas?
Konstantin Dikov
Telerik team
 answered on 09 Jan 2017
6 answers
98 views

Hi, I am currently using RadGrid version 5.1.1.0 in my project. Though I have set certain settings i.e.

AllowColumnResize="true"

ResizeGridOnColumnResize="true"

ClipCellContentOnResize="true"

EnableRealTimeResize="true

 

to True. The grid doesn't allow me to resize the columns in IE 11, however, the same renders properly in Google Chrome.

Can you guys let me know if this is a known issue with RadGrid control.

Pavlina
Telerik team
 answered on 09 Jan 2017
3 answers
151 views
I have a Radmenu with EnableEmbeddedSkins="false" in my master page.  Everything works fine until that menu is used with a Radgrid that utilizes column filtering via AllowFilteringByColumn="True".  The Radgrid uses the embedded skin (i.e. not using EnableEmbeddedSkins="false").  It seems that the grid makes the Radmenu on the Masterpage ignore the modified skin that I've created and must be using the internal Grid skin.

How can I fix this?  For what its worth, both are using the Web20 skin.  Again, the Radmenu is the only one I've modified via Menu.Web20.css in my App_Themes folder.  Everything else is using the standard embedded skin.

Any ideas?
Konstantin Dikov
Telerik team
 answered on 09 Jan 2017
2 answers
167 views

Hi, we have an issues with rad grid resizing and this issue is only in IE11 in chrome its working perfectly.

This is the grid client settings and mastertable view code:

<telerik:RadGrid ID="grdInvoiceList" CssClass="" Skin="MetroTouch" Width="100%"
                      runat="server" AutoGenerateColumns="false" PagerStyle-HorizontalAlign="Right" AllowCustomPaging="true"
                      AllowPaging="true" AllowFilteringByColumn="true" AllowSorting="true" EnableHeaderContextMenu="true"
                      OnNeedDataSource="grdInvoiceList_NeedDataSource" OnItemDataBound="grdInvoiceList_ItemBound"
                      OnItemCreated="grdInvoiceList_ItemCreated" EnableLinqExpressions="false" OnPreRender="grdInvoiceList_PreRender">
                      <GroupingSettings CaseSensitive="false" />
                      <ExportSettings FileName="Invoice_Details" OpenInNewWindow="true" ExportOnlyData="true"
                          IgnorePaging="true">
                      </ExportSettings>
                      <ClientSettings Resizing-AllowColumnResize="true" AllowAutoScrollOnDragDrop="true" Resizing-AllowResizeToFit="true" Resizing-EnableRealTimeResize="true">
                          <Scrolling AllowScroll="True" SaveScrollPosition="true"></Scrolling>
                          <Selecting AllowRowSelect="true" />
                          <ClientEvents OnColumnResized="ColumnResized" />
                          <ClientEvents OnColumnShown="ColumnShown" />
                          <ClientEvents OnColumnHidden="ColumnHidden" />
                          <ClientEvents OnRowContextMenu="RowContextMenu" /> 
                      </ClientSettings>
 
                      <HeaderStyle Width="150px"></HeaderStyle>
                      <MasterTableView Width="100%" AutoGenerateColumns="false" EditMode="InPlace" AllowFilteringByColumn="True" TableLayout="Auto">

 

1, check image "IE-grid-1.png " once we land on the page we can see the scroll bar and we can scroll left to right without issues in IE.

2, now check "IE-grid-2.png" i just resized the grid header now the scroll bar disappeared. i will not get the scroll bar unless i reload the page. 

is there a solution to resolve this issue? we are using telerik 2014.1.403.40.

 

 

 

Viktor Tachev
Telerik team
 answered on 09 Jan 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?