Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
207 views
Hi,

I would like to use a Rad Splitter to show and hide the Command Item Template.

The functionality would be sililar to this example:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandsplitterresizing/defaultcs.aspx?product=splitter

Please advise if this is possible.


Thanks in advance,

Ryan
Dobromir
Telerik team
 answered on 11 Nov 2011
3 answers
354 views
I've a problem.
grid.MasterTableView.GetSelectedItems() == 0

my Aspx
<%@ Page Title="" Language="C#" MasterPageFile="~/UI/Doculex.Master" AutoEventWireup="true" CodeBehind="DocumentsList.aspx.cs" Inherits="WebSearch.UI.DocumentsList" %>
<%@ MasterType VirtualPath="~/UI/Doculex.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<telerik:RadCodeBlock runat="server">

</telerik:RadCodeBlock>
<%-- <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="UserGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="UserGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
                   
                </UpdatedControls>
            </telerik:AjaxSetting>
              <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="UserGrid" LoadingPanelID="RadAjaxLoadingPanel1" />
                        
                    </UpdatedControls>
                </telerik:AjaxSetting>  
        </AjaxSettings>
    </telerik:RadAjaxManager>--%>
    <div class="headerPage">
        <asp:Label ID="lblTitle" runat="server"></asp:Label>
    </div>
    <div class="containerSub" id ="containerSub" runat="server">
    <telerik:RadSplitter  ID ="Splitter"  Width = "100%"  Height ="100%" Orientation="Vertical"  runat="server">
        <telerik:RadPane runat="server" ID="gridPane" Scrolling="None" Height="80%"  Width=100%>
             <telerik:RadGrid ID="DocumentGrid" runat="server"
            AllowPaging="True" AllowSorting="True"
            AllowFilteringByColumn="true"             
            CellSpacing="0"
            EnableHeaderContextMenu ="true" EnableHeaderContextFilterMenu="true"
            GridLines="None"  
            Width="99.8%" PageSize="12" Height="500px" AutoGenerateColumns="False"  
           EnableLinqExpressions="false"  EnableViewState="false"
            onneeddatasource="DocumentGrid_NeedDataSource"
            onprerender="DocumentGrid_PreRender"
                 onitemcommand="DocumentGrid_ItemCommand"   >
            <ItemStyle VerticalAlign="Top" />
           
            <GroupingSettings CaseSensitive="false" />
         
            <MasterTableView  CommandItemDisplay="None"  DataKeyNames="Id" Width="100%"
                TableLayout="Auto"  PagerStyle-Mode="NumericPages">
                   <Columns>
                         <telerik:GridTemplateColumn  UniqueName="Select" HeaderStyle-Width="3%"  AllowFiltering="false">
                          
                          <ItemTemplate>
                           <asp:CheckBox  id="chkSelect" runat="server"  />
                          </ItemTemplate>
                          
                       </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
                  <ClientSettings Scrolling-SaveScrollPosition="true"  EnablePostBackOnRowClick="true"  Scrolling-AllowScroll="true"  ActiveRowIndex="true" AllowColumnsReorder="true" AllowColumnHide="true"
                  >
                  <Selecting AllowRowSelect="true" />
                           <ClientEvents OnColumnHidden="ColumnHiding"   />
                          <Resizing AllowColumnResize="false"></Resizing>

                              
                         </ClientSettings>
                </telerik:RadGrid>
        </telerik:RadPane>
       <telerik:RadPane ID="searchPane" Width="20px"  runat="server" Scrolling="None" Height="80%"  >
            <telerik:RadSlidingZone runat="server" ID="PreviewZone" SlideDirection="Left" >
                  <telerik:RadSlidingPane ID="DocPreview" runat="server" Width="300px" OnClientDocked = "PaneDockDocPreview"
                                             OnClientUndocked = "PaneUnDockDocPreview">
                                             <div Id="preview" runat="server"></div>
                 </telerik:RadSlidingPane>
            </telerik:RadSlidingZone>
        </telerik:RadPane>
    </telerik:RadSplitter>
    
    </div>




</asp:Content>

my C#

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Resources;
using System.Web;
using Telerik.Web.UI;
using WebSearch.Components;
using WebSearch.SecurityModel;
using WebSearch.UI.Model;
using WebSearch.UI.Model.Items.Grid;
using WebSearch.UI.Model.Screen;

