Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
121 views
Within RadEditor if I type words like "test" or "world" the spell checker understands the words and does not show as errors. But If I miss type as "tets" or "wordl" the suggested words list does not have the words test or world in it. But If I type worldd or testt, the suggested words have world or test in it.


for example:

type the below into a radEditor and run SpellChecker....

world worldd wordl test tets testt

Is this a bug or can I tweak the code to do it right?
Rumen Jekov
Top achievements
Rank 1
 answered on 28 Dec 2009
2 answers
108 views
I have the following elements on a page: RadComboBox, RadGrid, and an Edit/Insert form. The RadComboBox is used to filter the RadGrid and items selected from the RadGrid populate the edit form. One of the items on the form is the filter value from the RadComboBox.

Scenario #1
Filter the RadGrid
Select an Item from the RadGrid
Edit the item so the Current filter no longer applies.

The result I want:
Reset the RadComboBox to the updated filter value from the form.
Select newly edit item in the RadGrid (Note: This NOT a problem until you add paging to the RadGrid)

Scenario #2
Using the insert form to add a new item

The result I want:
Set the RadComboBox to the newly inserted items filter value.
Select the newly created item in the RadGrid (Note: Again this is NOT a problem until you add paging to the RadGrid)

I guess my basic problem is how to find an item in a paged RadGrid when you don't know what page the item is on. Essentially I want to take an id find out what page it is on, set the correct page index, and select the correct row.

I hope that made sense.

Thanks,

Scott
Scott
Top achievements
Rank 1
 answered on 28 Dec 2009
2 answers
474 views
I have RadListBox1 and RadListBox2.  They are parked in a RadPageView attached to a RadTab.  Either listbox can transfer (move) items from one to the other with the transfer button, 2x-click, or drag-n-drop.  Everything is cool.  I have a "Save" button, the purpose of which is to update RadListBox2's database table.  On button_click I am grabbing the items in RadListBox2 as a collection, parsing the collection, and transforming into a comma-delimited string all on the client in order to pass through RadAjaxManager1_AjaxRequest:

function btnClick() {  
    var list = $find("<%= radListBox2.ClientID %>");  
    var lstNames = list.get_items();  
    var arg;  
 
    if( lstNames.get_count() == 0 ) {  
 
        if (confirm("blah, blah, blah.\n\nProceed?")) {  
            arg = 0;  
        } else { return 0; }  
 
    } else {  
        arg = lstNames.get_count() + ",";  
        lstNames.forEach( function( item ) { arg = arg + item.get_text() + ","; });  
        arg = arg.substr( 0, arg.length - 1 );  
    }  
 
    var ajaxMgr = $find("<%= RadAjaxManager1.ClientID %>");  
    ajaxMgr.ajaxRequest( arg );  
} 

I have confirmed through JavaScript alerts that all is well here.  BUT - ajaxMgr.ajaxRequest( arg ) doesn't fire its associated method in the code-behind.  RadScriptManager is set:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> 

I have Ajax turned on in Page_Load:

RadAjaxManager.GetCurrent( Me ).EnableAJAX = True 

I have AutoPostBackOnTransfer turned off on both listboxes because nothing works when switched on:

radListBox1.AutoPostBackOnTransfer = False 
radListBox2.AutoPostBackOnTransfer = False 

And the code-behind method looks fine to me:

Protected Sub RadAjaxManager1_AjaxRequest( sender As Object, e As AjaxRequestEventArgs ) Handles RadAjaxManager1.AjaxRequest  
    Dim str_Array As String() = Split( e.Argument, "," )  
    Dim numRecords = Integer.Parse( str_Array( 0 ))  
    Dim lst_Tables As IList( Of String ) = New List( Of String )  
    Dim p_data As String = String.Empty   
 
    If numRecords > 0 And numRecords < 10 Then  
        p_data = e.Argument.Substring( 2 )  
    ElseIf numRecords > 9 And numRecords < 100 Then  
        p_data = e.Argument.Substring( 3 )  
    Else  
        p_data = e.Argument.Substring( 4 )  
    End If  
 
    ' sanity check  
    RadAjaxManager1.Alert( "numRecords = " & numRecords )  
    RadAjaxManager1.Alert( "p_data = " & p_data)  
 
    * * *  
