Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
421 views
Hi,
I have many columns in my radgrid, and thus I have horizontle scrolling enabled. But, I would like to allow the user to select the columns they want to have displayed by having option on the header of a column as shown in the below link:
http://demos.telerik.com/aspnet-ajax/grid/examples/generalfeatures/headercontextfiltermenu/defaultcs.aspx

Eveything is good, but my radgrid columns are created programatically. It would be great if someone can guide me in doing this programatically in code behind file.

Thanks,
Raj
David Cowan
Top achievements
Rank 1
 answered on 15 Oct 2012
2 answers
212 views


In the above example, even though the second file Lighthouse.jpg fails validation, it in the file list. Although the green and red bullet show the status of each file, it is not as intuitive, especially if you select multiple at a time. Firstly you have to scan through the list to see which all failed. Secondly colourblind people can have a hard time distinguishing them.

How can I make it so that files that fail validation don't show up there? I'm planning to have a error area below the upload control that will list files that fail validation and only show validated files up there.

Thanks.
Baal
Top achievements
Rank 1
 answered on 15 Oct 2012
0 answers
69 views
Delete
Bruce
Top achievements
Rank 1
 asked on 15 Oct 2012
0 answers
224 views
I have a radlistbox that contains enough items to cause the vertical scroll bar to appear. My page allows a new record to be inserted into the database and on postback I rebind the records to the listbox and set the radlistbox selected item to the new record's text which is near the bottom of the listbox; however, the scroll bar remains at the top of the radlistbox. How can I move the vertical scroll bar to make visible the newly inserted and selected item?

Thanks,

Steve Holdorf
Steve Holdorf
Top achievements
Rank 1
 asked on 15 Oct 2012
2 answers
2.3K+ views
Having trouble getting a radgrid column to format as $1,234.00; it always displays as 1234.  The database field is Double. The code is as follows:
       <telerik:RadGrid ID="RadGrid1" runat="server" style="margin-top:25px;"
AutoGenerateColumns="true" oncolumncreated="RadGrid1_ColumnCreated">
           <MasterTableView  TableLayout="Fixed" />
           <ClientSettings EnableRowHoverStyle="true" >
               <Selecting AllowRowSelect="False"/>
               <ClientEvents />
               <Scrolling AllowScroll="True"/>
               <Resizing AllowColumnResize="true" AllowResizeToFit="true" ResizeGridOnColumnResize="true" />
           </ClientSettings>
       </telerik:RadGrid>

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Data;
using myNameSpace.BusinessLogic.myLogic;
 
namespace myNameSpace
{
    public partial class myScreen : System.Web.UI.UserControl
    {
        private MyController myController = new MyController();
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();
            List<Guid> thisPositionIds = myController.GetPositionIDs();
            // add 1st column, the Item
            dt.Columns.Add("Item");
 
            // make the Annual Costs columns
            foreach (Guid positionId in thisPositionIds)
            {
                // add a column
                dt.Columns.Add(new DataColumn(myController.GetPositionName(positionId)
                    + System.Environment.NewLine + "Annual Costs",
                    System.Type.GetType("System.Decimal")));
            }
 
            // get the data for the rows
            List<Guid> thisItemIds = myController.GetItemIDs();
            foreach (Guid itemID in thisItemIds)
            {
                DataRow dr = dt.NewRow();
 
                // enter the first column, the Item Name
                dr["Item"] = myController.GetItemName(itemID);
 
                // enter the final set of columns, the Annual Costs
                foreach (Guid positionId in thisPositionIds)
                {
                    dr[myController.GetPositionName(positionId) + System.Environment.NewLine + "Annual Costs"]
                        = myController.GetAnnualCosts(itemID, positionId);
                }
                dt.Rows.Add(dr);
            }
            RadGrid1.DataSource = dt;
            RadGrid1.DataBind();
        }
 
        protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
        {
            if (e.Column.ColumnType == "GridBoundColumn")
            {
                // get column header text
                string colName = e.Column.UniqueName;
 
                // get last 12 chars of text (if it is long enough)
                string colNameEnd;
                if (colName.Length >= 12)
                    colNameEnd = colName.Substring(colName.Length - 12, 12);
                else
                    colNameEnd = "x";
                // format according to which column this
                if (colName == "Item")
                    e.Column.HeaderStyle.Width = Unit.Pixel(80);
                else if (colNameEnd == "Annual Costs")
                {
                    (e.Column as GridBoundColumn).DataFormatString = "{0:C}";
                }
            }
        }
    }
}

Any hints as to what I'm missing would be appreciated.
-Scott
Scott
Top achievements
Rank 1
 answered on 15 Oct 2012
2 answers
177 views
I have a combobox(cbProductItems) on the page with:
OnSelectedIndexChanged="cbProductItems_SelectedIndexChanged"

right now after the postback, the combobox shows the item that is selected. I want to clear the selection and also make this combox focused so I can start typing. 

Is this something that I can do it in method cbProductItems_SelectedIndexChanged? I tried follow codes but doesn't seem to work
cbProductItems.ClearSelection();
cbProductItems.DataBind();

Thanks.
Henry
Top achievements
Rank 1
 answered on 15 Oct 2012
6 answers
172 views
Hi,

On my content page I have a usercontrol and a radgrid.
I have a radcombobox inside the user control. On changing the sleection in the combobox I need to update the grid but it ends with a page flash. How can i add the radcombobox to the ajaxsettings to remove the page flash/postback when updating the grid?

I have tried adding the combo and the grid in ajaxsetting dynamically but that does not help either.

Please suggest.
Waseem
Top achievements
Rank 1
 answered on 15 Oct 2012
1 answer
184 views
I'm about at my wits end with the RadGrid support for excel exporting. Between it's horrible performance with largish datasets and it's inability to export my grid as it's seen, I'm looking for some other options here.

Has anyone in the Telerik community bolted on another excel export solution?

My thoughts here are just to take the HTML output from the grid, and parse it into something excel can read outside of Telerik's control.

See this link:
http://www.codeproject.com/Articles/164582/8-Solutions-to-Export-Data-to-Excel-for-ASP-NET


I really like the idea of being able to export a grid as it is seen on the screen. This provides a supurb user experience in the fact that they can configure things how they want, and then hit export. But this just isn't a reality with Telerik's built in support. Looking at my other threads with various problems I've been running into you can see the pattern of the problem. As long as you use the grid as is, or take your data directly from databinding it works great. Trying to use webserver side calculations, custom aggregates or export data with more than 20k rows and you're going to run into problems.

Any thoughts that may lead me to a workable solution would be great.

Kostadin
Telerik team
 answered on 15 Oct 2012
2 answers
80 views

Hello

I have a problem with radMenu under IE8/9 :

If you move from a submenu to another(mouse moves from one item to another : img 1et 2), the first sub-item closes and  the second sub-item opens(img3). The problem is that the second sub-menu disappears after (img4), the mouse is always on the sub-menu.

This problem does not exist if we navigate in radMenu as follows (always under IE8 / 9):

-          You unfold the sub-menu of item

-          You leave the submenu, you expect that this submenu  is closed.

-           you open another submenu of another item

Then :

The problem occurs if you go directly from a sub-menu to another in IE8 / 9

We do not have this problem in Firefox and Chrome

Gadi
Top achievements
Rank 1
 answered on 15 Oct 2012
4 answers
430 views
I'm using 2011.1.315.35 version RadCombobox with LoadonDemand and I can't get to clear its text. I have seen several forum that suggest below code but that didnt work.

rcbClients.SelectedValue = ""

rcbClients.Clients.Text = ""

 

 

<

 

telerik:RadComboBox runat="server" ID="rcbClients" Height="100px" EnableLoadOnDemand="true" AutoPostBack="true" ValidationGroup="Client"

ShowMoreResultsBox="true" EnableVirtualScrolling="true" AllowCustomText="false" OnClientItemsRequesting = "OnClientItemsRequesting"

EmptyMessage="Type lastname ...">

 

 

<WebServiceSettings Path="WCFClients.svc" Method="LoadClients" />

</

 

 

 

 

 

telerik:RadComboBox>

 

 



Appreciate your help!!
David McClelland
Top achievements
Rank 1
 answered on 15 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?