namespace WebSearch.UI
{
    public partial class DocumentsList : System.Web.UI.Page
    {
        #region Properties

        private GridScreen _grid;
        private UIContainer _container;
        private string _culture;
        private ResourceManager _resources;
        private readonly Organization _organization = new Organization();

        #endregion

      

        #region Events
        protected void Page_Load(object sender, EventArgs e)
        {
            GetInfo();

            if (Page.IsPostBack)
            {
                App.SavePreferencesGrid(DocumentGrid);
                App.SavePane();
            }

            if (!Page.IsPostBack)
            {
                LoadSettings();
                CreateGrid();
                App.LoadPreferencesGrid(DocumentGrid);
                App.LoadPane(PreviewZone);

               
            }
            
            DocumentGrid.HeaderContextMenu.ItemCreated += new RadMenuEventHandler(HeaderContextMenu_ItemCreated);

        }

       

        void HeaderContextMenu_ItemCreated(object sender, RadMenuEventArgs e)
        {
            CommonFunctions.HideColumns(sender, e);
            CommonFunctions.HideSpecialColumns("Select", e.Item);
            CommonFunctions.HideSpecialColumns("Id", e.Item);
           
        }
        
        #endregion

        #region Methods
      
        

        private void CreateGrid()
        {
           
            List<DocumentTypeField> documentTypeFieldList = _organization.GetDocumentTypeField(1);

            foreach (DocumentTypeField documentTypeField in documentTypeFieldList)
            {
                GridBoundColumn boundColumn = new GridBoundColumn();
                DocumentGrid.MasterTableView.Columns.Add(boundColumn);

                boundColumn.DataField = documentTypeField.Name;
                boundColumn.HeaderText = documentTypeField.Header;
                boundColumn.UniqueName = documentTypeField.Name;
                boundColumn.Visible = documentTypeField.IsVisible;
                if (!documentTypeField.IsVisible) boundColumn.Display = false;
            }

            GridBoundColumn boundColumnId = new GridBoundColumn();
            DocumentGrid.MasterTableView.Columns.Add(boundColumnId);

            boundColumnId.DataField = "Id";
            boundColumnId.UniqueName = "Id";
            boundColumnId.Visible = false;
            boundColumnId.Display = false;

        }

        private void GetInfo()
        {
            _culture = App.CurrentCulture();
            _resources = App.GetMasterResources("DocumentsList");
        }

        private void LoadSettings()
        {
            lblTitle.Text = _resources.GetString(lblTitle.ID, new CultureInfo(_culture));

            DocPreview.IconUrl = VirtualPathUtility.ToAbsolute("~/UI/Images/layout.png");
            DocPreview.TabView = SplitterSlidePaneTabView.ImageOnly;
            DocPreview.Title = _resources.GetString("TitleViewPane", new CultureInfo(_culture));
            DocPreview.UndockText =
                _resources.GetString("UndockViewPane", new CultureInfo(_culture));
            DocPreview.DockText =
                _resources.GetString("DockViewPane", new CultureInfo(_culture));
            DocPreview.ToolTip =
                _resources.GetString("ToolTipViewPane", new CultureInfo(_culture));

            PreviewZone.Style.Add("position", "static");
            
        }
        #endregion

        protected void DocumentGrid_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
        {
           // RadRibbonBar menu= Master.FindControl("TopMenu") as RadRibbonBar;
            DocumentGrid.DataSource = GenericGrid.ListDocuments;
        }

        protected void DocumentGrid_PreRender(object sender, EventArgs e)
        {
            DocumentGrid.MasterTableView.GetColumnSafe("RowIndicator").Display = false;
            DocumentGrid.MasterTableView.GetColumnSafe("Id").Display = false;
            CommonFunctions.GridOptions(DocumentGrid);
        }

