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

Requirements

RadControls version

2008.2.1001.35

 

 



.NET version

3.5

Visual Studio version

2008 SP1

programming language

C#

browser support

all browsers supported by RadControls

I have added a RadGrid and the 
            EnableAJAX="True" 
            EnableAJAXLoadingTemplate="True" 
have been removed from the RadGrid AJAX version 2008.2.1001.35 and I would like to know how I would use the EnableAJAXLoadingTemplate?

I have put the RadScriptManager and the RadAjaxManager on my master page. I have also used the RadAjaxManagerProxy in the control where I have the RadGrid to enable AJAX on the RadGrid. I see the property for EnableAJAX is on the RadAjaxManager I have on my MasterPage.

What do I need to do to get the EnableAJAXLoadingTemplate to work so when a new page is loading in the RadGrid we can get the spinning icon on the RadGrid until the new page is loaded without a full post back?

Thank you,

Daniel

Daniel
Top achievements
Rank 1
 answered on 20 Oct 2008
2 answers
157 views
Using the RadAjax control to load content that contains an iframe causes the iframe's document to be cleared because the content is moved within the DOM.

I've traced the problem down to Telerik.Web.UI.RadAjaxControl.InsertAtLocation, which calls insertBefore. The fact that insertBefore clears the iframe document is a problem with Firefox. My problem is figuring out why InsertAtLocation is called by the endRequest handler. It is looping through "panelsToClear[]". I would expect the response from the ajax request to be inserted at its target location without having to move it.

Unfortunately, I have not been able to create a simple application that shows the problem. It only happens in the more complex application.

Any insight on how to prevent InsertAtLocation from moving the content with the iframe is greatly appreciated. In fact, as I think of it, I might be able to initialize the iframe AFTER the radajax endRequest has finished moving it. Can I attach an event handler to that event from within the ajax response script?

Firefox 2.0.0.15
Doug Domeny
Top achievements
Rank 1
 answered on 20 Oct 2008
2 answers
190 views

Here is the problem:
when I refresh my page the radsplider render at the last control in the page.
when I change the value using ajax manager to make autopostback and right the value in the label as demostrated in this example (the first example)
http://demos.telerik.com/aspnet/prometheus/Slider/Examples/ServerSideEvents/DefaultCS.aspx 
it delays to make a postback and write the value in the label. if  i slide again and again I will get this error:

Error: [Exception... "'Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 0' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "<unknown>"  data: no]

I have created a sample project and it does work with out any problem but when I take it to the main project it does not work I have updated every thing the same as my sample project.
here the slider code in my code:

<

 

asp:Label ID="labelslider" runat="server"></asp:Label>% Complete:<span

 

 

class="required">*</span> </td><td class="dataOne" colspan="4">

 

 

<telerik:RadSlider ID="RadSlider1" runat="server" AutoPostBack="true" OnValueChanged="RadSlider1_ValueChanged" Skin="WebBlue" />

 

 

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

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="RadSlider1">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="RadSlider1" />

 

 

<telerik:AjaxUpdatedControl ControlID="labelslider" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

protected

 

void RadSlider1_ValueChanged(object sender, EventArgs e)

 

{

labelslider.Text = RadSlider1.Value.ToString();

}

Tsvetie
Telerik team
 answered on 20 Oct 2008
2 answers
182 views
I downloaded the Telerik ObjectContainerDataSource sample and while that works, my implementation of it doesn't, completely.

I can get the page to load and data to load into the grid, but when I try to edit or insert a new record, the entire grid collapses to a single line.

I've scoured my code to the Telerik code and they seem to be similar, except mine is pointing to my data objects.

So I've finally realized I need to consult the Forums.

Does anyone know why the grid is collapsing when I try to insert or edit a record?

If it helps, I'm also using Unity, the Dependency Injection component from Microsoft.

Thanks,

King Wilder
King Wilder
Top achievements
Rank 2
 answered on 20 Oct 2008
4 answers
263 views
In the 2008 Q2 (and now in the Q3 as well) versions of the suite, I've witnessed some strange behaviour with the TimeView.

Basically I've got a form which opens in a RadWindow containing a RadDateTimePicker and a RadTimePicker on one line in the form.  The TimeView for both pickers is relatively wide and fills the entire width of the RadWindow, so for the RadTimePicker I had used style="margin-left: -300px;" to offset it back enough to be visible.  This worked until Q2.

Now, what I'm witnessing (in IE7), is a disabled scrollbar at the bottom of the TimeView for both of the pickers, which is the width of the TimeView (in this case, 520px).  The left-most part of this scrollbar always lines up with the left-side of the picker's textbox - meaning that the "margin-left: -300px;" does not affect the position of that scrollbar.  In my case, this causes a vertical scrollbar to appear in the RadWindow.  On top of that, though, the rest of the TimeView does get offset by the -300px but the part that is offset is not visible on the page.

Here's a screenshot:

http://www.microagebasics.com/support/temp/timeviewerr.png

Thanks,

Shaun.
Dimo
Telerik team
 answered on 20 Oct 2008
1 answer
247 views
Hi!

I'm trying to calculate the color contrast and brightness difference using JavaScript.

I was wondering how I can get the R, G, B values respectively? I know in c# codebehind, I can retrieve R, G, B values by:
RadColorPicker1.SelectedColor.R
RadColorPicker1.SelectedColor.G
RadColorPicker1.SelectedColor.B

Thanks for all your help.
Tsvetie
Telerik team
 answered on 20 Oct 2008
1 answer
136 views
hello,

i have a RadComboBox that uses multiple columns:

<Telerik:RadComboBox ID="rcbSignals" DataValueField="SignalTypeID" DataTextField="Code" Width="230" DropDownWidth="400" ShowToggleImage="true" Filter="Contains" AllowCustomText="True" MarkFirstMatch="true" HighlightTemplatedItems="true" skin="Gray" OnClientFocus="showDropDown" runat="server"> 
    <ItemTemplate> 
        <%# DataBinder.Eval(Container.DataItem, "Code")%> - <%# DataBinder.Eval(Container.DataItem, "Description")%> 
    </ItemTemplate> 
</Telerik:RadComboBox> 

...question -- after a user makes a selection, how do i show both its columns in the text input area? currently only the column designated in the DataTextField property is showing up.


thanks,
matt
matt
Top achievements
Rank 1
 answered on 20 Oct 2008
1 answer
233 views
I am using a radtreeview using code behind to generate the nodes. When the user puts the treeview into 'edit' mode I add a text box to the node using the code below.

The problem occurs when a user clicks on a text box. The text box and node seem to get focus. The user cannot use the mouse to select any text in the text box. This is a major pain if the text box has a lot of text and they need to select a large chunk of text and delete it.

The text box is also ignoring the SelectionOnFocus, no text is not being selected on focus.

Can I get some help for these two problems? Both probably stem from the same behavior.  Maybe Z-order could fix this?

internal

 

class NodeCheckboxTemplate : NodeBaseTemplate, ITemplate

 

{

 

public NodeCheckboxTemplate(NodeBuilderContext context, bool editing) : base(context, editing) { }

 

 

public void InstantiateIn(Control container)

 

{

 

var node = (RadTreeNode)container;

 

 

if (IsEditing)

 

{

 

var factTextBoxControl = new RadTextBox

 

{

ID = container.UniqueID +

"RadTextBox",

 

SkinID =

"treeTextBox",

 

Width =

Unit.Pixel(FactGridTemplateBuilder.Width),

 

Text = node.Value,

SelectionOnFocus =

SelectionOnFocus.SelectAll,

 

EnableViewState =

false

 

};

factTextBoxControl.Text = node.Value;

node.Controls.Add(factTextBoxControl);

 

}

 

 

else

 

{

CreateValueLabel(container, node.Value);

}

}

}

Veselin Vasilev
Telerik team
 answered on 20 Oct 2008
3 answers
406 views
Hi,

Please show an example for a Radtoolbar dropdown button, which has checkboxes along with its text, So that when i drill the dropdown button i should be able to select one or more checkbox(s) and get a server/client side event with list of selected checkboxe(s).

Thanks in advance.
Peter
Telerik team
 answered on 20 Oct 2008
1 answer
230 views
Hello telerik-Team,

i am using a GridButtonColumn with an ImageButton as follows.

<telerik:GridButtonColumn CommandName="MyCommand" ButtonType="ImageButton" UniqueName="ButtonColumn"></telerik:GridButtonColumn>

In Radgrid_ItemDataBound i am setting the ImageUrl of this Button like this:

            if (e.Item is GridDataItem)
            {
                GridDataItem dataItem = e.Item as GridDataItem;
                if (enableBtn)
                {
                    (dataItem["ButtonColumn"].Controls[0] as ImageButton).ImageUrl = "icon_ok.gif";
                }
                else
                {
                    (dataItem["ButtonColumn"].Controls[0] as ImageButton).ImageUrl = "icon_not_ok.gif";
                }
            }

I want to change the image of the button depending on a value in my database/one of the gridcells.
I am using RadGrid_ItemCreated for loading the grid

if (e.Item is GridEditableItem)
            {
                System.Data.DataRowView rowView = (System.Data.DataRowView)e.Item.DataItem;

                String enabled = rowView.Row["M_ENABLE"].ToString();

                if (enabled == "0")
                {
                    enableBtn = false;
                }
                if (enabled == "1")
                {
                    enableBtn = true;
                }
            }

This is where i get into trouble. I now want to click on the button and change the image aswell as the value of "M_ENABLE" in the Database. But after clicking the button rowView is null. I think i need to replace the line System.Data.DataRowView rowView = (System.Data.DataRowView)e.Item.DataItem;
I just can't find out with what :D

K.
Top achievements
Rank 1
 answered on 20 Oct 2008
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?