End Sub 

But my sanity checks are never invoked.

Got any clues, guys?

Cheers!
Mark
Mark Galbreath
Top achievements
Rank 2
 answered on 28 Dec 2009
4 answers
331 views
Hello,
        Wish you all merry christmas and a happy new year.  I want to change the color of the text in a RadTextBox control dynamically OnMouseOut. I want to do it on Client-Side. I checked the Input styles properties. and I didnt see any method to set the style of input. I saw get_style() but not set_style, not sure how to do it..


Thanks,
Bharani
Dimo
Telerik team
 answered on 28 Dec 2009
5 answers
229 views
hi

I have 2 grids in one page. For example, Order Grid and Order Detail Grid

The Order Grid has paging enabled.

How do i pass the orderid on the Order Grid to Order Detail Grid and i page from page 1 to page 2 and so on? Thanks

So that when click page 2 on the Order Grid, it should reflect Order Detail of that OrderID on page 2. Thanks
Veli
Telerik team
 answered on 28 Dec 2009
1 answer
72 views
Hi,

I am using Radcontrols for asp.net ajax.

In a particular page, when i click on the button it gives the following error in a popup,

Sys.webforms.pagerequsetmanagerparserexception.

i have attached the screenshots also.

it dosen't give the error in the Internet Explorer. the error comes only in the Firefox.

How can i solve the problem?

Thanks,
Mano
Radoslav
Telerik team
 answered on 28 Dec 2009
1 answer
304 views

Embedding a RadMultiPage / RadTabStrip directly into a SharePoint web part works fine, but for code organization I would like to nest them into a separate control. Once I do this, the control re-creation doesn't work (at least, not the ways I have tried it :)). Specifically, when the RadMultiPage / RadTabStrip are part of the WebPartWithTelerik class (which inherits from System.Web.UI.WebControls.WebParts.WebPart), the RadGrid controls on each page allow editing correctly; however, when they are moved down into the WebPartPanel class, clicking Edit on the RadGrid on either page causes the entire page to re-load, and the controls are not in edit mode as their state has been lost.

Scenario:
* RadTabStrip / RadMultiPage combo with two RadPageView objects.
* Each RadPageView contains a single RadGrid which retrieves data via LinqToSql data sources.
* MOSS web site using VSEWSS 1.3 to build the web part in VS 2008.

I've tried a few iterations of this (attemping to serialize the container object, etc.) with no success. Here's hoping there's a simple fix out there.

Thanks,

William Cook

using System;  
using System.Runtime.InteropServices;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Xml.Serialization;  
 
using Microsoft.SharePoint;  
using Microsoft.SharePoint.WebControls;  
using Microsoft.SharePoint.WebPartPages;  
 
using Telerik.Web.UI;  
 
namespace WebPartWithTelerik  
{  
    [Guid("1d53c24d-161e-4fca-86b0-9a8f589e3ee9")]  
    public class WebPartWithTelerik : System.Web.UI.WebControls.WebParts.WebPart  
    {  
        private WebPartPanel Panel;  
        //{  
        //    get { return (WebPartPanel)ViewState["Panel"]; }  
        //    set { ViewState["Panel"] = value; }  
        //}  
 
        public WebPartWithTelerik()  
        {  
        }  
 
        protected override void CreateChildControls()  
        {  
            base.CreateChildControls();  
 
            // Add the controls to the page.  
            this.Panel = new WebPartPanel();  
            this.Controls.Add(this.Panel);  
        }  
    }  
 
    public class WebPartPanel : Panel  
    {  
        private Telerik.Web.UI.RadMultiPage MultiPage;  
        //{  
        //    get { return (RadMultiPage)ViewState["MultiPage"]; }  
        //    set { ViewState["MultiPage"] = value; }  
        //}  
        private Telerik.Web.UI.RadTabStrip TabStrip;  
        //{  
        //    get { return (RadTabStrip)ViewState["TabStrip"]; }  
        //    set { ViewState["TabStrip"] = value; }  
        //}  
 
