Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
517 views
Let's say that I have two radio buttons that I'd like to bind to a database. Now, both fields are bound, but only one of them is selected based on the data in the database.  Would the following code work?

<telerik:RadButton ID="ID1" runat="server" ToggleType="Radio" GroupName="MyGroup" 
 ButtonType="ToggleButton" AutoPostBack="false" Text="Choice 1" Checked='<%# Bind("datasourcefield")=="Choice 1" %>'>    
</telerik:RadButton><br />
<telerik:RadButton ID="ID2" runat="server" ToggleType="Radio" GroupName="MyGroup" 
 ButtonType="ToggleButton" AutoPostBack="false" Text="Choice 2" Checked='<%# Bind("datasourcefield")=="Choice 2" %>'>    
</telerik:RadButton><br />



If this code would not work, what would?

Kevin
Top achievements
Rank 2
 answered on 20 Dec 2011
2 answers
100 views

I am currently using Telerik Version v.2009.02.0826.35, and encountering an issue where the RadEditor sporadically will display much wider than defined, forcing horizontal scrolling. Looking at other threads here about this problem, the solution seems to be registering external skins.

However, I am not using a skin for either the RadEditor control, nor the DetailsView that is is part of.

The one thing I did notice though, is that the toolbar, which is loaded from an XML file, doesn't display properly either when the RadEditor misbehaves. I've included two screenshoots - one bad, one good.

Here is a snapshot of the portion of the aspx page where the RadEditor exists:

                    <div id="divDetailsView" runat="server">
                        <asp:DetailsView ID="detDetailsView" runat="server" Height="208px" Width="930px"
                            OnItemCommand="divDetailsView_ItemCommand" AutoGenerateRows="False" DataKeyNames="ref_id"
                            DataSourceID="SqlDataSourceDetails" HorizontalAlign="Center" DefaultMode="Edit"
                            EnableModelValidation="True" BorderStyle="None" GridLines="None" >
                            <Fields>
                                <asp:TemplateField HeaderText="Name: " SortExpression="ref_name">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="ref_name" runat="server" Text='<%# Bind("ref_name") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvReferenceName" runat="server" Text="* Reference Name is required"
                                            ControlToValidate="ref_name" Font-Bold="True" BorderStyle="None"></asp:RequiredFieldValidator>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:TextBox ID="ref_name" runat="server" Text='<%# Bind("ref_name") %>'></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="rfvReferenceName" runat="server" Text="* Reference Name is required"
                                            ControlToValidate="ref_name" Font-Bold="True" BorderStyle="None"></asp:RequiredFieldValidator>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblReferenceName" runat="server" Text='<%# Bind("ref_name") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ControlStyle BorderStyle="Inset" BorderWidth="1px" Width="250px" />
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Right" BorderWidth="5px" BorderColor="White"
                                        VerticalAlign="Top" />
                                    <ItemStyle HorizontalAlign="Left" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Section: " SortExpression="sec_id">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="lstSection" runat="server" DataSourceID="SqlDataSourceSections"
                                            DataTextField="sec_name" DataValueField="sec_id" SelectedValue='<%# Bind("sec_id") %>'
                                            Width="175px">
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <asp:DropDownList ID="lstSection" runat="server" DataSourceID="SqlDataSourceSections"
                                            DataTextField="sec_name" DataValueField="sec_id" SelectedValue='<%# Bind("sec_id") %>'
                                            Width="175px">
                                        </asp:DropDownList>
                                    </InsertItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="lblSection" runat="server" Text='<%# Bind("sec_name") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ControlStyle BorderStyle="Inset" BorderWidth="1px" Width="250px" />
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Right" BorderWidth="5px" BorderColor="White"
                                        VerticalAlign="Top" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Description: " SortExpression="ref_descript">
                                    <ItemTemplate>
                                        <telerik:RadEditor ID="RadEditor1" runat="server" Content='<%# Bind("ref_descript") %>'
                                            Width="500px" ToolbarMode="Default" ToolsFile="~/Admin/RefToolbar.xml" BackColor="White">
                                            <CssFiles>
                                                <telerik:EditorCssFile Value="~/EditorContentArea.css" />
                                            </CssFiles>
                                            <MediaManager UploadPaths="~/Images" ViewPaths="~/Images" MaxUploadFileSize="2147483647" />
                                            <DocumentManager UploadPaths="~/Documents" ViewPaths="~/Documents" MaxUploadFileSize="2147483647" />
                                            <ImageManager UploadPaths="~/Images" ViewPaths="~/Images" MaxUploadFileSize="2147483647" />
                                            <FlashManager UploadPaths="~/Flash" ViewPaths="~/Flash" MaxUploadFileSize="2147483647" />
                                        </telerik:RadEditor>
                                    </ItemTemplate>
                                    <ControlStyle BorderStyle="Inset" BorderWidth="1px" Width="500px" />
                                    <HeaderStyle Font-Bold="True" HorizontalAlign="Right" BorderWidth="5px" BorderColor="White"
                                        VerticalAlign="Top" />
                                    <ItemStyle HorizontalAlign="Left" />
                                </asp:TemplateField>


