Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
157 views
Hey Telerik,

We are looking for a solution to convert web form ASP.NET to MVC ASP.NET.
There are a lot telerik ASP.NET AJAX controls are used in our web form ASP.NET application like RadGrid\RadComboBox\RadAjaxManager\RadAjaxLoadingPanel\RadListBox......

Can we convert the telerik ASP.NET AJAX control to ASP.NET MVC control?

Thanks in Advance!
Jennifer
Jennifer
Top achievements
Rank 1
 answered on 07 Oct 2013
7 answers
181 views
I understand that when databinding to a web service you can't use the ItemTemplate. As a workaround, I set the Text property of the RadComboBoxItemData to the HTML I wanted to display in the drop down. This works, except that if I select an item in the drop down or use the up or down keys to navigate through the items, the HTML is displayed in the textbox. I am able to change the text when the selected item is changed, using a custom attribute of the item, but I'm not sure how to handle it for the up and down arrow selections.

Is there an event that fires when the text in the textbox is set? Or a way to override what is displayed in the textbox? Basically I need a way to set the DataTextField on the client side if that's possible.

We're really trying to avoid the old load on demand since this is on a master page. We don't want to have all those partial postbacks and the web service seems to be much faster.
Wojtek Victor
Top achievements
Rank 1
 answered on 07 Oct 2013
5 answers
95 views
I have a treeview which i have used extended template 
public class MyNodeTemplate : ITemplate
   {
       public string StrText { get; set; }
 
       public void InstantiateIn(Control container)
       {
           var txt = new TextBox();
           if (!String.IsNullOrEmpty(StrText))
           {
               txt.Width = new Unit(StrText.Length, UnitType.Em);
               txt.Text = StrText;
           }
           container.Controls.Add(txt);
       }
   }

I am binding it on some dropdownlist selected index change event

if (ddlTemplateSource.SelectedValue != "0")
            {
                TreeView1.Nodes.Clear();
 
 
                var lstSections =  SourceSectionBll.GetInstance.GetSourceSectionsByTemplateSourceId(Int32.Parse(ddlTemplateSource.SelectedValue));
 
 
                if (lstSections != null)
                {
                       if (obj.LstSimpleFieldSectionMappers != null &&  )
                        {
                            var tNodeChildSimpleFields = new RadTreeNode("Simple_fields_Control");
 
                            foreach (var objSimplefield in    obj.LstSimpleFields)
                            {
                                var tNodeChildSimpleFieldTextEntry = new RadTreeNode(objSimplefield.FieldName);
                                var tSimpleFiledLeafNode = new RadTreeNode {Expanded = true};
 
                                var objtemplate = new MyNodeTemplate {StrText = objSimplefield.FieldCode};
                                objtemplate.InstantiateIn(tSimpleFiledLeafNode);
                                tNodeChildSimpleFieldTextEntry.Nodes.Add(tSimpleFiledLeafNode);
                                tNodeChildSimpleFields.Nodes.Add(tNodeChildSimpleFieldTextEntry);
                            }
                            tNode.Nodes.Add(tNodeChildSimpleFields);
                        }                     
                        TreeView1.Nodes.Add(tNode);
                }               
            }

Problem is that treeview loses text inside the textbox when there is a button click event is triggerd
Anyway i can intact the data in the text box of MyNodeTemplate template?


kamii47
Top achievements
Rank 1
 answered on 07 Oct 2013
1 answer
137 views
Hi,

  1. Need to create a RadTreeView with multiple levels. Choose the LoadOnDemand approach as it improves the performance.
  2. Initially Treeview binds declaratively with first level of data. Treeview contain NodeTemplate.
  3. While expanding the TreeNode, created sub Treenode in OnNodeExpand as shown here.

        http://www.telerik.com/help/aspnet-ajax/treeview-load-on-demand-server.html

  4. But node.Text and node.Value not setting value for NodeTemplate
  5. Tried to create NodeTemplate from code, that is also not working.

  So my scenario is to work on NodeTemplate and LoadOndemand together. Am I missing something?


Thanks.
Boyan Dimitrov
Telerik team
 answered on 07 Oct 2013
