Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
108 views

I am using $('.ruFileInput').attr('accept', 'image/*'); to apply a filter on an AsnycUpload control with MaxFileInputsCount set to 1. This works great on initial load, but if a user removes the file and clicks to upload a new one, the filter is no longer applied.  I tried using the same jQuery code to re-apply the filter in the OnClientFileUploadRemoved event, but the ruFileInput element hasn't been recreated at this point, so it doesn't work.  Any ideas on how else I can re-apply the filter after a file is removed?

Peter Milchev
Telerik team
 answered on 24 Feb 2017
1 answer
113 views

Hi,

I have the following code : 

 protected void RadScheduler_AppointmentDataBound(object sender, SchedulerEventArgs e)
        {
           

            if (true)
            {
                e.Appointment.BackColor = = Color.Yellow;

            }

            else

            {

              e.Appointment.BackColor = = Color.Red;

            }

}

 

that example works fine on the following views :

- Day View.

- Week View.

- Month View.

But it does not work on the Year view and the Agenda view ! 

So, how can i make it work ?

 

Best regard.

Peter Milchev
Telerik team
 answered on 24 Feb 2017
3 answers
134 views
Hi there,

I have an issue with integrating a dynamic RadMenu in a RadPanelBar.
I am able to create the RadMenu (see Menu.png)

If I integrate the same code in the RadPanelBar the dynamic menu pops up but hovering over the individual menu items don't show the menu items added by the ItemTemplate. 

Anybody any idea?

Regards,

Marcel
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form2" runat="server">
        
        <script type="text/javascript">
           function ExpandItem(panelbar, args) {
               if (args.get_item().get_items.Count != 0 && args.get_item().get_expanded() == false) {
                   args.get_item().set_expanded(true);
               }
               else {
                   args.get_item().set_expanded(false);
               }
           }
       </script>
         
        <asp:ScriptManager ID="ScriptManager1" runat="server">
       </asp:ScriptManager>
       <telerik:RadPanelBar ID="RadPanelBar1" OnClientMouseOver="ExpandItem" runat="server" Skin="Outlook" Width="190px">
           <Items>
               <telerik:RadPanelItem runat="server" Text="Menu" Expanded="true" Selected="true">
                   <Items>
                       <telerik:RadPanelItem runat="server" Value="templateHolder">
                       </telerik:RadPanelItem>
                   </Items>
               </telerik:RadPanelItem>
           </Items>
           <CollapseAnimation Duration="100" Type="None" />
           <ExpandAnimation Duration="100" Type="None" />
       </telerik:RadPanelBar>
    </form>
</body>
</html>
 
