Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
197 views
I need to dynamically create RAD Combo Boxes and databind them at runtime. I have a template which consists of a checkbox and a label that holds the "text" of the combo box. Here is the template definition:

    class GroupTopicTemplate : ITemplate 
    { 
        public void InstantiateIn(Control container) 
        { 
            HtmlGenericControl div = new HtmlGenericControl("div"); 
            CheckBox chkSelected = new CheckBox(); 
            chkSelected.ID = "chkSelected"; 
            int rowNumber = int.Parse(container.Parent.ClientID.Substring(container.Parent.ClientID.Length - 1)) + 1; 
            chkSelected.Attributes.Add("onclick", "onCheckBoxClick(" + rowNumber.ToString() + ")"); 
            div.Controls.Add(chkSelected); 
            Label lblName = new Label(); 
            lblName.Text = "Text"; 
            lblName.DataBinding += new EventHandler(lblName_DataBinding); 
            lblName.ID = "lblName"; 
            container.Controls.Add(div); 
        } 
 
        void lblName_DataBinding(object sender, EventArgs e) 
        { 
            Label target = (Label)sender; 
            RadComboBoxItem item = (RadComboBoxItem)target.BindingContainer; 
            string itemText = (string)DataBinder.Eval(item, "Text"); 
            target.Text = itemText; 
        } 
    } 

The combo box is created in Page_Init as follows:
        RadComboBox rcGroupTopics = new RadComboBox(); 
        rcGroupTopics.ID = "rcGroupTopics" + rowString; 
        rcGroupTopics.EmptyMessage = "None"; 
        rcGroupTopics.HighlightTemplatedItems = true; 
        rcGroupTopics.AllowCustomText = true; 
        rcGroupTopics.Skin = "WebBlue"; 
        rcGroupTopics.ItemTemplate = new GroupTopicTemplate(); 
        td.Controls.Add(rcGroupTopics); 

The combo box is populated as follows:
DataView dv = new DataView(dt); 
 
dv.Sort = "name"; 
 
TopicDropDownList.DataSource = dv; 
TopicDropDownList.DataTextField = "name"; 
TopicDropDownList.DataValueField = "tagname"; 
TopicDropDownList.DataBind() 

I tried to put the above code in Page_Init (below the above code) and in Page_Load. The problem is, InstantiateIn() is not called until DataBind(), so the data binding event handler is attached too late and the label has no text. Is there a way around this?

Thanks in advance,
Boris Zakharin
Yana
Telerik team
 answered on 12 Jan 2010
3 answers
152 views
Hi,

I am having an issue with how the text centre tool behaves in IE. To reproduce:

1)  Paste the following text into an editor

This text should not centre
This text should centre

2) Highlight "This text should centre"

3) Click the text centre tool

In Chrome it behaves as expected and centre's "This text should centre" but not "This text should not centre". However, in IE bot lines are centered.

Any suggestions?

Rumen
Telerik team
 answered on 12 Jan 2010
2 answers
84 views
hi please find attached the grid.

please help me to sort out this grouping functionality, where june 2009 is a item in the grid and is not a grouping allias.

i seen grouping demo
http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/expressions/defaultcs.aspx
i hope that doenst works here, and i didnt understand "two fields should not be the same" condition here.

please help in this
Tsvetoslav
Telerik team
 answered on 12 Jan 2010
5 answers
1.5K+ views
I want to get client-side information of OS user name , machine name , and IP address
I'm able to get IP address only
guide me how to get OS user name and machine name from client-side
Dimo
Telerik team
 answered on 12 Jan 2010
1 answer
121 views
how to update an appointment by drag and dropping an appointment from one slot to another slot.For Example to day i had 3 appointments  from 10-11,1-2 and another one is from 3-4 i want change the appointment which is from 3-4 to 5-6 by draging the appointment in 3-4 slot to 5-6 slot how can i do this
Shinu
Top achievements
Rank 2
 answered on 12 Jan 2010
1 answer
280 views
We are using RadGrid to display data on ASPX page where AJAX is implemented using RadAjaxManager and asp:ScriptManager. We have a button on click of which we need to export grid data to PDF or Excel format. OnClick event of this button we have written following statement:

RadGrid1.MasterTableView.ExportToPdf();

But it does not work (File Open-Save dialogue box is not displayed.)

When we debugged, we can see that control goes to above statement.

When button is placed outside ScriptManager, it works(it shows file open-save box).

Do we need to make any changes in the behaviour of RadAjaxManager to achieve this? Kindly help.

Princy
Top achievements
Rank 2
 answered on 12 Jan 2010
7 answers
234 views
Hi,

I am using radwindow to provide a custom appointment setup (it is sufficiently complex, using tab strip, several radEditors, etc) that trying to do it inline would have been a problem. It works fine and updates a dataset. On radwindow close, I am calling AjaxRequest, and then trying without success to update the appointments.

I am getting a datasource on ajaxrequest and have tried rebind, etc. without success. Even though the data has changed, the subject, times, etc of the appointments do not update. Only if I do something such as a drag drop which fires AppointmentUpdate and then the data gets refreshed in the modified appointment. Does anyone have a suggestion on how to force the just modified appointment to update when using an Ajax callback? Thanks.

Iana Tsolova
Telerik team
 answered on 12 Jan 2010
1 answer
112 views
Hi,

I am able to get the clipboard data in IE, but the same is not working on Mozilla. Please suggest me some work around for accessing clipboard data in Mozilla.

Regards
Chinnayya
Rumen
Telerik team
 answered on 12 Jan 2010
4 answers
100 views
I have a problem with the validator of the radinputmanager

If i have a form on the page with the radinputmanager and fields are set on

-> Validation-IsRequired="true"

 


Then the links on the panelbar and radmenu isn't working anymore.
When the forms are not require validation, the menu works again.

Anyone has an idea ?
David Blok
Top achievements
Rank 1
 answered on 12 Jan 2010
1 answer
185 views
I'm trying to use a panel bar to create a similar menu to this:

http://www.asos.com/Men/Jeans/Cat/pgecategory.aspx?cid=4208#parentID=Rf-100&pge=0&pgeSize=20&sort=-1&state=Rf-100%3DJeans

I've managed to create the basic functionality, but cannot add a 'clear' button to the root panel item whenever a selection is made. How would I go about doing this? I have included an example panel item below. In this example I would need to be able to add it in the cblStyle_IndexChanged code:

<telerik:RadPanelItem Text="Style" Expanded="true">
 <Items>
  <telerik:RadPanelItem>
   <ItemTemplate>
    <asp:CheckBoxList ID="cblStyle" runat="server" AutoPostBack="true" OnSelectedIndexChanged="cblStyle_IndexChanged">
    </asp:CheckBoxList>
   </ItemTemplate>
  </telerik:RadPanelItem>
 </Items>
</telerik:RadPanelItem>

Regards,
Richard
Poul Henningsen
Top achievements
Rank 1
 answered on 12 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?