Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
208 views
I have an issue with the way scrolling is handled on the menu control when it is set to mobile mode. When you get to over about 6 items in the mobile menu, the items scroll inside the menu container. This is fine on a desktop browser, but is problematic when I tested on an iPhone. First, the fact that there are more items to scroll down too is not immediately evident to the user, as there are no scroll bars in the mobile browser until you begin to scroll.  Second, then scrolling doesn't always work in the menu's container, and the entire page scrolls rather then the menu.

Is there a setting for the menu that forces it to be 100% height, to function similar to how the mobile version of the Telerik.com menu works (as of writing this post)?
Dimitar
Telerik team
 answered on 13 Aug 2014
1 answer
57 views
Hi Team,

How do I add an additional ComboBox on the AdvanceInsertTemplate while keeping the default items like subject, start time etc.

Thanks & Regards,
Sharanya
Bozhidar
Telerik team
 answered on 13 Aug 2014
9 answers
1.2K+ views
Hello

I have a RadGrid that works well : it shows the rows in the dataSource and I can use the seeded buttons to add rows etc ...

Now I want to some rows programmatically, so I modify the DataSource in the codeBehind then run RadGrid. Rebind() but it does not shows the new datasource rows.

What could be the explanation for this ?

Loko
Arnaud
Top achievements
Rank 1
 answered on 13 Aug 2014
11 answers
1.0K+ views
Hi,

I have a radgrid with 2 columns, the first column has a dropdown and the second column has a textbox. outside the grid there is a Add "Add ROw" which should insert one row to the grid. The newly added row should have  a dropdown(binded with soime data) in 1st and textox in the 2nd column. The dat entered or selected for previous row must be retained.

Please let me know how this can be achevied.
Please reply at the earliest.
Viktor Tachev
Telerik team
 answered on 13 Aug 2014
1 answer
296 views
I've come across an issue with exporting the radgrid to csv and excel files when using the item template. I've poked around a bit on the forums to see what solutions are already present and from what I've gathered I should set the text field of my item template columns before exporting. The problem I am running into is when I try to find the control it keeps returning null (or in this case Object reference not set to an instance of an object).

My Grid Exporting Event:
protected void RadGridInventory_GridExporting(object source, GridExportingArgs e)
        {
            foreach (GridDataItem item in RadGridInventory.MasterTableView.Items)
            {
                item["AccountId"].Text = (item.FindControl("lControl") as HyperLink).Text; //returns null
                item["Status"].Text = (item.FindControl("statusCode") as LiteralControl).Text; //returns null
            }
 
            if (e.ExportType == ExportType.Excel)
            {
                string customText = "<h1 style='text-align:center;'>Inventory Report for " + _applicationUser.Customer.Name + "</h1>";
                customText += "<p style='text-align:center;'><b>Current Date:</b> " + DateTime.Now + "<br />";
 
                if(RadDatePickerStarting.SelectedDate != null && RadDatePickerEnding.SelectedDate != null){
                    customText += "<b>Date Range Covered:</b> " + RadDatePickerStarting.SelectedDate + " - " + RadDatePickerEnding.SelectedDate + "<br />";
                } else {
                    customText += "<b>Date Range Covered:</b> " + RadComboBoxChoices.SelectedItem.Text + "<br />";
                }
 
                customText += "<b>Clients:</b>";
                foreach (var client in ClientSelector1.SelectedClients)
                {
                    customText += " " + client.Name + ",";
                }
 
                customText = customText.TrimEnd(',');
                customText += "</p>";
                e.ExportOutput = e.ExportOutput.Replace("<body>", "<body>" + customText);
            }
        }

