Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
193 views

I have run into a whole bunch of problems with the editor control on iPhone/Safari devices in the latest release. The .focus() client-side method doesn't appear to work when inside a timeout. In this case, the editor can never receive focus either. Touching inside the editor does not bring up the keyboard.

 

Without a timeout, the editor receives focus and the keyboard comes up, however, when users type, no letters are displayed. THe cursor moves along as if typing is occurring, but nothing is shown in the editor. I tried the Lightweight RenderMode, which didn't look very good in iOS. I tried the Mobile Rendermode, which displayed better, but didn't function properly. Typing in the editor would display a white screen which covered the rest of the site and could never be recovered.

I have reverted back to a previous version of the controls (Q1). Needing to do this is becoming an all-too frequent occurrence.

Ianko
Telerik team
 answered on 15 Dec 2016
1 answer
110 views

Hi:

I copy those code from local demo on my empty and practice site.

         <telerik:RadMediaPlayer RenderMode="Lightweight" ID="RadMediaPlayer1" runat="server" AutoPlay="true"
            Height="360px" Width="640px">
            <PlaylistSettings YouTubePlaylist="PLvmaC-XMqeBb991YNEWAHYL9ZJAeURr-r" Mode="Buttons" ButtonsTrigger="MouseDown" />
        </telerik:RadMediaPlayer>

but when I run, only media player and other nothig. 

The same code on local demo can run very well, What's happen on my site ?

Eyup
Telerik team
 answered on 15 Dec 2016
12 answers
844 views
Hello,

I have a grid and the Insert/Update/Delete events are handled in the 'ItemCommand' event.
I'm now trying to get the dataItem row that was updated/inserted so that I can select it and then change it's BackColor.

Here is what I have now in the ItemCommand  Event:
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
   if ((e.CommandName == RadGrid.PerformInsertCommandName) || (e.CommandName == RadGrid.UpdateCommandName))
   {
      GridEditableItem saveableItem = (GridEditableItem)e.Item;
      SaveItems(saveableItem, e.Item.OwnerTableView.IsItemInserted);
   }
}

I trying to do something like:  saveableItem.Selected = true;
but this way won't work because it's the editableItem vs the dataItem.

So my questions:
- Is this the right event to handle this?  If not, what event should I call to handle this (from ItemCommand if possible)?
- How do I 'get' the inserted/updated item, so that I can 'do something' (Select, change BackColor, add Border, etc. after the action)?

Thank you in advance,
Ronnie
Eyup
Telerik team
 answered on 15 Dec 2016
9 answers
1.0K+ views
Hi Telerik Team - I have a grid that has gridTemplateColumn checkbox column. so If the user checks some rows and in the second screen if he checks some rows then return backs to previous rows needs to show correct records. I searched in this forum, found code and created with northwind database. But sometimes when I check some items in 4 pages and then returns back not preserving the checkboxes as expected. Can anyone please guide me on this?
aspx:
  
<telerik:GridTemplateColumn UniqueName="TemplateColumn" SortExpression="LastName">
                                        <ItemTemplate>
                              
                                <asp:checkbox ID="checkColumn" runat="server" />
                              
          </ItemTemplate>
         </telerik:GridTemplateColumn>
                                          
                                           
                                             
                                           <telerik:GridBoundColumn DataField="OrderID" DataType="System.Int32" 
                                               HeaderText="OrderID" ReadOnly="True" SortExpression="OrderID" 
                                               UniqueName="OrderID">
                                           </telerik:GridBoundColumn>
                                           <telerik:GridBoundColumn DataField="ProductID" DataType="System.Int32" 
                                               HeaderText="ProductID" ReadOnly="True" SortExpression="ProductID" 
                                               UniqueName="ProductID">
                                           </telerik:GridBoundColumn>
                                           <telerik:GridBoundColumn DataField="UnitPrice" DataType="System.Decimal" 
                                               HeaderText="UnitPrice" SortExpression="UnitPrice" UniqueName="UnitPrice">
                                           </telerik:GridBoundColumn>
                                      
  
                                          
                                           
                                             
                                        </Columns
  
  
  
