Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
397 views

Hi,

My application receives parameters from a query string, so these are all strings.

The problem that I have is that in my form, there is a DateTimePicker which needs to be updated with one of these values.

The client side API, set_date, expects a date, and honestly I do not know how to convert a string (or a single) to a date from client side java script. Is this possible?

Miguel
Top achievements
Rank 1
 answered on 09 Jan 2017
2 answers
103 views
I am trying to find the source code for the HTML stripping functionality that the Text property of the Radeditor uses. I have looked in telerik.ui.for.aspnet.core.2016.3.1118.commercial-source but can't find it. Can someone point me in the right direction? 
Erick Burgess
Top achievements
Rank 1
 answered on 09 Jan 2017
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
80 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
176 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
130 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
719 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
292 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
99 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?