Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
1.4K+ views
Hello,

I want to implement that if you click one row,then you can edit, And you click another row, the row you just edited will update and the new row will go into edit mode.

I got some examples, but they just implement it as do one thing at one time.

Anyone can help me I really appreciate it.

Thank you.
Konstantin Dikov
Telerik team
 answered on 30 Mar 2016
1 answer
137 views

Hi, 

I have a radgridview with a ColumnHeader group.

one of the column header group is pinned.

If i drop a column on the pinned column group header, the column is getting removed.I can not even drag it back from the column chooser

Is there a setting to prevent this from happening. it basically hangs with that column label floating around.

 

 

Maria Ilieva
Telerik team
 answered on 30 Mar 2016
2 answers
93 views
Ok so i have got unavailable times working following the code found elsewhere in this form but for some reason it is not being specific to the Resource
01./// <param name="e">The <see cref="TimeSlotCreatedEventArgs"/> instance containing the event data.</param>
02.    protected void apertureAppointments_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
03.    {
04.        foreach (DateTime dt in SpecialDays)
05. 
06.        {
07.            if (DateTime.Compare(e.TimeSlot.Start.Date, dt) == 0)
08.            {
09.                //Set the CssClass property to visually distinguish your special days.
10.                e.TimeSlot.CssClass = "Disabled";
11.            }
12. 
13. 
14. 
15. 
16.        }
17. 
18.          
19.        List<Resource> resources = new List<Resource>(apertureAppointments.Resources.GetResourcesByType("Managers"));
20.        Resource res = resources[5];
21. 
22.        DateTime dt1 = DateTime.Parse("2016/03/25 10:00");
23.        DateTime dt2 = DateTime.Parse("2016/03/25 16:00");
24.        if (res.Text == "Adam Adair")
25.        {
26.            if (DoDateRangesOverlap(e.TimeSlot.Start, e.TimeSlot.End, dt1, dt2))
27.            {
28.                e.TimeSlot.CssClass = "UnavailableCssStyle";
29.            }
30.        }
31.    }

 

 

This is the last element of a long running project and if can get this working they will be very please is their anyway to add a icon to represent a holiday?.

 

Veselin Tsvetanov
Telerik team
 answered on 30 Mar 2016
1 answer
148 views

Hi,

I want to show media list in Repeater, but it's not working.

I have tried to set file name static,t works out of the Repeater.

 

This is code is not working;

<form id="form1" runat="server">
    
  <telerik:RadScriptManager ID="RadScriptManager4" runat="server" EnablePageMethods="true" >
    </telerik:RadScriptManager>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Windows7" >
    </telerik:RadSkinManager>
    <asp:Repeater ID="rpDetay" runat="server" OnItemDataBound="FormatearPublicaciones">
    <ItemTemplate>
        <div>   
               
    <telerik:RadMediaPlayer RenderMode="Lightweight" ID="RadMediaPlayer1" runat="server" Width="700px" BackColor="Black"
                         AutoPlay="false" HDActive="false" Height="394px" HDSource="files/xxx.mp4" Source="files/xxx.mp4">
        </telerik:RadMediaPlayer>
        
    </div>
    </ItemTemplate>
    <SeparatorTemplate>
        <br />
    </SeparatorTemplate>
    </asp:Repeater>

    </form>

 

Also I see that errors on Chrome Developer Tools;

 

 

 

RadMediaPlayerScripts.js:1031 Uncaught TypeError: Cannot read property 'get_element' of null

RadMediaPlayerScripts.js:770 Uncaught TypeError: Cannot read property 'setBytesLoaded' of null

RadMediaPlayerScripts.js:764 Uncaught TypeError: Cannot read property 'setProgressRailMaxValue' of null

 

This code is working;

 

<form id="form1" runat="server">
    
  <telerik:RadScriptManager ID="RadScriptManager4" runat="server" EnablePageMethods="true" >
    </telerik:RadScriptManager>
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server">
    </telerik:RadStyleSheetManager>
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Windows7" >
    </telerik:RadSkinManager>
   
         <telerik:RadMediaPlayer RenderMode="Lightweight" ID="RadMediaPlayer1" runat="server" Width="700px" BackColor="Black"
                         AutoPlay="false" HDActive="false" Height="394px" HDSource="files/xxx.mp4" Source="files/xxx.mp4">
        </telerik:RadMediaPlayer>
        
    </form>

 

 