        public WebPartPanel()  
        {  
            this.ID = "WebPartPanelID";  
        }  
 
 
        protected override void CreateChildControls()  
        {  
            base.CreateChildControls();  
 
            // Create a simple label to validate rendering of controls.  
            Label label = new Label();  
            label.Text = "Test web part for Telerik controls in a SharePoint web part.";  
            this.Controls.Add(label);  
 
            //this.ChildrenAsTriggers = true;  
            //this.UpdateMode = UpdatePanelUpdateMode.Conditional;  
 
            // Create two RadPageView objects.  
            RadPageView pageOne = new RadPageView();  
            pageOne.ID = "pageOne";  
            RadPageView pageTwo = new RadPageView();  
            pageTwo.ID = "pageTwo";  
 
            // Create the RadMultiPage object.  
            this.MultiPage = new RadMultiPage();  
            this.MultiPage.ID = "multiPage";  
            this.MultiPage.PageViewCreated += new RadMultiPageEventHandler(MultiPage_PageViewCreated);  
            this.MultiPage.PageViews.Add(pageOne);  
            this.MultiPage.PageViews.Add(pageTwo);  
 
            // Create the RadTab objects.  
            RadTab tabOne = new RadTab("One");  
            tabOne.PageViewID = pageOne.UniqueID;  
            RadTab tabTwo = new RadTab("Two");  
            tabTwo.PageViewID = pageTwo.UniqueID;  
 
            // Create the tabstrip.  
            this.TabStrip = new RadTabStrip();  
            this.TabStrip.ID = "tabStrip";  
            this.TabStrip.MultiPageID = this.MultiPage.UniqueID;  
            this.TabStrip.Tabs.Add(tabOne);  
            this.TabStrip.Tabs.Add(tabTwo);  
 
            // Add the controls to the page.  
            this.Controls.Add(this.TabStrip);  
            this.Controls.Add(this.MultiPage);  
        }  
 
        void MultiPage_PageViewCreated(object sender, RadMultiPageEventArgs e)  
        {  
            // Create a simple label to validate rendering of controls.  
            Label label = new Label();  
            label.Text = e.PageView.ID;  
            e.PageView.Controls.Add(label);  
 
            LinqDataSource dataSource = new LinqDataSource();  
            DataClassesDataContext context = new DataClassesDataContext();  
            dataSource.ContextTypeName = context.GetType().AssemblyQualifiedName; //"WebPartWithTelerik.DataClassesDataContext, WebPartWithTelerik, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23df81aee7a34b62";  
            context.Dispose();  
            dataSource.EnableInsert = true;  
            dataSource.EnableUpdate = true;  
 
            // Create the grid for the page.  
            RadGrid grid = new RadGrid();  
            grid.AutoGenerateColumns = true;  
            grid.AutoGenerateEditColumn = true;  
            grid.AllowAutomaticInserts = true;  
            grid.AllowAutomaticUpdates = true;  
            grid.MasterTableView.DataKeyNames = new string[] { "TypeID" };  
            switch (e.PageView.ID)  
            {  
                case "pageOne":  
                    //dataSource.ID = "dataSourceOne";  
                    dataSource.TableName = "TableOnes";  
                    grid.ID = "gridOne";  
                    grid.NeedDataSource += new GridNeedDataSourceEventHandler(grid_NeedDataSourceOne);  
                    break;  
                case "pageTwo":  
                    //dataSource.ID = "dataSourceTwo";  
                    dataSource.TableName = "TableTwos";  
                    grid.ID = "gridTwo";  
                    grid.NeedDataSource += new GridNeedDataSourceEventHandler(grid_NeedDataSourceTwo);  
                    break;  
            }  
 
            // Bind the data source.  
            //dataSource.DataBind();  
            e.PageView.Controls.Add(dataSource);  
 
            // Add the grid to the PageView.  
            grid.DataSourceID = dataSource.UniqueID;  
            grid.MasterTableView.ID = grid.ID + "_MasterTableView";  
            e.PageView.Controls.Add(grid);  
        }  
 
