Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
205 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.2K+ 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
162 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
164 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
160 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
69 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
418 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
5 answers
77 views
Hello all.

Ive managed to create a custom provider for my scheduler following the documentation available, but ive hit a seemingly stumbling block;

My app works, as espected, but my multi valued resource (the Students in the documentation) is a table with lots of records;

When i run the app, i end up with a extremely tall Insert/Edit Form; Is it possible to make it so that the values am using in this resource use two or more columns instead of just one?
Boyan Dimitrov
Telerik team
 answered on 15 Oct 2012
3 answers
123 views
Hi
I have a combox in which allow cutom text= true.
now when user type something in it i want to check if the entered value exits in the  combox items or not. i want  to check it client side.

i have tried it by using on blur event of the combobox but sometimes it goes in infinite lop.
please help me in this regard
David McClelland
Top achievements
Rank 1
 answered on 15 Oct 2012
5 answers
142 views
Hi Team,

I am using Rad-combo (V 2009.1.527.20) and facing issue .
Is it fixed with new versions? Please send me a sample if any workaround for this.
(Images attached )

My Page with Rad Combo:

Properties set:  AllowCustomText = True , EnableTextSelection = True and MarkFirstMatch = True

When the first letter typed matches an available title in the dropdown, the title is populated.

The problem is that when you continue typing, even if the next characters match the first or another entry, the characters are appended to the front of the populated title making the entry entirely unintended and preventing freeform entry.  Normal expected behavior would be for the automatically suggested selection to go away and accept the user entered characters if the remaining entries do not match. 


Nencho
Telerik team
 answered on 15 Oct 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?