        protected void DocumentGrid_ItemCommand(object sender, GridCommandEventArgs e)
        {
            RadGrid grid = (RadGrid)sender;


            switch (e.CommandName)
            {
                case "RowClick":

                    preview.InnerHtml = null;

                    foreach (GridDataItem selectedItem in grid.MasterTableView.GetSelectedItems())
                    {
                        string[] extension = selectedItem["FileName"].Text.Split('.');
                        string path = AppDomain.CurrentDomain.BaseDirectory + "TempFolder";
                        String fileName = selectedItem["FileName"].Text.ToString();
                        path = path + " \\" + fileName;
                        switch (extension[1].ToLower())
                        {
                            case "txt":
                                StreamReader oStreamReader = File.OpenText(path);
                                string contents = oStreamReader.ReadToEnd();

                                preview.InnerHtml = contents;

                                oStreamReader.Close();
                                break;



                            case "pdf":

                                preview.InnerHtml =
                                    "<iframe src=\"../TempFolder/" + fileName + "\" style=\"width:718px; height:700px;\" frameborder=\"0\"></iframe>";

                                break;

                            default:

                                preview.InnerHtml = "<b>Preview not available<b>";
                                break;

                        }


                        PreviewZone.ExpandedPaneId = "DocPreview";
                        PreviewZone.DockedPaneId = "DocPreview";

                    }
                    break;

            }
        }
    }
}

thanks
July
Top achievements
Rank 2
 answered on 11 Nov 2011
1 answer
251 views

I have a customized gridtemplatecolumn.  I would like the table to take up the grid cell so that the lines touch the lining of the grid cell.  Please see screenshot to see what it currently looks like.  The "Open Items by Age" column contains the table.  I am also attaching the aspx code.

          <telerik:RadGrid ID="grdCurrentandPrior" runat="server" AllowRowResize="True" AllowSorting="True" AutoGenerateColumns="False"
                            GridLines="Horizontal" Skin="Web20" Style="margin-right: 0px" Width="897px" Height="252px"
                            OnNeedDataSource="grdCurrentandPrior_NeedDataSource" OnExcelMLExportRowCreated="grdCurrentandPrior_ExcelMLExportRowCreated"
                            OnSortCommand="grdCurrentandPrior_SortCommand">
                            <exportsettings filename="OpenItemsCurrentInventory" ignorepaging="True" openinnewwindow="True"
                                exportonlydata="true" excel-format="ExcelML">
                            </exportsettings>
                            <mastertableview commanditemdisplay="Bottom" allownaturalsort="false" usealldatafields="true">
                                <CommandItemSettings ShowExportToExcelButton="true" ShowAddNewRecordButton="false"
                                    ShowRefreshButton="false" />
                                <Columns>
                                    <telerik:GridTemplateColumn DataField="Assignee" HeaderText="Assignee" UniqueName="Assignee"
                                        SortExpression="Assignee">
                                        <HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" />
                                        <ItemTemplate>
                                            <asp:Label ID="lbAssignee" runat="server" Text='<%# Eval("Assignee") %>'></asp:Label>
                                        </ItemTemplate>
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" />
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn DataField="State" HeaderText="State" UniqueName="State"
                                        SortExpression="State" Visible="false">
                                        <HeaderStyle Font-Bold="True" Width="150px" HorizontalAlign="Center" Font-Names="Arial" />
                                        <ItemTemplate>
                                            <asp:Label ID="lbState" runat="server" Text='<%# Eval("State") %>'></asp:Label>
                                        </ItemTemplate>
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" />
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn DataField="JurisdictionCount" HeaderText="Jurisdictions"
                                        UniqueName="JurisdictionCount" SortExpression="JurisdictionCount">
                                        <HeaderStyle Font-Bold="True" Width="80px" HorizontalAlign="Center" Font-Names="Arial" />
                                        <ItemTemplate>
                                            <asp:Label ID="lbJurisdiction" runat="server" Text='<%# Eval("JurisdictionCount", "{0:N0}")%>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Right" ForeColor="Black" />
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" />
                                    </telerik:GridTemplateColumn>                 
             <telerik:GridTemplateColumn UniqueName="OpenItemsByAge" >
        <HeaderTemplate>
          <table id="Table1" cellspacing="0" cellpadding="0" width="100%" border="0" >
            <tr>
              <td colspan="3" align="center">
                <b>Open Items by Age</b>
              </td>
            </tr>
           <tr>
                                    <td align="center" style="width: 33%">