        void grid_NeedDataSourceOne(object source, GridNeedDataSourceEventArgs e)  
        {  
            RadGrid grid = (RadGrid)source;  
            grid.DataSourceID = "dataSourceOne";  
        }  
        void grid_NeedDataSourceTwo(object source, GridNeedDataSourceEventArgs e)  
        {  
            RadGrid grid = (RadGrid)source;  
            grid.DataSourceID = "dataSourceTwo";  
        }  
    }  
}  
 
Nikolay Rusev
Telerik team
 answered on 28 Dec 2009
4 answers
215 views
Dear friends,

Take a look at the following code:

webappteste.WebReferenceX.Service1 sd = new webappteste.WebReferenceX.Service1(); 
DataSet ds = new DataSet(); 
ds = sd.getClientes(); //Get full list of customers from a web service
DataTable dt = new DataTable("clientes"); 
dt = ds.Tables[0]; 
RadGrid1.DataSource = dt; 
int asd = dt.Columns.Count; //Returns 58 columns - CORRECT
string tableName = ds.Tables[0].Columns[0].ToString(); //Returns the column name "CLIENTE" - CORRECT
int b = ds.Tables[0].Columns.Count; //Returns 58 columns - CORRECT
int a = RadGrid1.Columns.Count; //Return 0 columns - WRONG - Why not 58 columns???

Can you tell me why this is happening?
Is there any other way to load a DataSet into a RadGrid?

Thanks in advance!!

WebService:

[WebMethod]
public DataSet getClientes() 
{ 
  SqlDataAdapter dataAdapter = new SqlDataAdapter("SELECT * FROM CLIENTES ORDER BY    NOME",connections.retConn()) 
  DataSet dataSet = new DataSet(); 
  dataAdapter.Fill(dataSet); 
  return dataSet 
} 
Tiago
Top achievements
Rank 2
 answered on 28 Dec 2009
4 answers
168 views
I am having trouble finding the magic setting that disables the item data labels for a line chart, and can't seem to get the x axis label's y position to change to try and move the labels closer to the axis.
Velin
Telerik team
 answered on 28 Dec 2009
5 answers
154 views
Hi All,

Here i had used RadComboBox  with _itemsrequested property and also total count of the items(i.e Items 1-5 out off 20) in the combobox at the bottom, Their is an issue regarding that (i.e on page load when i click on the combobox for the first time i am unable to get the total count of the combobox items but when i click on the area where i get that message then i will be getting the items message (i.e Items 1-5 out off 20) this message is been placed in the _itemsRequested so i am able to get the items message at the bottom of the combobox so how do i get the items count message on page load when i click on the combobox for first time.

Here is the code


protected void cmbPlatformName_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e){DataTable data = objTaskmanLib.GetData(e.Text); //GetData(e.Text); 
//objTaskmanLib is the library file from where i get the count.
  RadComboBoxItem item = new RadComboBoxItem();int itemOffset = e.NumberOfItems;int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count);e.EndOfItems = endOffset == data.Rows.Count;for (int i = itemOffset; i < endOffset; i++){cmbPlatformName.Items.Add(new RadComboBoxItem(data.Rows[i]["Platform_Name"].ToString(), data.Rows[i]["Platform_Name"].ToString()));}e.Message = GetStatusMessage(endOffset, data.Rows.Count);}private string GetStatusMessage(int endOffset, int total){if (total <= 0)return "No matches";return String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset, total);}

Here i had used this GetStatusMessage function only in the _itemsRequested event so i am able to get the items message(i.e Items 1-5 out off 20) when i click on the area where items message is been displayed. so can any one help me how to use this function on page load also.

Thanks in advance.
Yana
Telerik team
 answered on 28 Dec 2009
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?