Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
281 views
I'm trying to add a AutoPostBack enabled RadComboBox to the ItemTemplate of a RadGrid's GridTemplateColumn.  The RadComboBox relies on certain row data so I'm creating it dynamically using the grid's ItemDataBound event:

protected void rgFaqs_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
    if (e.Item.ItemType == Telerik.Web.UI.GridItemType.Item || e.Item.ItemType == Telerik.Web.UI.GridItemType.AlternatingItem)
    {
        FaqListItem item = (FaqListItem)e.Item.DataItem;
 
        if (item == null)
            return;
 
        WorkflowComboBox workflowBox = new WorkflowComboBox();
        workflowBox.ItemID = item.Id;
        workflowBox.DataBind();
 
        PlaceHolder phWorkflowBox = (PlaceHolder)e.Item.FindControl("phWorkflowBox");
        phWorkflowBox.Controls.Add(workflowBox);
    }
}

Here is a snippet of my custom overridden WorkflowComboBox:

    public class WorkflowComboBox : Telerik.Web.UI.RadComboBox
    {
        public int ItemID { get; set; }
 
        public WorkflowComboBox()
        {
            AutoPostBack = true;
        }
 
        protected override void OnInit(EventArgs e)
        {
            this.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(WorkflowComboBox_SelectedIndexChanged);
 
            EnsureChildControls();
            base.OnInit(e);
        }

Like I said, this works perfectly fine on the initial page load.  The problem occurs on the AutoPostBack of the ComboBox.  This causes a postback which doesn't appear to be firing the ItemDataBound event again.  That in turn causes my the Combobox field to not be loaded properly.

I've also tried moving the ItemDataBound stuff to the RadGrid's ItemCreated event instead.  Everything works fine on first page load. When the ComboBox AutoPostBack gets fired though, the e.Item.DataItem is null. 

I'm getting the vibe that this is an issue/conflict? with the event sequence of the RadGrid and the RadComboBox.  It also appears during this whole process that the RadComboBox SelectedIndexChanged event is never being reached.

Any thoughts?  Am I missing something!?

-Thanks
Maria Ilieva
Telerik team
 answered on 02 Jan 2013
1 answer
66 views
hii,
how can i highlight todays in the radcalender?
Shinu
Top achievements
Rank 2
 answered on 02 Jan 2013
1 answer
122 views
Hello,

I need print functionality in RadCalendar 
How do I achieve this?

Regards,
Amit
Princy
Top achievements
Rank 2
 answered on 02 Jan 2013
1 answer
59 views
is it possible to change the text of the select button?

thanks
Shinu
Top achievements
Rank 2
 answered on 02 Jan 2013
1 answer
67 views
Hi,
When am click the context menuitem(add appointment) in scheduler i want to open the radwindow.
any one help?
Princy
Top achievements
Rank 2
 answered on 02 Jan 2013
7 answers
350 views
Hi!

I use RadFormDecorator for styling a form. But link(<a></>) is not styled. How can I  apply style to links?

Thanks for any advice... 
Niko
Telerik team
 answered on 02 Jan 2013
1 answer
89 views
Hi,

I am trying and looking forward for telerik radeditor control which is a part of AJAX toolkit. While trying i have come across following queries i.e. - 

1. Regex based find and replace API

2. Remove element API to remove existing tags programmatically

3. Multilingual spell check apart from english, german and french

4. Copy & Paste API

5. Select Element API to select an element

Kindly let me know the solution or any other alternative.

Thanks.
Vikas G.


Rumen
Telerik team
 answered on 02 Jan 2013
1 answer
74 views
hi I have a set of RadEditors. I use a server side method to assign different xml ToolsFile to different RadEditors.
Is it possible that I can specify paths in the same xml? e.g.

<root>
  <tools name="MainToolbar" dockable="true" enabled="true">
    <tool name="Bold"  />
    <tool name="Italic" />
    <tool name="Underline" />
    <tool separator="true"/>
    <tool name="InsertOrderedList" />
    <tool name="InsertUnorderedList" />
    <tool name="ImageManager" ViewPaths="~/Images" UploadPaths="~/Images/New" DeletePaths="~/Images/New/blah" />
    <tool name="DocumentManager" ViewPaths="~/Docs" UploadPaths="~/Docs/New" DeletePaths="~/Docs/New/blah"/>
  </tools>
</root>


thanks in advance
Rumen
Telerik team
 answered on 02 Jan 2013
14 answers
167 views
Hi everyone, I'm working with the RadRotator and have followed the LoadOnDemand example to set up a functional rotator control that we could use on our web site. I see that the backend code of the web service is returning viewable images when viewed through an image visualizer in the VS2010 debugger. But after returning the an array of  RadRotatorItemData I get the error message:

RadRotator items request failed : Exception=Object reference not set to an instance of an object.

Any idea what might be going wrong?

Also let me know if showing code would be helpful in getting to the bottom of this issue.

Thanks for your help!

Slav
Telerik team
 answered on 02 Jan 2013
3 answers
124 views
Hello,

I am using RadEditor in my application to add, edit, display HTML contents. I found that there is non of the control in editor to set background color. I want a button, by clicking which it opens  a color picker and by selecting any color, the selected color set as background color. Also it should be stored as HTML content while saving the record.

Thanks
Rumen
Telerik team
 answered on 02 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?