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

I'm trying to swap 2 columns within the RadGrid ColumnCreated event (see code below).  When I step through the code with the debugger, it appears to be working, but when the page renders, the columns are not swapped.  I have 2 columns in the markup (update & delete links) and a number of other columns that are auto-generated.  I'm trying to swap the 2nd column in the markup with the last auto-generated column.  Why are the columns not swapping?  TIA, Gary.

        protected void rgContacts_ColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e)  
        {  
            switch (e.Column.UniqueName)  
            {  
                case "PartyId":  
                case "GUID":  
                case "Code":  
                case "Type":  
                    e.Column.Visible = false;  
                    break;  
                case "LastColumn":  
                    GridColumn gcDelete = rgContacts.MasterTableView.Columns.FindByUniqueName("DeleteCommand");  
                    if (gcDelete != null)  
                        e.OwnerTableView.SwapColumns(e.Column, gcDelete);  
                    e.Column.Visible = false;  
                    break;  
            }  
 

 

Princy
Top achievements
Rank 2
 answered on 18 Jan 2010
1 answer
102 views
I have a web application that allows different resource types depending on which site it is serving up.  Therefore I need to dynamically generate the context menus for the scheduler.  I have created a method to add these dynamically, but it does not appear to work.  I've searched everywhere and I can't find any examples of anyone building context menus dynamically.  I can't imagine that this wouldn't be supported, so I must be doing something wrong.  Can anyone help me achieve this?

      
       private void buildContextMenu() 
        { 
            rscSchedule.AppointmentContextMenus.Clear(); 
            RadSchedulerContextMenu context = new RadSchedulerContextMenu(); 
            context.ID = "apptContext"
            RadMenuItem edit = new RadMenuItem("Open"); 
            edit.Value = "CommandEdit"
            context.Items.Add(edit); 
            RadMenuItem sep1 = new RadMenuItem(); 
            sep1.IsSeparator = true
            context.Items.Add(sep1); 
            IQueryable<AppointmentResourceType> resourceTypes = Appointments.AppointmentResourceTypesGet(MultiSite.SiteIDGet()); 
            foreach (AppointmentResourceType resourceType in resourceTypes) 
            { 
                RadMenuItem menuRType = new RadMenuItem(resourceType.ResourceTypeDesc); 
                IQueryable<AppointmentResourceTypeItem> statusItems = Appointments.AppointmentResourceTypeItemsGet(resourceType.ResourceTypeID); 
                foreach (AppointmentResourceTypeItem statusItem in statusItems) 
                { 
                    RadMenuItem menuStatus = new RadMenuItem(statusItem.ResourceTypeItemDesc); 
                    menuStatus.Value = statusItem.ResourceTypeItemID.ToString(); 
                    menuRType.Items.Add(menuStatus); 
                } 
                context.Items.Add(menuRType); 
            } 
            RadMenuItem sep2 = new RadMenuItem(); 
            sep2.IsSeparator = true
            context.Items.Add(sep2); 
            RadMenuItem del = new RadMenuItem("Delete"); 
            del.Value = "CommandDelete"
            del.ImageUrl = "~/Presentation/Images/radDelete.gif"
            context.Items.Add(del); 
            rscSchedule.AppointmentContextMenus.Add(context); 
        } 

Dimitar Milushev
Telerik team
 answered on 18 Jan 2010
1 answer
154 views

I keep having problems with disappearing line breaks.

For instance, in a empty project with the latest RadEditor in IE8:

In html mode write this:

<p>first line</p>    
<p>second line </p>   

In design you'll get

first line     
    
second line   

Place your cursor on the third line before the word "second" and press enter 3 times for instance.
This will result in this code in html view:

<p>first line</p> 
<><br /> 
<br /> 
second line </p> 

If you then switch between design and html view over and over, every time one <br /> will dissapear!

Why is this?!
Rumen
Telerik team
 answered on 18 Jan 2010
1 answer
68 views
Hello,
I have RAD editor webpart in a Sharepoint page. When i tried Spell checker and add the work to dictionary then its giving follwoing error.

"Spell check handler Server error :403 Forbidden"

PLease let me know the issues.
Stanimir
Telerik team
 answered on 18 Jan 2010
1 answer
243 views
Hi There!

            I have binded radcomboBox with some static data (Yellow, Blue, Pink, Green).
So when ever I select some value it should show in the radcomboBox as "Selected Yellow" like that.
The "selected" should not show in the list of Item.

Please help me with this. It is very urgent. Please respond me ASAP.

Thank You,
--Shilpa
Shinu
Top achievements
Rank 2
 answered on 18 Jan 2010
1 answer
151 views
I have a page that is handled entirely by AJAX, and there's an action that I need to perform on the client everytime before hitting the server.  The RadAjaxManager's client-side OnRequestStart event seemed like the perfect place to do this, but what I'm doing is writing to a hidden field and trying to read that hidden field back on the server.  When I take this approach, my value doesn't seem to be available server side.  I put together a quick example that shows this:

<asp:ScriptManager runat="server"
</asp:ScriptManager> 
 
<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="btn"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="hField" /> 
                <telerik:AjaxUpdatedControl ControlID="textbox" /> 
                <telerik:AjaxUpdatedControl ControlID="btn" /> 
                <telerik:AjaxUpdatedControl ControlID="label" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
    <ClientEvents OnRequestStart="requestStart" /> 
</telerik:RadAjaxManager> 
 
<asp:HiddenField ID="hField" runat="server" /> 
<asp:TextBox ID="textbox" runat="server" /> 
<asp:Button ID="btn" runat="server" OnClick="btn_Cick" OnClientClick="btn_ClientClick()" /><br /> 
<asp:Label ID="label" runat="server" /> 
 
<script type="text/javascript"
 
    function requestStart(sender, args) { 
        $get('hField').value = $get('textbox').value; 
    } 
 
    function btn_ClientClick() { 
        //$get('hField').value = $get('textbox').value; 
    } 
 
</script> 

And in the codebehind:
protected void btn_Cick(object sender, EventArgs e) 
    label.Text = hField.Value; 


As this code stands, hField.Value is empty.  If I comment out the contents of requestStart and uncomment btn_ClientClick, I get the results I expect.  Is there something I'm missing, or am I using OnRequestStart in a way that wasn't intended.  Is there another place I can put this (besides calling it from every client event that would cause a postback)?

Thanks,
Jared


Nikolay Rusev
Telerik team
 answered on 18 Jan 2010
14 answers
401 views
Hi Friends,

    Can anyone help me why is this alert message "Cannot write to the Target Folder !"
    displayed when i use Image Editor to resize the image and try to save the file.
    and is there any option to fix this up..

Thanks
K²

    
Liu Peng
Top achievements
Rank 1
 answered on 18 Jan 2010
1 answer
126 views
I'm working with the grid and trying to edit a record.

Normally, I show stuff like "LastModifiedDate" and primary key ID values on the edit form, but as labels and not as editable controls.

I can probably do this by using a template column and making the edit columns labels, but I figured setting a col = readonly should do the trick, but it appears to just not show the field at all on the edit form.

Is there any way to get these columns to display on the edit form but not as editable controls?
Princy
Top achievements
Rank 2
 answered on 18 Jan 2010
0 answers
177 views
It shows up the Loading Panel only when you click the RadGrid's pager for the very first time. After that everything works except that Loading Panel is not there. It worked for some time and suddenly it stopped displaying the loading panel properly. Yes, i made some changes meanwhile but i do not remember what all i have modified.
What i should particularly be aware of in order to debug it? Thanks
El
Top achievements
Rank 1
 asked on 18 Jan 2010
4 answers
115 views

We are using Telerik dll Version 2009.3.1103.35. It includes the RadEditor (don't know its version). Our clients wants help on

using the editor as an end-user. So, we downloaded end-user manual (RadEditorAjaxEndUserManual.pdf) from Telerik's documentation

site; it is telling it's version is 2008.2.826.
But, our Clients are telling, what they see in the documentation, doesn't match with what they see in the web site rad editor -

especially when they are trying to use tables in the editor.
My question is, is the documentation we have downloaded is the one that we should give to our client, if you take into account

the Telerik dll version that we are using - cannot be changed? If not, then can you give the url where we can find it (if

possible as pdf).

Rumen Jekov
Top achievements
Rank 1
 answered on 17 Jan 2010
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?