1 answer
415 views
Hi everyone,

How Can I create my radgrid subdivided by groups and subgroups with structure generated dynamically?
For example, considering the following scenario: I have one item list that represent this structure of groups
and subgroups and I need to do bind it in the radgrid.

Group1
|________Item1.1
|________SubGroup1.1
|          |________Item1.1.1
|          |________SubGroup1.1.1
|________SubGroup1.2
|________SubGroup1.3
           |________Item1.3.1
Group2
|________Subgroup2.1

I am using GridGroupByExpression in codebehind to simulate the grouping in the radgrid, but I could only display the first level of grouping
Group1
|________Item1.1
|________SubGroup1.1
|________SubGroup1.2
|________SubGroup1.3
Group2
|________Subgroup2.1

Below is my radgrid

<telerik:RadGrid ID="radGrid" Width="100%" Skin="Silk" AllowSorting="True" ShowFooter="true"
AllowPaging="True" runat="server" AutoGenerateColumns="False" ShowStatusBar="True"
AllowMultiRowSelection="true"
EnableLinqExpressions="False" CellSpacing="0" GridLines="None" OnItemCommand="radGrid_ItemCommand"
        OnItemDataBound="radGrid_ItemDataBound" >
<ClientSettings AllowDragToGroup="true" AllowColumnsReorder="true" AllowGroupExpandCollapse="true"
    ReorderColumnsOnClient="true" 
ColumnsReorderMethod="Reorder" EnableRowHoverStyle="true">
    <Selecting AllowRowSelect="true"/>
    <Animation AllowColumnReorderAnimation="true" AllowColumnRevertAnimation="true">
    </Animation
</ClientSettings>
        <MasterTableView DataSourceID="odsGrupoProduto" DataKeyNames="IdItem,IdGroup"
                 
NoMasterRecordsText="Nenhum registro encontrado.">
        <Columns>
                 <telerik:GridBoundColumn DataField="Description" HeaderText="Description"
     SortExpression="Description" UniqueName="Description">
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                 </telerik:GridBoundColumn>
 <telerik:GridTemplateColumn Reorderable="false" Resizable="false">
                        <ItemTemplate>
                        <asp:ImageButton ID="ibEditSubGroup" runat="server"
ToolTip="Edit SubGroup."
                                        CommandArgument='<%# Eval("IdGroup")%>'
       CommandName="Edit"
       ImageUrl="~/imagems/edit.png" />
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                 </telerik:GridTemplateColumn>
                 <telerik:GridTemplateColumn Reorderable="false" Resizable="false">
                        <ItemTemplate>
                                 <asp:ImageButton ID="ibRemove" runat="server"
ToolTip="Remove item."
                                        CommandArgument='<%# Eval("IdItem")%>'
       CommandName="Remove"
                                                       ImageUrl="~/imagems/delete.png" />
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                 </telerik:GridTemplateColumn>
       </Columns>
 </MasterTableView>
</telerik:RadGrid>
<asp:ObjectDataSource ID="ods" runat="server" SelectMethod="ListItems"
TypeName="ControllerGroup">
</asp:ObjectDataSource>

I set GridGroupByExpression in the method that load my radgrid:

private void LoadGrid()
{
       ods.SelectParameters.Clear();
       radGrid.DataSourceID = "ods";
       ods.DataBind();
 
       GridGroupByExpression expression1 = GridGroupByExpression.Parse("Type Group By Type");
       this.radGrid.MasterTableView.GroupByExpressions.Add(expression1);
       radGrid.Rebind();
}

Below is my class of item of list

public class Item
{
     public int? IdGroup;
     public string Description;
     public string Type;
     public int? IdGroupParent;
     public int? IdItem;
}
From my class, the field Type can assume the following values: "Group","SubGroup" and "Item".

Please, give me ideas about how can I resolve this issue!

Thanks!
Eyup
Telerik team
 answered on 07 Oct 2013
1 answer
157 views
I know this has been discusses may times over. The majority of posts never quite apply or do nto have a definitive answer that I could get to work for me.