Uncaught TypeError: Cannot read property 'get_element' of null     RadMediaPlayerScripts.js:1031 

Uncaught TypeError: Cannot read property 'setBytesLoaded' of null       RadMediaPlayerScripts.js:770 

Uncaught TypeError: Cannot read property 'setProgressRailMaxValue' of null        RadMediaPlayerScripts.js:764 

Uncaught TypeError: Cannot read property 'get_element' of null     RadMediaPlayerScripts.js:1031 

Uncaught TypeError: Cannot read property 'setBytesLoaded' of null       RadMediaPlayerScripts.js:770 

Uncaught TypeError: Cannot read property 'setProgressRailMaxValue' of null        RadMediaPlayerScripts.js:764 

Eyup
Telerik team
 answered on 30 Mar 2016
1 answer
78 views
In one of the scenarios we have a grid with horizontal scroll and in the grid last column have telerik calendar (RadDatePicker), when clicking on calendar icon calendar is not visible completely. Can we set the position to make sure come it is visible properly. This is the same case with Filter dropdown as well.
Viktor Tachev
Telerik team
 answered on 30 Mar 2016
1 answer
101 views

We are using latest version of licensed DLL 2016.1.225.35.

Editor Dialogues(Image uploader, link manager, document manager) does not close in all IE versions onclick of Cancel and insert button. whereas this works fine in other browsers.

We are enforcing to load edge version and there are no script errors on pageload?

Should we include any JS files or did we miss any reference files.

  <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
        <telerik:RadSkinManager runat="server" RenderMode="Lightweight" ID="RadSkinManager1" ShowChooser="true" Skin="Outlook" EnableEmbeddedSkins="true" Visible="false"></telerik:RadSkinManager>  
            <telerik:RadEditor RenderMode="Lightweight" ID="editor1" runat="server" EnableResize="false" EditModes="Design,HTML"
                    AllowThumbGeneration=true
                    UseEmbeddedScripts=false
                    EnableTab="false" width="630px" height="570"
                    Editable="True"
                    RadControlsDir="~/login/sites/editor/telerik/RadControls/"
                    ConfigFile="~/Login/sites/Editor/telerik/RadControls/Editor/ConfigFile.xml"
                    ToolsFile="~/Login/sites/Editor/telerik/RadControls/Editor/ToolsFile.xml"
                    ExternalDialogsPath="~/login/sites/editor/telerik/RadControls/Editor/EditorDialogs"                        
                    OnClientLoad="onClientLoad" EnableEmbeddedSkins ="true">

            </telerik:RadEditor>

 

 

Misho
Telerik team
 answered on 30 Mar 2016
2 answers
155 views
I'm trying to achive this scenario.

 

I have a RadDropDownTree using persistence framework to retain the selected combo value. My code is below.

When a user visits my page, the persistence framework correctly pulls the correct RadDropDownTree1.SelectedValue from the cookie and restores the RadDropDownTree as I expect. The issue is when I try to read RadDropDownTree1.SelectedValue after calling loadState in my code below (highlighted in bold) the value is always empty "". I presume this is due to a timing issue? What would be the correct way to do this?
 
 
private static readonly string CookieName = "TestCookie";
 
protected void Page_Init(object sender, EventArgs e)
{
    RadPersistenceManager1.StorageProviderKey = CookieName;
    RadPersistenceManager1.StorageProvider = new CookieStorageProvider(CookieName);
}
 
 
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {
 
 
        if (Request.Cookies[CookieName] != null)
        {
            RadDropDownTree1.DataBind();
            RadPersistenceManager1.LoadState();
            Label1.Text = RadDropDownTree1.SelectedValue;
        }
    }
     
}
 
protected void RadDropDownTree1_EntriesAdded(object sender, DropDownTreeEntriesEventArgs e)
{
    //save selections
    RadPersistenceManager1.SaveState();
}
Lee
Top achievements
Rank 1
 answered on 29 Mar 2016
3 answers
123 views

I have a report viewer in a radgrid and the MetroTouch skin messes up the style of the report viewer and makes it look terrible.

How do I get the report viewer to display properly inside a MetroTouch skinned grid?
Maria Ilieva
Telerik team
 answered on 29 Mar 2016
3 answers
265 views

I am implementing a RadGrid that lists admin information messages.  Each row has a row delete X and I have a Remove All button.  The single row deletes work fine but the Remove All gives after the delete.