<asp:LinkButton CssClass="Button" ID="btnPrioOpen" Text="Prior" 
CommandName='Sort' CommandArgument='OpenItemsCountPrior' runat="server" /></td>
                                    <td align="center" style="width: 33%">
<asp:LinkButton CssClass="Button" ID="btnLastMonth" Text="Last Month" 
CommandName='Sort' CommandArgument='OpenItemsCountLastMonth' runat="server" /></td>
                                    <td align="center" style="width: 34%">
<asp:LinkButton CssClass="Button" ID="btnCurrentOpen" Text="Current" 
CommandName='Sort'  CommandArgument='OpenItemsCountCurrent' runat="server" /></td>
                                </tr>
          </table>
        </HeaderTemplate>
        <ItemTemplate >
          <table id="Table2" cellspacing="0" cellpadding="0" width="100%" border="0"  style="margin: 0px 0px 0px 0px;" >
            <tr>
              <td align="right" width="33%" style="border-bottom-color:White; border-left-color:White">
                <%# Eval("OpenItemsCountPrior", "{0:N0}") %>
              </td>
   <td align="right" width="33%" style="border-bottom-color:White">
                <%# Eval("OpenItemsCountLastMonth", "{0:N0}")%>
              </td>              
              <td align="right" width="34%" style="border-bottom-color:White">
                <%#  Eval("OpenItemsCountCurrent", "{0:N0}") %>
              </td>
                       
            </tr>
          </table>
        </ItemTemplate>
      </telerik:GridTemplateColumn>
                      
                                    <telerik:GridTemplateColumn DataField="TotalRemainingItems" HeaderText="Items Left to Pay"
                                        UniqueName="TotalRemainingItems" SortExpression="TotalRemainingItems">
                                        <HeaderStyle Font-Bold="True" Width="95px" HorizontalAlign="Center" Font-Names="Arial" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblTotalRemain" runat="server" Text='<%# Eval("TotalRemainingItems", "{0:N0}") %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Right" ForeColor="Black" />
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" />
                                    </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn DataField="CompleteCount" HeaderText="Complete"
                                        UniqueName="CompleteCount" SortExpression="CompleteCount">
                                        <HeaderStyle Font-Bold="True" Width="80px" HorizontalAlign="Center" Font-Names="Arial" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblCompleteCount" runat="server" Text='<%# Eval("CompleteCount", "{0:N0}") %>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Right" ForeColor="Black" />
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" />
                                    </telerik:GridTemplateColumn>
                                    <telerik:GridTemplateColumn DataField="PercentComplete" HeaderText="% Complete" UniqueName="clmPctComplete"
                                        SortExpression="PercentComplete">
                                        <HeaderStyle Font-Bold="True" Width="85px" HorizontalAlign="Center" Font-Names="Arial" />
                                        <ItemTemplate>
                                            <asp:Label ID="lblPctComplete" runat="server" Text='<%# Eval("PercentComplete", "{0:N2}%")%>'></asp:Label>
                                        </ItemTemplate>
                                        <ItemStyle HorizontalAlign="Right" ForeColor="Black" />
                                        <FooterStyle HorizontalAlign="Right" Font-Bold="true" />
                                    </telerik:GridTemplateColumn>
                    
                                </Columns>
                            </mastertableview>
                            <headerstyle borderstyle="Solid" />
                            <clientsettings>
                                <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                            </clientsettings>
                        </telerik:RadGrid>
Galin
Telerik team
 answered on 11 Nov 2011
3 answers
766 views
Hello,
We are using RadGrid for inserting/updating/deleting the employee address details.
When we select insert button, edit button, Insert/cancel/update buttons, the whole page is refreshing.
We tried to put Radgrid inside RadAjaxmanger. Then Insert/Cancel/Update buttons inside edit form are not working .
Could you please tell how to put Radgrid inside RadAjaxManager.


Thanks,
AV
Tsvetina
Telerik team
 answered on 11 Nov 2011
4 answers
134 views
I have a RadEditor and set its MaxHtmlLength to 50. When I enter more than 50 characters (without any markups) it show an alert box, which is as expected. However, if I add a list, it takes more than 50 characters and does not show an alert message. When I tested the length of the content in server side, it is more than 50.