I am using radajaxmanager, I have a hidden formview and a radlisteview. I an trying to use the formview to insert records ( also edit in the future if I can get this to work) , then hide the formview and refresh/rebind the listview without a page refresh.  I have tried about 100 times now and I cannot get the listview to refresh. 
2 other issues. I couldnt get the default insert form for the radlistview to show, no matter what options I chose.
When I delete a record from the list view, the add new button no longer works as well. I am guessing this is bad placement of the radcodeblock?


<div class="section">
       <script type="text/javascript">
           function setCustomPosition(sender, args) {
               sender.moveTo(sender.get_left(), sender.get_top());
           }
       </script>
   <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" onajaxrequest="RadAjaxManager1_AjaxRequest" >
       <AjaxSettings>
           <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
               <UpdatedControls>
                   <telerik:AjaxUpdatedControl ControlID="RadListView1" UpdatePanelCssClass="" />
               </UpdatedControls>
           </telerik:AjaxSetting>
       </AjaxSettings>
   </telerik:RadAjaxManager>
       <telerik:RadWindow ID="FVPopup" runat="server" Width="500px" Height="200px" Modal="true" OnClientShow="setCustomPosition" Top="20" Left="50">
           <ContentTemplate>
   
                   <asp:FormView CssClass="securityFormView" ID="FormView1" runat="server" DefaultMode="Insert" DataKeyNames="msgID" DataSourceID="SqlDataSource2">
                       <EditItemTemplate>
                           Title:
                           <asp:TextBox ID="titleTextBox" runat="server" Text='<%# Bind("title") %>' />
                           <br />
                           Message:
                           <asp:TextBox ID="messageTextBox" runat="server" Text='<%# Bind("message") %>' />
                           <br />
                           hasBeenBroadcast:
                           <asp:CheckBox ID="hasBeenBroadcastCheckBox" runat="server" Checked='<%# Bind("hasBeenBroadcast") %>' />
                           <br />
                           createdDate:
                           <asp:Label ID="createdDateLabel" runat="server" Text='<%# Bind("createdDate") %>' />
                           <br />
                           <asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" />
                            <asp:Button ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                       </EditItemTemplate>
                       <InsertItemTemplate>
                           Title:        
                           <asp:TextBox ID="titleTextBox" runat="server" Text='<%# Bind("title") %>' />
                           <br />
                           Message:
                           <asp:TextBox ID="messageTextBox" runat="server" Text='<%# Bind("message") %>' />
                           <br />
                           <telerik:RadButton OnClientClicked="closePopupModality" ID="InsertButton" runat="server" CommandName="Insert" Text="Insert" CausesValidation="true" />
                            <telerik:RadButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />
                       </InsertItemTemplate>
                       <ItemTemplate>
                           title:
                           <asp:Label ID="titleLabel" runat="server" Text='<%# Bind("title") %>' />
                           <br />
                           message:
                           <asp:Label ID="messageLabel" runat="server" Text='<%# Bind("message") %>' />
                           <br />
                           hasBeenBroadcast:
                           <asp:CheckBox ID="hasBeenBroadcastCheckBox" runat="server" Checked='<%# Bind("hasBeenBroadcast") %>' Enabled="false" />
                           <br />
                           createdDate:
                           <asp:Label ID="createdDateLabel" runat="server" Text='<%# Bind("createdDate") %>' />
                           <br />
                           msgID:
                           <asp:Label ID="msgIDLabel" runat="server" Text='<%# Eval("msgID") %>' />
                           <br />
                           <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" Text="Edit" />
                            <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" Text="Delete" />
                            <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New" Text="New" />
                       </ItemTemplate>
                   </asp:FormView>
 
 
           </ContentTemplate>
       </telerik:RadWindow>
                           <telerik:RadCodeBlock runat="server" ID="rdbScripts">
                       <script type="text/javascript">
                           function togglePopupModality() {
                               var wnd = $find("<%=FVPopup.ClientID %>");
                               wnd.set_modal(!wnd.get_modal());
                               if (!wnd.get_modal()) document.documentElement.focus();
                           }
                           function closePopupModality() {
 
                               var wnd = $find("<%=FVPopup.ClientID %>");
                               wnd.close();
                             var ajaxMan= $find("<%=RadAjaxManager1.ClientID %>")
                             ajaxMan.ajaxRequest("Rebind");
                           }
                       </script>
                   </telerik:RadCodeBlock>
       <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" Skin="Office2010Blue" />
       <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:NSMCWebConnectionString %>" DeleteCommand="DELETE FROM [ISAdminSecurity] WHERE [msgID] = @msgID" InsertCommand="INSERT INTO [ISAdminSecurity] ([title], [message], [hasBeenBroadcast], [createdDate]) VALUES (@title, @message, @hasBeenBroadcast, GETDATE())" SelectCommand="SELECT [title], [message], [hasBeenBroadcast], [createdDate], [msgID] FROM [ISAdminSecurity] ORDER BY [createdDate]" UpdateCommand="UPDATE [ISAdminSecurity] SET [title] = @title, [message] = @message, [hasBeenBroadcast] = @hasBeenBroadcast, [createdDate] = @createdDate WHERE [msgID] = @msgID">
           <DeleteParameters>
               <asp:Parameter Name="msgID" Type="Int32" />
           </DeleteParameters>
           <InsertParameters>
               <asp:Parameter Name="title" Type="String" />
               <asp:Parameter Name="message" Type="String" />
               <asp:Parameter Name="hasBeenBroadcast" Type="Boolean" DefaultValue="False" />
               <asp:Parameter Name="createdDate" Type="DateTime" />
           </InsertParameters>
           <UpdateParameters>
               <asp:Parameter Name="title" Type="String" />
               <asp:Parameter Name="message" Type="String" />
               <asp:Parameter Name="hasBeenBroadcast" Type="Boolean" />
               <asp:Parameter Name="createdDate" Type="DateTime" />
               <asp:Parameter Name="msgID" Type="Int32" />
           </UpdateParameters>
       </asp:SqlDataSource>
 
           <telerik:RadListView ID="RadListView1" runat="server" AllowPaging="True" DataKeyNames="msgID" DataSourceID="SqlDataSource1" AllowNaturalSort="True" InsertItemPosition="FirstItem" Skin="Office2010Blue">
               <LayoutTemplate>
                   <div class="RadListView RadListView_Office2010Blue">
                       <table cellspacing="0" style="width: 100%;">
                           <thead>
                               <tr class="rlvHeader">
                                   <th>
                                       <telerik:RadButton AutoPostBack="false" OnClientClicked="togglePopupModality" ID="AddNewItem" runat="server" Text="Add New" />
                                   </th>
                                   <th>
                                       title
                                   </th>
                                   <th>
                                       message
                                   </th>
                                   <th>
                                       hasBeenBroadcast
                                   </th>
                                   <th>
                                       createdDate
                                   </th>
                                   <th>
                                       msgID
                                   </th>
                               </tr>
                           </thead>
                           <tfoot>
                               <tr>
                                   <td colspan="6">
                                       <telerik:RadDataPager ID="RadDataPager1" runat="server" SEOPagingQueryPageKey="" Skin="Office2010Blue">
                                           <Fields>
                                               <telerik:RadDataPagerButtonField FieldType="FirstPrev" LastButtonImageUrl="" NextButtonImageUrl="" PrevButtonImageUrl="" />
                                               <telerik:RadDataPagerButtonField FieldType="NextLast" LastButtonImageUrl="" NextButtonImageUrl="" PrevButtonImageUrl="" />
                                           </Fields>
                                       </telerik:RadDataPager>
                                   </td>
                               </tr>
                           </tfoot>
                           <tbody>
                               <tr id="itemPlaceholder" runat="server">
                               </tr>
                           </tbody>
                       </table>
                       <div style="display: none">
                           <telerik:RadCalendar ID="rlvSharedCalendar" runat="server" RangeMinDate="<%#new DateTime(1900, 1, 1) %>" Skin="<%#Container.Skin %>" />
                       </div>
                       <div style="display: none">
                           <telerik:RadTimeView ID="rlvSharedTimeView" runat="server" Skin="<%# Container.Skin %>" />
                       </div>
                   </div>
               </LayoutTemplate>
               <ItemTemplate>
                   <tr class="rlvI">
                       <td>
                           <asp:Button ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" CssClass="rlvBDel" Text=" " ToolTip="Delete" />
                           <asp:Button ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" CssClass="rlvBEdit" Text=" " ToolTip="Edit" />
                       </td>
                       <td>
                           <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' />
                       </td>
                       <td>
                           <asp:Label ID="messageLabel" runat="server" Text='<%# Eval("message") %>' />
                       </td>
                       <td>
                           <asp:CheckBox ID="hasBeenBroadcastCheckBox" runat="server" Checked='<%# Eval("hasBeenBroadcast") %>' Enabled="false" />
                       </td>
                       <td>
                           <asp:Label ID="createdDateLabel" runat="server" Text='<%# Eval("createdDate") %>' />
                       </td>
                       <td>
                           <asp:Label ID="msgIDLabel" runat="server" Text='<%# Eval("msgID") %>' />
                       </td>
                   </tr>
               </ItemTemplate>
               <AlternatingItemTemplate>
                   <tr class="rlvA">
                       <td>
                           <asp:Button ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" CssClass="rlvBDel" Text=" " ToolTip="Delete" />
                           <asp:Button ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" CssClass="rlvBEdit" Text=" " ToolTip="Edit" />
                       </td>
                       <td>
                           <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' />
                       </td>
                       <td>
                           <asp:Label ID="messageLabel" runat="server" Text='<%# Eval("message") %>' />
                       </td>
                       <td>
                           <asp:CheckBox ID="hasBeenBroadcastCheckBox" runat="server" Checked='<%# Eval("hasBeenBroadcast") %>' Enabled="false" />
                       </td>
                       <td>
                           <asp:Label ID="createdDateLabel" runat="server" Text='<%# Eval("createdDate") %>' />
                       </td>
                       <td>
                           <asp:Label ID="msgIDLabel" runat="server" Text='<%# Eval("msgID") %>' />
                       </td>
                   </tr>
               </AlternatingItemTemplate>
               <EditItemTemplate>
                   <tr class="rlvIEdit">
                       <td colspan="6">
                           <table cellspacing="0" class="rlvEditTable">
                               <tr>
                                   <td>
                                       <asp:Label ID="titleLabel2" runat="server" AssociatedControlID="titleTextBox" Text="title"></asp:Label>
                                   </td>
                                   <td>
                                       <asp:TextBox ID="titleTextBox" runat="server" CssClass="rlvInput" Text='<%# Bind("title") %>' />
                                   </td>
                               </tr>
                               <tr>
                                   <td>
                                       <asp:Label ID="messageLabel2" runat="server" AssociatedControlID="messageTextBox" Text="message"></asp:Label>
                                   </td>
                                   <td>
                                       <asp:TextBox ID="messageTextBox" runat="server" CssClass="rlvInput" Text='<%# Bind("message") %>' />
                                   </td>
                               </tr>
                               <tr>
                                   <td>
                                       <asp:Label ID="hasBeenBroadcastLabel2" runat="server" AssociatedControlID="hasBeenBroadcastCheckBox" Text="hasBeenBroadcast"></asp:Label>
                                   </td>
                                   <td>
                                       <asp:CheckBox ID="hasBeenBroadcastCheckBox" runat="server" Checked='<%# Bind("hasBeenBroadcast") %>' />
                                   </td>
                               </tr>
                               <tr>
                                   <td>
                                       <asp:Label ID="createdDateLabel2" runat="server" AssociatedControlID="createdDateTextBox" Text="createdDate"></asp:Label>
                                   </td>
                                   <td>
                                       <telerik:RadDateTimePicker ID="createdDateTextBox" runat="server" DbSelectedDate='<%# Bind("createdDate") %>' MinDate="<%#new DateTime(1900, 1, 1) %>" SharedCalendarID='<%# Container.OwnerListView.FindControl("rlvSharedCalendar").UniqueID %>' SharedTimeViewID='<%# Container.OwnerListView.FindControl("rlvSharedTimeView").UniqueID %>' Skin="<%#Container.OwnerListView.Skin %>" />
                                   </td>
                               </tr>
                               <tr>
                                   <td>
                                       <asp:Label ID="msgIDLabel2" runat="server" Text="msgID"></asp:Label>
                                   </td>
                                   <td>
                                       <asp:Label ID="msgIDLabel1" runat="server" Text='<%# Eval("msgID") %>' />
                                   </td>
                               </tr>
                               <tr>
                                   <td colspan="2">
                                       <asp:Button ID="UpdateButton" runat="server" CommandName="Update" CssClass="rlvBUpdate" Text=" " ToolTip="Update" />
                                       <asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel" CssClass="rlvBCancel" Text=" " ToolTip="Cancel" />
                                   </td>
                               </tr>
                           </table>
                       </td>
                   </tr>
               </EditItemTemplate>
               <InsertItemTemplate>
                   <tr class="rlvIEdit">
                       <td colspan="6">
                           <table cellspacing="0" class="rlvEditTable">
                               <tr>
                                   <td>
                                       <asp:Label ID="titleLabel2" runat="server" AssociatedControlID="titleTextBox" Text="title"></asp:Label>
                                   </td>
                                   <td>
                                       <asp:TextBox ID="titleTextBox" runat="server" CssClass="rlvInput" Text='<%# Bind("title") %>' />
                                   </td>
                               </tr>
                               <tr>
                                   <td>
                                       <asp:Label ID="messageLabel2" runat="server" AssociatedControlID="messageTextBox" Text="message"></asp:Label>
                                   </td>
                                   <td>
                                       <asp:TextBox ID="messageTextBox" runat="server" CssClass="rlvInput" Text='<%# Bind("message") %>' />
                                   </td>
                               </tr>
                               <tr>
                                   <td>
                                       <asp:Label ID="hasBeenBroadcastLabel2" runat="server" AssociatedControlID="hasBeenBroadcastCheckBox" Text="hasBeenBroadcast"></asp:Label>
                                   </td>
                                   <td>
                                       <asp:CheckBox ID="hasBeenBroadcastCheckBox" runat="server" Checked='<%# Bind("hasBeenBroadcast") %>' />
                                   </td>
                               </tr>
                               <tr>
                                   <td>
                                       <asp:Label ID="createdDateLabel2" runat="server" AssociatedControlID="createdDateTextBox" Text="createdDate"></asp:Label>
                                   </td>
                                   <td>
                                       <telerik:RadDateTimePicker ID="createdDateTextBox" runat="server" DbSelectedDate='<%# Bind("createdDate") %>' MinDate="<%#new DateTime(1900, 1, 1) %>" SharedCalendarID='<%# Container.OwnerListView.FindControl("rlvSharedCalendar").UniqueID %>' SharedTimeViewID='<%# Container.OwnerListView.FindControl("rlvSharedTimeView").UniqueID %>' Skin="<%#Container.OwnerListView.Skin %>" />
                                   </td>
                               </tr>
                               <tr>
                                   <td colspan="2">
                                       <asp:Button ID="PerformInsertButton" runat="server" CommandName="PerformInsert" CssClass="rlvBAdd" Text=" " ToolTip="Insert" />
                                       <asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel" CssClass="rlvBCancel" Text=" " ToolTip="Cancel" />
                                   </td>
                               </tr>
                           </table>
                       </td>
                   </tr>
               </InsertItemTemplate>
               <EmptyDataTemplate>
                   <div class="RadListView RadListView_Office2010Blue">
                       <div class="rlvEmpty">
                           There are no items to be displayed.</div>
                   </div>
               </EmptyDataTemplate>
               <ValidationSettings EnableModelValidation="False" EnableValidation="False" />
               <SelectedItemTemplate>
                   <tr class="rlvISel">
                       <td>
                           <asp:Button ID="DeselectButton" runat="server" CausesValidation="False" CommandName="Deselect" CssClass="rlvBSel" Text=" " ToolTip="Deselect" />
                           <asp:Button ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete" CssClass="rlvBDel" Text=" " ToolTip="Delete" />
                           <asp:Button ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit" CssClass="rlvBEdit" Text=" " ToolTip="Edit" />
                       </td>
                       <td>
                           <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' />
                       </td>
                       <td>
                           <asp:Label ID="messageLabel" runat="server" Text='<%# Eval("message") %>' />
                       </td>
                       <td>
                           <asp:CheckBox ID="hasBeenBroadcastCheckBox" runat="server" Checked='<%# Eval("hasBeenBroadcast") %>' Enabled="false" />
                       </td>
                       <td>
                           <asp:Label ID="createdDateLabel" runat="server" Text='<%# Eval("createdDate") %>' />
                       </td>
                       <td>
                           <asp:Label ID="msgIDLabel" runat="server" Text='<%# Eval("msgID") %>' />
                       </td>
                   </tr>
               </SelectedItemTemplate>
           </telerik:RadListView>
       <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NSMCWebConnectionString %>" DeleteCommand="DELETE FROM [ISAdminSecurity] WHERE [msgID] = @msgID" InsertCommand="INSERT INTO [ISAdminSecurity] ([title], [message], [hasBeenBroadcast], [createdDate]) VALUES (@title, @message, @hasBeenBroadcast, @createdDate)" SelectCommand="SELECT [title], [message], [hasBeenBroadcast], [createdDate], [msgID] FROM [ISAdminSecurity] ORDER BY [createdDate]" UpdateCommand="UPDATE [ISAdminSecurity] SET [title] = @title, [message] = @message, [hasBeenBroadcast] = @hasBeenBroadcast, [createdDate] = @createdDate WHERE [msgID] = @msgID">
           <DeleteParameters>
               <asp:Parameter Name="msgID" Type="Int32" />
           </DeleteParameters>
           <InsertParameters>
               <asp:Parameter Name="title" Type="String" />
               <asp:Parameter Name="message" Type="String" />
               <asp:Parameter Name="hasBeenBroadcast" Type="Boolean" />
               <asp:Parameter Name="createdDate" Type="DateTime" />
           </InsertParameters>
           <UpdateParameters>
               <asp:Parameter Name="title" Type="String" />
               <asp:Parameter Name="message" Type="String" />
               <asp:Parameter Name="hasBeenBroadcast" Type="Boolean" />
               <asp:Parameter Name="createdDate" Type="DateTime" />
               <asp:Parameter Name="msgID" Type="Int32" />
           </UpdateParameters>
       </asp:SqlDataSource>
   </div>