public partial class RadPanelBarRadPanelMenu : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RadPanelItem panelItem = (RadPanelItem)RadPanelBar1.FindItemByValue("templateHolder");
 
            // RadMenu.
            RadMenu rmMenu = new RadMenu();
            rmMenu.Width = Unit.Percentage(100);
            rmMenu.Skin = "Outlook";
            rmMenu.Flow = ItemFlow.Vertical;
            rmMenu.ItemDataBound += new RadMenuEventHandler(RmMenu_ItemDataBound);
 
            // Get categories.
            EPO.Data.Selector2.Category.GetCategories getCategories = new EPO.Data.Selector2.Category.GetCategories();
            getCategories.Main();
 
            rmMenu.DataFieldID = "Category ID";             // DataFieldID
            rmMenu.DataTextField = "Category name";         // DataTextField
            rmMenu.DataSource = getCategories.CategoryTable;
            rmMenu.DataBind();
 
            panelItem.Controls.Add(rmMenu);
 
            foreach (RadMenuItem myItems in rmMenu.GetAllItems())
            {
                myItems.Width = Unit.Percentage(100);
            }
        }
 
        protected void RmMenu_ItemDataBound(object sender, Telerik.Web.UI.RadMenuEventArgs e)
        {
            // Get category ID.
            DataRowView categoryRow = (DataRowView)e.Item.DataItem;
            short categoryID = (short)categoryRow["Category ID"];
 
            RadMenuItem radMenuItem = (RadMenuItem)e.Item;
            RadMenuItem siteMap = new RadMenuItem();
            siteMap.ItemTemplate = new MenuTemplate(categoryID);
            radMenuItem.Items.Add(siteMap);
        }
 
        public class MenuTemplate : ITemplate
        {
            private short _categoryID;
 
            public MenuTemplate(short categoryID)
            {
                _categoryID = categoryID;
            }
 
            public void InstantiateIn(Control container)
            {
                RadMenuItem radMenuItem = (RadMenuItem)container;
 
                // Create RadSiteMap.
                RadSiteMap radSiteMap = new RadSiteMap();
                radSiteMap.Skin = "Outlook";
                radSiteMap.ID = "rsmRadSiteMap";
                radSiteMap.Width = Unit.Pixel(600);
 
                // Create Levelsettings.
                SiteMapLevelSetting siteMapLevelSetting = new SiteMapLevelSetting(0);
                siteMapLevelSetting.ListLayout.RepeatColumns = 3;
                siteMapLevelSetting.ListLayout.RepeatDirection = SiteMapRepeatDirection.Vertical;
 
                // Add Levelsettings to RadSiteMap.
                radSiteMap.LevelSettings.Add(siteMapLevelSetting);
 
                // Get menu by category ID.
                EPO.Data.Selector2.SubCategory.GetMenuByCategoryID getMenuByCategoryID = new EPO.Data.Selector2.SubCategory.GetMenuByCategoryID();
                getMenuByCategoryID.CategoryID = _categoryID;       // Category ID;      
                getMenuByCategoryID.Main();
 
                // Databinding.
                radSiteMap.DataFieldParentID = "Sub category ID";   // DataFieldParentID
                radSiteMap.DataFieldID = "Commodity code";          // DataFieldID
                radSiteMap.DataTextField = "Name";                  // DataTextField
                radSiteMap.DataNavigateUrlField = "Navigate URL";   // DataNavigateUrlField
                radSiteMap.DataSource = getMenuByCategoryID.SubCategoryTable;
                radSiteMap.DataBind();
 
                // Add RadSiteMap to container.
                container.Controls.Add(radSiteMap);
            }
        }
    }


Vessy
Telerik team
 answered on 24 Feb 2017
7 answers
465 views

Hi,

I am using RadFileExplorer and trying to show files from a virtual directory (exists on the same IIS Website). the virtual directory is working fine and accessible from browsers also through <a > as well. But RadFileExplorer shows nothing and is completely blank. I am also not able to debug the issue. please help. Snapshots are attached.

 

Vessy
Telerik team
 answered on 24 Feb 2017
1 answer
257 views

I've looked at a number of threads on this but none have fixed my problem. The DateFormatString="{0:dd MMM yyyy}" is not being applied. This is a date field in the database and it is currently being displayed as mm/dd/ 

Here's the column definition:

 

<telerik:GridDateTimeColumn UniqueName="RECORDSTARTDATE" HeaderText="Record Start Date" DataField="RECORDSTARTDATE" ShowFilterIcon="false"
                         DataFormatString="{0:dd MMM yyyy}" DataType="System.DateTime" HtmlEncode="false" ItemStyle-CssClass="center"
                         CurrentFilterFunction="GreaterThanOrEqualTo" HeaderStyle-Width="120px" />
Eyup
Telerik team
 answered on 24 Feb 2017
0 answers
285 views

I've tried to search, but not much information on how to fix.  The issue is that:

 

1. I have 2 radgrid, radgrid A and radgrid B.

2. When radgrid A gets clicked it will refresh radgrid B with new data 

3. during the refresh it uses the loading panel.

4. If just the "single click" there are no issue.

5. But when you "double click" on grid A, it will cause panel to show up on grid B and NEVER goes away.  

So when I do this in the development enviroment, this is the error I get "unable to get property 'removeChild' of undefined or null reference"

 

I've tried to use "inline" as suggested in one of the thread, no use, still same issue.  Also tried set MinDisplayTime=750 as some suggest, no use either.  

Below is the code, thank you very much!

    <asp:ScriptManager ID="ScriptManager1" runat="server"/>
    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
        <clientevents onrequeststart="onRequestStart" />
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="grdA">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="grdB" UpdatePanelRenderMode="Inline"
                        LoadingPanelID="RadAjaxLoadingPanel1" UpdatePanelHeight="99%" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

 

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" 
            AnimationDuration="500" Skin="Vista" MinDisplayTime="750">
    </telerik:RadAjaxLoadingPanel>

Frank
Top achievements
Rank 1
 asked on 24 Feb 2017
0 answers
176 views

Hi,