Any idea how/what I can do to resolve this ??

Thanks !

Bruce

Bruce
Top achievements
Rank 1
 answered on 20 Dec 2011
1 answer
35 views
How do I show the nearby results when typing a search?

If I have a list of 1, 2, 3, 4, 5 in that order in the combo box.  If I type 3 in the box it only shows me 3 as an option, but I would like it to select 3 and but show 1, 2 above it and 4, 5 below it.  This will help me because my list is about 1000 items long.  After I select the item and the page posts back showin my results the item selected is showing in the list, but I need to click there and change to different item in the drop down.  Right now I have to delete what is in the list by selecting and delete and then it shows all the items.  I would like to just be able to drop down and scroll to the next item. 
Dimitar Terziev
Telerik team
 answered on 20 Dec 2011
0 answers
72 views
Hi! I have an aspx page with a RadPanel and I want to load different user controls in placeholder. I load them in RadPanelBar1_ItemClick event. But when I click RadPanelBar events in this controls don't fire for the first time. The second time all works fine.

How can I solve  this problem?


John
N
Top achievements
Rank 1
 asked on 20 Dec 2011
3 answers
42 views
I have a user control that I've implemented IScriptControl on to allow the addition of a client side api to the control.  The user control contains a few RadComboBoxes.  Everything is almost working, however, during the initial page load my client side dispose method is called, which in-turn causes a client side error in the RadScriptManager client side code in CreateCallback with error a is undefined.  

We have a master page that is being used, which contains the RadScriptManager.

I'm sure I'm just missing something, but any help you can provided would be greatly appreciated.
Troy
Top achievements
Rank 1
 answered on 20 Dec 2011
2 answers
99 views
The OrgChart would fill a need I have for a tree-type diagram but I would like to have 3 different types of boxes represented based on some attribute I can supply.  Is this possible or do all boxes have to look the same?  I can't tell from looking at the online info/demos.

Also, are there any limitations as to number of nodes or levels of the chart?
Peter Filipov
Telerik team
 answered on 20 Dec 2011
2 answers
94 views
I have an application with various pages with RadGrids each of which uses various column types. The application works perfectly on my local (IIS7) development environment. However when I deploy it to an (IIS6) staging environment, whenever I use any of the column filters, on any of the grids, I get the following error:

[InvalidCastException: Unable to cast object of type 'ASP.site_master' to type 'Telerik.Web.UI.GridTableView'.] Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +1668 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

All the pages in the site do use a master page, but as I mentioned, the same application works correctly in the development environment. The most obvious difference between the two environments is the version of IIS, though there is nothing concrete to suggest that this is the cause.

Any ideas, please?
Martin
Telerik team
 answered on 20 Dec 2011
11 answers
547 views
Hai All,

       I have created radgrid and binded with dynamic columns from a datatable. I created even the edit column dynamically.But while clicking on edit i am getting this error."An Error has Occured because a control with id 'rgschedulegrid$ct100$ct104$EditButton' Could not be located or a different controls is assigned to the same ID after postback .If the ID is not assigned ,explicitly set the ID property of the controls that raise postback events to avoid this error"


Thanks & Regards,
Imthiyas Ahamed.A
Andrey
Telerik team
 answered on 20 Dec 2011
2 answers
50 views
I have three checkbox in the one row of the grid.What I wanna is to select other two checkboxes when I select first checkbox. How can I do that? 
by the way,I create checkboxes shown below. 

<telerik:GridTemplateColumn UniqueName="rSelect">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkSelect" runat="server" AutoPostBack="true" OnCheckedChanged="chkSelect_OnCheckedChanged" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
Emre
Top achievements
Rank 1
 answered on 20 Dec 2011
6 answers
365 views
I have a radmenu in a usercontrol that gets repeated on several pages.  
Sometimes, when a menu expands the second menu gets hidden behind another instance of the user control. 

Obviously, this is a z-index issue.  But I haven't been able to find a place to change the style to avoid this from happening.

I've attached an image of what's going on.
Kate
Telerik team
 answered on 20 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?