[ArgumentOutOfRangeException: capacity was less than the current size.
Parameter name: value]
   System.Collections.ArrayList.set_Capacity(Int32 value) +11392869
   Telerik.Web.UI.GridTableView.GetEnumerator(Boolean useDataSource, GridEnumerableBase resolvedDataSource, ArrayList dataKeysArray, Boolean shouldClearDataKeys) +450
   Telerik.Web.UI.GridTableView.GetJsonData(Int32 startRowIndex, Int32 maxRowsCount) +1013
   Telerik.Web.UI.RadGrid.InitializeDesktopGridTableViewData(GridTableView tableView, Dictionary`2 data) +2181
   Telerik.Web.UI.RadGrid.InitializeGridTableViewData(GridTableView tableView) +105
   Telerik.Web.UI.RadGrid.InitializeGridTableViewsRecursive(GridTableView tableView) +95
   Telerik.Web.UI.RadGrid.DescribeProperties(IScriptDescriptor descriptor) +4419
   Telerik.Web.UI.RadGrid.DescribeComponent(IScriptDescriptor descriptor) +49
   Telerik.Web.UI.RadCompositeDataBoundControl.Telerik.Web.IControl.DescribeComponent(IScriptDescriptor descriptor) +42
   Telerik.Web.UI.ScriptRegistrar.GetScriptDescriptors(Control control) +210
   Telerik.Web.UI.ScriptRegistrar.GetScriptDescriptors(WebControl control) +36
   Telerik.Web.UI.RadCompositeDataBoundControl.GetScriptDescriptors() +35
   Telerik.Web.UI.RadCompositeDataBoundControl.System.Web.UI.IScriptControl.GetScriptDescriptors() +51
   System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +490
   System.Web.UI.ScriptManager.RegisterScriptDescriptors(IScriptControl scriptControl) +55
   Telerik.Web.UI.RadCompositeDataBoundControl.RegisterScriptDescriptors() +83
   Telerik.Web.UI.RadCompositeDataBoundControl.RenderContents(HtmlTextWriter writer) +67
   Telerik.Web.UI.RadGrid.RenderContents(HtmlTextWriter writer) +102
   Telerik.Web.UI.GridBaseDataList.Render(HtmlTextWriter writer) +132
   Telerik.Web.UI.RadGrid.Render(HtmlTextWriter writer) +217
   System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +66  ... lots more ...

I am creating my grid completely from C# code with a very minimal grid definition in the . The remove all looks like this.

protected void RemoveAll_Click(object sender, EventArgs e)
{
    HomeGrid.DataSource = null;
    DataService.Factory().RemoveAllMessages(user.orgId);   
    HomeGrid.Rebind();
}

This is my grid definition without the columns

RadGrid adminGrid = HomeGrid;
adminGrid.NeedDataSource += new GridNeedDataSourceEventHandler(AdminGrid_NeedDataSource);
adminGrid.Skin = "Default";
adminGrid.AutoGenerateColumns = false;
adminGrid.EnableViewState = false;
adminGrid.GroupingEnabled = false;
adminGrid.AllowPaging = true;
adminGrid.PageSize = 500;
adminGrid.Height = Unit.Percentage(100);
adminGrid.EnableHeaderContextMenu = true;
adminGrid.AllowSorting = true;
adminGrid.AllowFilteringByColumn = true;
adminGrid.AllowMultiRowSelection = false;
adminGrid.AllowAutomaticDeletes = true;
adminGrid.ClientSettings.EnableRowHoverStyle = true;
adminGrid.ClientSettings.Selecting.AllowRowSelect = true;
adminGrid.ClientSettings.Selecting.EnableDragToSelectRows = true;
adminGrid.ClientSettings.ReorderColumnsOnClient = true;
adminGrid.ClientSettings.AllowColumnsReorder = true;
adminGrid.ClientSettings.ColumnsReorderMethod = GridClientSettings.GridColumnsReorderMethod.Reorder;
adminGrid.ClientSettings.Virtualization.EnableVirtualization = true;
adminGrid.ClientSettings.Virtualization.InitiallyCachedItemsCount = 2000;
adminGrid.ClientSettings.Scrolling.AllowScroll = true;
adminGrid.ClientSettings.Scrolling.UseStaticHeaders = true;
adminGrid.ClientSettings.Scrolling.ScrollHeight = Unit.Percentage(100);
adminGrid.ClientSettings.Resizing.AllowColumnResize = true;
adminGrid.PagerStyle.Mode = GridPagerMode.NextPrevNumericAndAdvanced;
adminGrid.GroupingSettings.CaseSensitive = false;

and this my  RadGrid definition

<asp:panel runat="server" ID="HomeGridPanel"  CssClass="windowPercent" >
            <telerik:RadGrid runat="server" ID="HomeGrid"  OnItemCommand="HomeGrid_ItemCommand"></telerik:RadGrid>
</asp:panel>

I looked at other posts and could not figure out anything to do about this.   I added AllowAutomaticDeletes based on searches which did not help.

How can I get rid of the ArrayList ArgumentOutOfRangeException when the Grid goes from having data to no data on a Rebind()?

On removing single rows going from 1 to zero works fine but Remove All gives the error one row.  I think the difference is the single row remove is done from an OnItemCommand RadGrid call while the Remove All is done from a server button click method.

George

 

Maria Ilieva
Telerik team
 answered on 29 Mar 2016
1 answer
271 views
I have a Radgrid which is binded in codebehind and containined in modalextender .Onload , grid show this error , UserNameTitleIndexChanged not defined ,it is defined in radcombobox but still not working
<telerik:RadGrid ID="GridConsultancy" runat="server" FilterMenu-CausesValidation="false" AllowFilteringByColumn="true" AllowPaging="false" AutoGenerateColumns="false" OnNeedDataSource="GridConsultancy_NeedDataSource"  EnableLinqExpressions="false">
                                       <GroupingSettings CaseSensitive="false" />
                                       <ClientSettings>
                                           <Scrolling AllowScroll="True" UseStaticHeaders="True"></Scrolling>
                                       </ClientSettings>
                                       <MasterTableView AllowFilteringByColumn="true" NoDetailRecordsText="No Data Present" AllowSorting="true" TableLayout="Fixed">
                                           <HeaderStyle Width="120" />
                                           <Columns>
                                               <telerik:GridTemplateColumn HeaderText="Sr No." HeaderStyle-Width="70" AllowFiltering="False" AutoPostBackOnFilter="true">
                                                   <ItemTemplate>
                                                       <asp:Label ID="lb_s" runat="server" Text="<%# Container.DataSetIndex+1 %>"></asp:Label>
                                                   </ItemTemplate>
                                               </telerik:GridTemplateColumn>
                                               <telerik:GridDateTimeColumn DataField="EntryDate" UniqueName="EntryDate" HeaderText="Entry Date" HeaderStyle-Width="110" FilterControlWidth="100px" DataType="System.DateTime"
                                                   SortExpression="EntryDate" EnableTimeIndependentFiltering="true" AutoPostBackOnFilter="true"
                                                   DataFormatString="{0:dd MMM yyyy}" CurrentFilterFunction="GreaterThanOrEqualTo">
                                               </telerik:GridDateTimeColumn>
                                                 <telerik:GridBoundColumn DataField="UserName" HeaderText="UserName" UniqueName="UserName"
                           FilterControlWidth="110" HeaderStyle-Width="120" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"
                           ShowFilterIcon="false">
                           <FilterTemplate>
                               <telerik:RadComboBox ID="UserNameRadComboBoxTitle5" Width="110" Style="z-index: 10000001"
                                   runat="server" DataTextField="UserName" DataValueField="UserName"
                                   OnClientSelectedIndexChanged="UserNameTitleIndexChanged" SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("UserName").CurrentFilterValue %>'>
                                   <Items>
                                       <telerik:RadComboBoxItem Text="Select" />
                                       <telerik:RadComboBoxItem Text="All" Value="" />
                                       <telerik:RadComboBoxItem Text="Tim" Value="Tim" />
                                       <telerik:RadComboBoxItem Text="Jeorge" Value="Jeorge" />
                                    
                                   </Items>
                               </telerik:RadComboBox>
                               <telerik:RadScriptBlock ID="UserNameRadScriptBlock" runat="server">
                                   <script type="text/javascript">
                                       function UserNameTitleIndexChanged(sender, args) {
                                           var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                                                   tableView.filter("UserName", args.get_item().get_value(), "Contains");
                                                               }
                                   </script>
                               </telerik:RadScriptBlock>
                           </FilterTemplate>
                       </telerik:GridBoundColumn>
                                           </Columns>
                                       </MasterTableView>
                                   </telerik:RadGrid>
Viktor Tachev
Telerik team
 answered on 29 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?