Here is what I did:
1. Add a RadEditor and a RadButton on the aspx page.
<telerik:RadEditor runat="server" ID="RadEditor1" SkinID="DefaultSetOfTools" Height="515" />
 
<telerik:RadButton ID="btnSave" runat="server"Text="Save">
                <Icon PrimaryIconUrl="/images/usb.png" PrimaryIconLeft="5px" />
            </telerik:RadButton>

2. On Page_Init set the MaxHtmlLength to 50.
this.RadEditor1.MaxHtmlLength = 50;

3. Enter some text and click the button for save.
 Text I used is: 
one two three four five six seven eight nine tens
It has length of 49. If I add another character, I get an alert box though the MaxHtmlLength is 50. 

4. Try some text in a list.
Text I used is:
  • one
  • two thre
 The content for this is, "<ul>\r\n    <li>one</li>\r\n    <li>two thre</li>\r\n</ul>" and the length is 52. I don't get any alert message for this. However, if you try to add one more character, I get an alert message. 

This is how I checked the content and length.
this.RadEditor1.Content.Length; // Get the length of RadEditor content (the value is 52)
this.RadEditor1.Content; // Get the content of the RadEditor ( the value is "<ul>\r\n    <li>one</li>\r\n    <li>two thre</li>\r\n</ul>")

If you increase the MaxHtmlLength to 70 and try with 3 list items, the maximum length allowed is 73. I tested with MaxHtmlLength of 30, 50, and 70 for which the lengths allowed without any alert message are 31, 52, and 73 respectively. 

Note: All this was done using google chrome.

The behavior is different in IE 8. It allows for more than the specified MaxHtmlLength and also appends space at the end of each list.  
Here is how you can reproduce the problem


1. Add the text in list ( I used the same text)
  • one
  • two thre
 Save the data. (For this I have changed the maximum length for the field to 55 in database). It saves without any alert message.
Now, initialize the editor content with the data and try to save again. The same data is not allowed to save and an alert message pops up. I checked and found that space is appended at the end of each list. 

Here is the content in IE8 

"<ul>\r\n    <li>one </li>\r\n    <li>two thre </li>\r\n</ul>"

See the space between the 'e' in one and </li> and also between 'e' in thre and </li> and the length is 54. Try removing 'hr' ( any two characters) it allows to save with the length of 52. It is supposed to show an alert message.

Here is the code for get and set.
get
            {
                return this.RadEditor1.Content.Trim();
            }
  set
            {
                this.RadEditor1.Content = value;
              
            }


I hope this helps you to reproduce the issue.






Rumen
Telerik team
 answered on 11 Nov 2011
11 answers
106 views
Hi, I'm trying to implement the Rad Scheduler control for an application I'm writing and I've had an odd issue I don't understand.

I'm trying to bind to a list of objects (c# & asp.Net 4.0) and I started getting the error:

DataKeyField, DataSubjectField, DataStartField and DataEndField are required for databinding


So I think I fixed that by assigning values to the listed requirements. Then I started having trouble with my datasource and have now remarked out the entire section that binds the control to deal with that separately.

Now, even with no binding happening, I still get this error. This didn't seem to happen at first - I was getting a blank schedule before if I didn't bind so I'm not sure why I get this error now. It also happens before any of my code on that particular page executes.

Any ideas to get me back on track? Thanks!
Peter
Telerik team
 answered on 11 Nov 2011
8 answers
204 views
This can be demonstrated on your demo page at

http://demos.telerik.com/aspnet-ajax/window/examples/radwindowandmdi/defaultvb.aspx

If you keep adding windows, which causes new tabs to be added, you end up with a single tab in a second row.  The scroll bars work, but you still end up with the second row.

Can you advise?

Thanks.
Evtim
Top achievements
Rank 1
 answered on 11 Nov 2011
1 answer
98 views
Hi,

Was wondering if anyone else has seen this and maybe fixed it:

I have a RadGrid inside a panel - it basically shows email headers in the grid and a panel below show the email details when a row is clicked - similar to a WebMail / Outlook type thing. Splitterbar between them.

The Grid has 50 items per page and many pages. If I click on a row that is visible without scrolling the grid e.g. Row 5 - it is selected and the ajax JS fires to load in the email detail fine. If I scroll the grid, even by 1 row and then click a row (any row) - the grid scrolls back to the top and no row is selected.