The RadGrid:
public void BuildGrid(IList<UserReportColumn> userReportColumns)
        {
            RadGridInventory.FilterMenu.EnableEmbeddedSkins = false;
            RadGridInventory.PreRender += RadGridInventory_PreRender;
            RadGridInventory.EnableLinqExpressions = false;
 
            RadGridInventory.AllowFilteringByColumn = true;
            RadGridInventory.AllowPaging = true;
            RadGridInventory.AllowSorting = true;
            RadGridInventory.GridLines = GridLines.None;
            RadGridInventory.ShowGroupPanel = true;
            RadGridInventory.AutoGenerateColumns = false;
            RadGridInventory.CssClass = "RadGridAccounts";
            RadGridInventory.EnableViewState = false;
            RadGridInventory.Width = Unit.Pixel(1090);
            RadGridInventory.EnableEmbeddedSkins = false;
 
            RadGridInventory.ClientSettings.AllowDragToGroup = true;
            RadGridInventory.ClientSettings.Resizing.AllowColumnResize = true;
            RadGridInventory.ClientSettings.Resizing.AllowRowResize = true;
            RadGridInventory.ClientSettings.Resizing.ResizeGridOnColumnResize = true;
            RadGridInventory.ClientSettings.Resizing.ClipCellContentOnResize = true;
            RadGridInventory.ClientSettings.Resizing.EnableRealTimeResize = false;
            RadGridInventory.ClientSettings.Resizing.ShowRowIndicatorColumn = false;
 
            RadGridInventory.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
            RadGridInventory.ExportSettings.HideStructureColumns = true;
            RadGridInventory.ExportSettings.ExportOnlyData = true;
            RadGridInventory.ExportSettings.IgnorePaging = true;
 
            RadGridInventory.MasterTableView.DataKeyNames = new string[] { "AccountId" };
            RadGridInventory.MasterTableView.ClientDataKeyNames = new string[] { "AccountId" };
            RadGridInventory.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top;
            RadGridInventory.MasterTableView.CommandItemSettings.ShowExportToExcelButton = true;
            RadGridInventory.MasterTableView.CommandItemSettings.ShowExportToCsvButton = true;
            RadGridInventory.MasterTableView.CommandItemSettings.ShowAddNewRecordButton = false;
            RadGridInventory.GridExporting += new OnGridExportingEventHandler(RadGridInventory_GridExporting);
 
            RadGridInventory.MasterTableView.Width = Unit.Percentage(100);
 
            var accountColumn = userReportColumns.FirstOrDefault(x => x.ReportColumn.ColumnName == "AccountId");
            if (accountColumn != null)
            {
                var templateColumn = new GridTemplateColumn();
                RadGridInventory.MasterTableView.Columns.Add(templateColumn);
                templateColumn.ItemTemplate = new AccountColumnTemplate("AccountId");
                templateColumn.DataField = "AccountId";
                templateColumn.SortExpression = "AccountId";
                templateColumn.UniqueName = "AccountId";
                templateColumn.GroupByExpression = "Group By AccountId";
                templateColumn.HeaderText = accountColumn.ColumnHeaderEval;
            }     
             
            foreach (var column in userReportColumns)
            {
                if (column.ReportColumn.ColumnName == "AccountId") continue;
 
                if (column.ReportColumn.ColumnName == "Status") continue;
 
                var boundColumn = new GridBoundColumn();
                RadGridInventory.MasterTableView.Columns.Add(boundColumn);
 
                AccountGridHelpers.SetupBoundColumn(boundColumn, column);
            }
 
            var statusColumn = userReportColumns.FirstOrDefault(x => x.ReportColumn.ColumnName == "Status");
            if (statusColumn != null)
            {
                var statusTemplateColumn = new GridTemplateColumn();
                RadGridInventory.MasterTableView.Columns.Add(statusTemplateColumn);
                statusTemplateColumn.ItemTemplate = new StatusColumnTemplate("Status");
                statusTemplateColumn.DataField = "Status";
                statusTemplateColumn.UniqueName = "Status";
                statusTemplateColumn.AllowFiltering = true;
                statusTemplateColumn.SortExpression = "Status";
                statusTemplateColumn.HeaderText = statusColumn.ColumnHeaderEval;
            
        }


The Account Id Template:
public class AccountColumnTemplate : ITemplate
    {
        protected HyperLink lControl;
        private string _colname;
        public AccountColumnTemplate(string cName)
        {
            _colname = cName;
        }
 
        public void InstantiateIn(System.Web.UI.Control container)
        {
            lControl = new HyperLink {ID = "lControl"};
            lControl.DataBinding += lControl_DataBinding;
            container.Controls.Add(lControl);
        }
 
        public void lControl_DataBinding(object sender, EventArgs e)
        {
            var l = (HyperLink)sender;
            var container = (GridDataItem)l.NamingContainer;
 
            l.Attributes["href"] = "/Secure/AccountDetail.aspx?account=" + ((AccountDtoBase)container.DataItem).AccountId;
 
            l.Text = ((AccountDtoBase)container.DataItem).AccountId;
        }
    }

Any point in the right direction would be greatly appreciated. I'd really like to avoid having to set ExportOnlyData to false (another solution I've seen floating around) since it really ends up just not looking very nice.

Princy
Top achievements
Rank 2
 answered on 13 Aug 2014
1 answer
80 views
i am using telerik rad editor 2013. now when user delete some image form RadEditor-Image Manger,it should show warning confirmation box . by default radEditor provides this thing.
but i want to customize this confirmation dialog.
i want to show following text.
"Are you sure you want to delete this image...?  This action can not be undone....." 

How to confirm box with this text when user try to delete image
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2014
1 answer
83 views
Hi,

I hit Del key into a gridBoundColumn or a gridNumeriColumn in EDIT mode and radgrid fired Delete command...

How to avoid this command? 

If i hit del Key into a description field i don't want delete record.

AllowAutomaticDeletes=False same result.

I don't want to disabled keyboardShortcuts.

If i use a templateColumn with radTextBox to replace gridBoundColumn no delete command fired.

It's a bug?

Thank you.





Princy
Top achievements
Rank 2
 answered on 13 Aug 2014
3 answers
88 views
This demo shows ability to use mouse to drag over rows / and columns and select a block as in excel:

http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/selecting/cell-selection/defaultcs.aspx

However, shift / arrow keys don't to the same thing. They select individual cells as you move.

Is it possible to use shift / arrow keys to select a block of cells like in excel?

thanks
Princy
Top achievements
Rank 2
 answered on 13 Aug 2014
1 answer
112 views
Hi 

Is it possible to format the RadNumericTextBox onkeypress with two decimal places?

This text box requires users to enter amounts.

Grant

  
Shinu
Top achievements
Rank 2
 answered on 13 Aug 2014
2 answers
583 views
When grid is in edit mode, I have a need to find controls on client side. My table is rather simple. I have a quantity column and a unit price column, a change in value on either column would update the subtotal column. On either change, I need to get both current control's value (which is easy to retrieve) and the next column control's value, which I have no idea how to retrieve on client side. Can anyone point me to the right direction?

They are all placed under EditItemTemplate.

Thanks
Jonathan
Top achievements
Rank 2
 answered on 13 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?