Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
67 views
We are having an issue on one of our RadWindows with a RadButton in Safari 10.0+ on an iPhone. It is like the button is not firing like it should. On all other platforms the button saves the data and closes the window. On Safari 10.0+ it does not. This is now in production so we desperately need a quick fix!
Danail Vasilev
Telerik team
 answered on 10 Jan 2017
2 answers
226 views

Hello,

We seem to have discovered what we think is a bug in RadScheduler when dragging events in the MonthView (haven't tried it on other views). Taking the code below, we are able to capture the modified appointment upon dragging.

What we have found is that when the right end of an event (which spans more than one day) is dragged to shorten the event, the date in modifiedAppointment.End is incorrect.

 

protected void radScheduler_OnAppointmentUpdate(object sender, AppointmentUpdateEventArgs e) {
            var modifiedAppointment = e.ModifiedAppointment;

}

For example, we have an event which correctly displays as starting on 21/12/2016 at 09:00AM and finishing on 23/12/2016 at 12:00PM (midday).

This displays correctly on screen with a bar occupying 21, 22 and 23 December 2016.

If we use the mouse to drag the right end in by one day, modifiedAppointment.End holds 23/12/2016 12:00AM. This occurs even when the mouse is to the left of the day boundary line.

We believe that it should hold 22/12/2016 12:00PM, ie decrease the date but one day, but keep the same time.

Similarly, if we have a two day event that starts on 21/12/2016 09:00AM and ends on 22/12/2016 12:00PM (midday) and we drag the right end of the bar to extend the event by one day (keeping the mouse within the boundaries of 23/12/2016), we would expect that modifiedAppointment.End should hold 23/12/2016 12:00PM but it doesn't. It holds 24/12/2016 12:00:00AM.

In both cases, the time has been defaulted to midnight and in the second scenario, the date has moved two days, not the one day we dragged.

On the opposite end, if we drag the start of an event at 22/12/2016 09:00AM into 21/12/2016 we would expect modifiedAppointmentStart to be 21/12/2016 09:00AM but it is actually 21/12/2016 12:00AM - the time has got dropped. Even if you only drag halfway across 21/12/2016, the time still resets to 00:00:00 and takes no notice of the position of the mouse being only halfway across a cell.

Since you don't get the mouse granularity of time on the month view, you can't drop to a specific time within day, so it is not actually possible to drop at the right time. In this scenario, the time of the event should be retained. Time should only be adjusted in the day view where you do get the granularity of time.

Last time I looked, a day ran from 00:00:00 (12:00:00AM) to 23:59:59, not what RadScheduler is doing where the second after 23:59:59 is being treated as the same day!

This appears to be a serious bug which makes this feature unusable - it displays correctly, but the underlying data being reported is wrong..

Please advise.

Graham
Top achievements
Rank 1
 answered on 10 Jan 2017
8 answers
229 views
I have a basic form - a few drop downs and textboxes - and a RadAsyncUpload control.
On submission of the form checks are carried out (e.g. has an option been selected from the dropdown?). If there is missing information an error message appears. However at this point the async control loses the file. 

Is there a way to complete these validation checks for other controls and retain the file in the async control?
Veselin Tsvetanov
Telerik team
 answered on 10 Jan 2017
4 answers
418 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
119 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
97 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
226 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
145 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
743 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?