This only happens in IE9 and only if EnableDragToSelectRows=False

If I set EnableDragToSelectRows=True then I can scroll down and select one or more rows without issue. However, if I then set AllowRowsDragDrop to true, I can select the row but if I right click the selectewd row to show a context menu - this then scrolls back to the top of the grid. If I set AllowRowsDragDrop=False then I can select the row after scroll and show the context menu fine but obviously I can't then drag this row to a tree etc.

I am unable to reproduce this in a simple test to provide code, so I am guessing it is something I have done with some setting/JS etc but just hoping someone else may have done the same and fixed it.....

AllowKeyboardNavigation is turned on as I need this too. But this doesn't seem to change the behavour of the problem.

Thanks in advance.

Ro
Rohan
Top achievements
Rank 1
 answered on 11 Nov 2011
3 answers
114 views
Hi,
I have a program to export content of radgrid to excel file as follows:
RadGrid1.ExportSettings.IgnorePaging = true; (or false)
RadGrid1.ExportSettings.OpenInNewWindow = false;
RadGrid1.ExportSettings.ExportOnlyData = true;
 
RadGrid1.MasterTableView.ShowFooter = false;
RadGrid1.MasterTableView.AllowFilteringByColumn = true;
RadGrid1.ExportSettings.FileName = "FPG_Orders_All_Pages";
 
RadGrid1.MasterTableView.ExportToExcel();
It worked fine before. But recently it is very slow to open file dialogbox. Once clicking on open or save, it displays a box shown in image and seems downloading the current webpage containing the radgrid. I have to click on cancel and then it will popup excel windows. I want to know what causes this problem. Is there a upgrade of telerik for that?

Thanks.
Daniel
Telerik team
 answered on 11 Nov 2011
3 answers
526 views
ASP.net has had a bug with the RadioButton controls running inside of templates since 1.0. I wanted to use the RadButton as a replacement for the standard RadioButton. I have multiple Radbuttons (in Radio mode) being built by a RadListView. When the result is rendered, I get radio buttons that don't participate as if in a Group ( You can select all the radio buttons ).

Same thing happens to ASP.net RadioButtons. In the past I've hacked around this with custom RadioButton classes that handle outputting the propert ID to the client with respect the GroupName property. Also, I've done the client side javascript hack.

This is such a common hack in ASP.net I was hoping the Telerik RadButton would just work in this situation. 

Here's an example of me using the Radbutton in a template:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CheckListInputGroupView.ascx.cs" Inherits="ProjectCold.RadTest.WebApplication.Views.CheckListInputGroupView" %>
<%@ Import Namespace="ProjectCold.RadTest.WebApplication.Model" %>
<%@ Import Namespace="Telerik.Web.UI" %>
 
<telerik:RadListView ID="RadListView" runat="server"
    DataSource='<%#Bind("GroupItems")%>'
    ItemPlaceholderID="GroupItemsHolder"
    DataKeyNames="GroupItemID">
    <LayoutTemplate>
        <fieldset title='<%#Eval("ToolTip")%>'>
            <legend><%#Eval("Caption")%></legend>
            <asp:Panel ID="GroupItemsHolder" runat="server" />
        </fieldset>
    </LayoutTemplate>
    <ItemTemplate>
        <telerik:RadButton
            runat="server"
            GroupName='<%#Eval("FK_CheckListInputID", "InputGroup{0}")%>'
            Text='<%#Eval("Text")%>'
            ButtonType="ToggleButton"
            ToggleType='<%# ( (CheckListInputGroup.InputGroupTypes)Eval("CheckListInputGroup.InputGroupType") == CheckListInputGroup.InputGroupTypes.Radio ? ButtonToggleType.Radio : ButtonToggleType.CheckBox) %>'
             />
    </ItemTemplate>
    <ItemSeparatorTemplate>
        <br />
    </ItemSeparatorTemplate>
</telerik:RadListView>

What's the best way to get my RadButton's to act like proper RadioButton's (mutually exclusive selection)?

Also, this is .Net 4, so I have access to the new ClientIDMode. I tried switching it to static, and using a static ID, but it caused a JSON error later when i click on a button.

Kevin
Top achievements
Rank 2
 answered on 11 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?