aspx.cs:
  
 ArrayList selectedItems; 
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            ViewState["Selected"] = null;
        }  
  
    }
  
    private void RememberSelected()
    {
        selectedItems = new ArrayList();
        int index = -1;
  
       // foreach (GridDataItem row in  RadGrid1.MasterTableView.Items)//RadGrid1.Items)
            foreach (GridDataItem row in RadGrid1.Items)
        {
            index = (int)row.GetDataKeyValue("ProductID");
            bool result = ((CheckBox)row.FindControl("CheckColumn")).Checked;
  
            // Check in the Session   
            if (ViewState["Selected"] != null)
                selectedItems = (ArrayList)ViewState["Selected"];
            if (result)
            {
                if (!selectedItems.Contains(index))
                    selectedItems.Add(index);
            }
            else
                selectedItems.Remove(index);
        }
  
        if (selectedItems != null && selectedItems.Count > 0)
            ViewState["Selected"] = selectedItems;
    }
  
  
    protected void RadGrid1_PageIndexChanged(object source, Telerik.Web.UI.GridPageChangedEventArgs e)
    {
        RememberSelected();
    }
  
    protected void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
    {
        if (selectedItems != null)
        {
            if (e.Item is GridDataItem)
             
            {
                GridDataItem row = (GridDataItem)e.Item;
  
                int index = (int)row.GetDataKeyValue("ProductID");
  
                if (selectedItems.Contains(index))
                {
                    e.Item.Selected = true;
                     
                     
                }
            }
        }
    }
  
    protected void RadGrid1_SortCommand(object source, GridSortCommandEventArgs e)
    {
        RememberSelected();
    }  


Eyup
Telerik team
 answered on 15 Dec 2016
3 answers
296 views
hi,
Iam using Radgrid for my ASP.Net project.
I want to design,bound ,bind and create events for my grid by program.
for ex in my design i will have

<telerik:radgrid ID="RadGrid1" runat="server" >

              </telerik:radgrid>


In page init i define all bound columns and design of grid and create a event for the grid for ex.
 protected void Page_Init(object source, System.EventArgs e)
    {
        Loadprogramaticgrid();
        RadGrid1.NeedDataSource += new GridNeedDataSourceEventHandler(RadGrid1_NeedDataSource);
    }

  private void Loadprogramaticgrid()
    {
             RadGrid1.MasterTableView.DataKeyNames = new string[] { "username" };
        RadGrid1.Skin = "Default";
        RadGrid1.Width = Unit.Percentage(100);
              RadGrid1.AutoGenerateColumns = false;
        //Add columns
        GridBoundColumn boundColumn;
        boundColumn = new GridBoundColumn();
        boundColumn.DataField = "username";
        boundColumn.HeaderText = "username";
        RadGrid1.MasterTableView.Columns.Add(boundColumn);
        boundColumn = new GridBoundColumn();
        boundColumn.DataField = "firstname";
        boundColumn.HeaderText = "firstname";
        RadGrid1.MasterTableView.Columns.Add(boundColumn);

        boundColumn = new GridBoundColumn();
        boundColumn.DataField = "lastname";
        boundColumn.HeaderText = "lastname";
        RadGrid1.MasterTableView.Columns.Add(boundColumn);
     
    }
 protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = loaddata();
    }
and i have a Button and in button click i rebind the grid as
 protected void Button1_Click(object sender, EventArgs e)
    {
        RadGrid1.Rebind();
    }

now the problem is for first time the grid binds and display the data in grid.
When i click the button the grid is not binding correctly.
i have attached the image for more referance.

Naga
Top achievements
Rank 1
 answered on 14 Dec 2016
2 answers
367 views

Hi,

I'm porting some old code to Telerik and I'm having issues. This application has a grid and two of the columns contains hyperlinks that would execute java code to open a non-modal windows to present more details on the items with hyperliks
In the old code, this solved by a template like this:

<ItemTemplate>
              <asp:HyperLink ID="hplnkCatalogDetails" runat="server" ToolTip='Click To View Details'    Text='<%# Eval("ID") %>' NavigateUrl="<%#String.Format(&quot;javascript:void(window.showModalDialog('CatalogDetailsPopUp.aspx?id={0}','','dialogHeight:500px;dialogWidth:850px'));&quot;, Eval(&quot;ID&quot;)) %>" />                                                
</ItemTemplate>

 

However this solution fails to execute if using this solution with Telerik GridTemplateColumn :

<telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="Catalog" UniqueName="TemplateColumn" DataField="ID">
                                                        <ItemTemplate>
                                                          <asp:HyperLink ID="hplnkCatalogDetails2" runat="server" ToolTip='Click To View Details'
                                                                    Text='<%# Eval("ID") %>' NavigateUrl="<%#String.Format(& quot;javascript:void(window.showModalDialog     ('CatalogDetailsPopUp.aspx?id={0}','','dialogHeight:500px;dialogWidth:850px'));&quot;, Eval(&quot;ID&quot;)) %>" />
                                                        </ItemTemplate>
                                                    </telerik:GridTemplateColumn>

 

and this other approach does not work neither using GridHyperLinkColumn:

                                                   
                                                    <telerik:GridHyperLinkColumn AllowSorting="False" DataTextField="ID" FilterControlAltText="Filter column column" HeaderText="Catalog" UniqueName="colID"
                                                      
                                                        NavigateUrl= "&quot;<%#String.Format(& quot;javascript:void(window.showModalDialog('CatalogDetailsPopUp.aspx?id={0}','','dialogHeight:500px;dialogWidth:850px'));&quot;, Eval(&quot;ID&quot;)) %>&quot;"
                                                        DataNavigateUrlFields="ID"
                                                        DataNavigateUrlFormatString="javascript:void(window.showModalDialog('CatalogDetailsPopUp.aspx?id={0}','','dialogHeight:500px;dialogWidth:850px'))" >
                                                       
                                                    </telerik:GridHyperLinkColumn>

 

How should I address this?

 

 

 

Miguel
Top achievements
Rank 1
 answered on 14 Dec 2016
2 answers
159 views

I have an ASPX page that works fine in a seperate development project.  I am now trying to move the page into a Visual Studio 2015 project that creates a SharePoint 2010 package.  I just want to deploy the page into the site.

When I load the page through the SharePoint 2010 site, I get a Parser Error page saying that the event handler for OnNeedDataSource is not allowed on this page.  If I remove that event, it complains about the first event that it finds.

Any suggestions on what I might be missing in order to get the events firing?

 

The error is:

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: The event handler 'OnNeedDataSource' is not allowed in this page.

Source Error:

Line 37: <telerik:RadCheckBox ID="RadCheckBoxShowDisabledConnections" runat="server" Text="Show Disabled Connections">

Line 38: </telerik:RadCheckBox>

Line 39: <telerik:RadGrid ID="RadGridConnections" runat="server" Width="100%"

Line 40: AllowFilteringByColumn="True"

Line 41: AllowPaging="True" PageSize="5"
Source File: /Pages/TestPage.aspx    Line: 39


Version Information: Microsoft .NET Framework Version:2.0.50727.8745; ASP.NET Version:2.0.50727.8745 

 

The ASPX page is:

<%@ Assembly Name="PSC.UDCS.SP2010, Version=1.0.0.0, Culture=neutral, PublicKeyToken=21ff67ef5617fb2f" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Assembly="Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<%@ Page Language="C#"  CodeBehind="UdcsTestPage.aspx.cs" Inherits="PSC.UDCS.SP2010.UdcsTestPage" MasterPageFile="~/_catalogs/masterpage/default.master"  %>
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    UDCS-Connections
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
    Unmanned Device Connection Service - Connections