Konstantin Dikov
Telerik team
 answered on 07 Oct 2013
1 answer
293 views
 
   Hi,
       How can I disable radbutton after button-click. Please guide me somebody.

   Thanks
    Savyo
Shinu
Top achievements
Rank 2
 answered on 07 Oct 2013
8 answers
1.2K+ views

I am trying to set an initial filter on a radgrid.

I have used the code in the prerender      

receiptlist.MasterTableView.FilterExpression = "([receiptlist] LIKE '%148047%')" 
        Dim column As GridColumn = receiptlist.MasterTableView.GetColumnSafe("receiptlist")
        column.CurrentFilterFunction = GridKnownFunction.Contains
        column.CurrentFilterValue = "148047"
        receiptlist.Rebind()

And have set the uniquename of the column to "receiptlist" and also made the columns filterable.

Unfortunately I get the "expression expected" error on the rebind.

Any ideas?
Andry
Top achievements
Rank 1
 answered on 07 Oct 2013
1 answer
131 views
 Hi,

  I have a RadGrid and in which I have enabled filtering option. I want to restrict the length of the text to be entered. But the maxlength option is not working. Can somebody guide me as to why i'm unable to set the maxlength. Or is there some other way I can accomplish this 

thank you
RT
Princy
Top achievements
Rank 2
 answered on 07 Oct 2013
1 answer
120 views

 Hi,
     How can I show or hide filtering item based on some conditions?

 Somebody please help me out. Would appreciate immediate help.

thanks in advance,
Allen
Princy
Top achievements
Rank 2
 answered on 07 Oct 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?