Using Radgrid with grouping features (ShowFooter="True" + ShowGroupFooter="true") I'm unable to export to excel the footer (GroupFooters export fine).

I'm using GridExcelExportFormat.Html. The Footer data is a column aggregate sum. Using Telerik 2016, 1, 225, 45.

 

Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.ItemCommand

If e.CommandName = Telerik.Web.UI.RadGrid.ExportToExcelCommandName Then
           
            RadGrid1.ExportSettings.Excel.Format = GridExcelExportFormat.Html
            RadGrid1.ExportSettings.SuppressColumnDataFormatStrings = True
            RadGrid1.ExportSettings.HideStructureColumns = True
            RadGrid1.MasterTableView.GroupsDefaultExpanded = True
            RadGrid1.ExportSettings.IgnorePaging = True
            RadGrid1.ExportSettings.ExportOnlyData = True
            RadGrid1.ExportSettings.OpenInNewWindow = True
            RadGrid1.MasterTableView.ExportToExcel()
End If

 

Thanks

Arnaud

arnaud
Top achievements
Rank 1
 asked on 23 Feb 2017
1 answer
148 views

I am using a Scatter Line Chart to graph XY values from a data set.  These XY points taken from the data set also have a date associated with them.  My code pulls 2 points from the dataset and graphs them to show net XY movement over time.  When a user hovers a data point on the graph to display the XY values, I would also like the tooltip to say what date (or essentially any 'Z' value) is associated with that point.  This Z value is in the data set which I am graphing, but I do not know any way to clearly display the date information so the user knows the point's associated date.  I tried adding a {2} to DataFormatString below, but obviously without a 3rd (DataFieldZ?) Specified, it has nothing to link to.

 

<telerik:RadHtmlChart runat="server" ID="SLCPositionalMultiDevice" Width="1100px" Height="650px" Visible="false">
<PlotArea>
         <Series>
             <telerik:ScatterLineSeries Name="0" DataFieldX="x" DataFieldY="y">
                 <TooltipsAppearance Color="White" DataFormatString="{0}, {1}, {2}"></TooltipsAppearance>
                 <LabelsAppearance Visible="false">
                 </LabelsAppearance>
             </telerik:ScatterLineSeries>
         </Series>
         <XAxis>
             <LabelsAppearance DataFormatString="{0}"></LabelsAppearance>
             <MajorGridLines Width="1"></MajorGridLines>
             <MinorGridLines Visible="false"></MinorGridLines>
         </XAxis>
         <YAxis >
             <LabelsAppearance DataFormatString="{0}mm"></LabelsAppearance>
             <MajorGridLines Width="1"></MajorGridLines>
             <MinorGridLines Visible="false"></MinorGridLines>
         </YAxis>
     </PlotArea>
</telerik:RadHtmlChart>
Zane
Top achievements
Rank 1
 answered on 23 Feb 2017
2 answers
329 views

I want to make the Spreadsheet control the same size as the browser window.  So I am trying to use the RadSplitter/RadPane method to do this.  However, it's not really working and there are several weird things happening.

            <telerik:RadSplitter ID="splitter" runat="server" OnClientLoaded="SplitterLoaded"
                BorderSize="1" PanesBorderSize="1" Width="99%">
                <telerik:RadPane ID="pane" runat="server" Width="100%">
                    
                    <telerik:RadSpreadsheet runat="server" ID="radSheet" Height="99%" Width="99%" />
                
                </telerik:RadPane>
            </telerik:RadSplitter>

 

1.  As seen in the "sheet_before_event" image, the control doesn't initially fill the RadPane.

2.  However, after an event is fired (click in my case) the spreadsheet will then fill the RadPane, as seen in "sheet_after_event" image.

3.  Through all of this the sheet view inside the control remains small with scroll bars.

Am I trying to do something that isn't currently supported?

 

Kenneth
Top achievements
Rank 1
 answered on 23 Feb 2017
2 answers
362 views

I am badly stuck with using DropDown for Edit/Insert in RadGrid. So far I have been successful in displaying data in dropDown inside RadGrid, but not being able to Update to database. While trying to update, I keep getting error:

Telerik.web.UI.GridException "Cannot find a cell bound to a columns name 'XXXX'

Also we cannot use sqldatasource for security purposes. I searched a lot but can't find solution. If someone could provide me with a working code it will be very helpful.

SilverFish
Top achievements
Rank 1
 answered on 23 Feb 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?