</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
                <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager>
    <h2>Unmanned Device Connections - Connection Setup</h2>
    <asp:Label runat="server" ID="CompileTime"></asp:Label>
                <asp:Label runat="server" ID="Label1"></asp:Label>
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="RadGrid1">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="RadGridConnections" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </AjaxSettings>
                </telerik:RadAjaxManager>
                <telerik:RadCheckBox ID="RadCheckBoxShowDisabledConnections" runat="server" Text="Show Disabled Connections">
                </telerik:RadCheckBox>
                    <telerik:RadGrid ID="RadGridConnections" runat="server" Width="100%"
                        AllowFilteringByColumn="True"
                        AllowPaging="True" PageSize="5"
                        AllowSorting="True"
                        AllowAutomaticUpdates="True"
                        AllowAutomaticDeletes="true"
                                    RenderMode="Lightweight"
                        OnNeedDataSource="RadGridConnections_OnNeedDataSource"
                        OnItemDataBound="RadGridConnections_OnItemDataBound"
                        OnDeleteCommand="RadGridConnections_OnDeleteCommand"
                        OnUpdateCommand="RadGridConnections_OnUpdateCommand"
                        OnInsertCommand="RadGridConnections_OnInsertCommand"
                        OnItemCommand="RadGridConnections_OnItemCommand"
                        >
                        <GroupingSettings CaseSensitive="false" />
                        <PagerStyle Mode="NextPrevAndNumeric" />
                        <MasterTableView CommandItemDisplay="TopAndBottom" Width="100%" DataKeyNames="ID, Station,Device,TemplateName" AutoGenerateColumns="False" >
                            <Columns>
                                <telerik:GridButtonColumn CommandName="Edit" Text="Edit" UniqueName="Edit" />
                                <telerik:GridButtonColumn ConfirmText="Disable this connection?" ConfirmDialogType="RadWindow" ConfirmTitle="Disable" CommandName="Delete" />
                                                                <telerik:GridBoundColumn UniqueName="ID" DataField="ID" Display="False" />
                                <telerik:GridBoundColumn UniqueName="DeviceId" DataField="DeviceId" Display="False" />
                                <telerik:GridBoundColumn UniqueName="Station" HeaderText="Station" DataField="Station" />
                                <telerik:GridBoundColumn UniqueName="Device" HeaderText="Device" DataField="Device" />
                                <telerik:GridBoundColumn UniqueName="TemplateName" HeaderText="TemplateName" DataField="TemplateName" />
                                <telerik:GridBoundColumn UniqueName="ApplicationPort" HeaderText="ApplicationPort" DataField="ApplicationPort" />
                                <telerik:GridBoundColumn UniqueName="UseMultiHomed" HeaderText="UseMultiHomed" DataField="UseMultiHomed" />
                                <telerik:GridBoundColumn UniqueName="Application" HeaderText="Application" DataField="Application" />
                                <telerik:GridBoundColumn UniqueName="Access" HeaderText="Access" DataField="Access" />
                                <telerik:GridBoundColumn UniqueName="Connection" HeaderText="Connection" DataField="Connection" />
                                <telerik:GridBoundColumn UniqueName="WhiteListIps" HeaderText="WhiteListIps" DataField="WhiteListIps" />
                            </Columns>
    <EditFormSettings UserControlName="UdcsConnectionEdit.ascx" EditFormType="WebUserControl">
      <EditColumn UniqueName="EditCommandColumn1">
      </EditColumn>
    </EditFormSettings>                        </MasterTableView>
                    </telerik:RadGrid>
</asp:Content>

Marin
Telerik team
 answered on 14 Dec 2016
9 answers
186 views

I have an async upload control in my page along with a grid view wherein all the uploads are displayed. When I click on a line item in a grid I have a download file functionality. But, whenever I click on the download file link, the progress area appears which is not expected. the progress area is only meant for the upload control but not for the download. How do I sort this issue out?

Veselin Tsvetanov
Telerik team
 answered on 14 Dec 2016
1 answer
60 views

I have a need for a scheduler that is not time specific and not necessarily all-day (though maybe treating them as all day is a way to do it).

So, I need the Month View and the ability to add any number of entries in any given day. 

I need the added items to display alphabetically.

And I need NO TIMES to show up in the output nor in the Data Entry form.

How do I do this?

Anton
Telerik team
 answered on 14 Dec 2016
3 answers
124 views

Hi,

There is a label called "Command item" in radgrid, I need to remove that label.  Please advise. 

Ram
Top achievements
Rank 1
 answered on 14 Dec 2016
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?