Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
87 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
337 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
117 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
240 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.1K+ 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
91 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
82 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
1 answer
29 views
I'm having an issue with recurring appointments which include Mondays (i.e: Monday, Tues, Wed...or...Mon, Wed....etc).

Let's say the recurring appointment is set to Tuesday or thursday (or any combination of days not including Monday), from 11am - 12pm, it shows up fine on the calendar.

Now let's say the recurring appointment is Monday, Wednesday and Friday, from 9am-10am...from 8/1/2013 thru 12/31/2013.  The appointment shows up in the 9-10am time slot on Mondays, Wednesday's and Fridays...the issue is that it also shows the appointment as an all day appointment, for every day from 8/1/2013 thru 12/31/2013 (the date range of the appointment).  It only does this when Monday is included as one of the days of the recurring appointment.

Any idea why this could be happening?  

I'm using a RecurrenceDay object to determine how to display it in the calendar.  Here is the relevant code:

if (e.eventDays.Contains("M"))
    days += 2;
if (e.eventDays.Contains("T"))
    days += 4;
if (e.eventDays.Contains("W"))
    days += 8;
if (e.eventDays.Contains("R"))
    days += 16;
if (e.eventDays.Contains("F"))
    days += 32;
                 
var dayMask = (RecurrenceDay)days; //Used to display recurrence schedule on the telerik scheduler

days is an integer that I'm using to determine what days the appointment should display on, using the values specified here:
http://www.telerik.com/help/aspnet-ajax/t_telerik_web_ui_recurrenceday.html


Thanks
Boyan Dimitrov
Telerik team
 answered on 07 Oct 2013
1 answer
103 views
Hi,

We are using the Telerik controls version 2012.3.1308.40(licensed) on our web site. We are using the RadAjaxManager in almost all pages with RadAjaxLoadingPanel.

We initially had pagination in all rad grids. But the user does not like the pagination and wanted to use the scrolling instead. So we removed pagination from all grids and enabled scrolling,
<ClientSettings>
    <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="true" />
    <ClientEvents OnGridCreated="GridScrollCreated" />
</ClientSettings>
We have some grids with item template to capture user input (3 columns only). Approximately we may get 200 to 300 records from the database when binding the grid. After making this change, we have encountered a new problem that our application become very very slow. For each post backs the loading panel is running for more than 3 minutes. After the post back the grid is not rendering properly and further post back are not working.

please see the attachment
Maria Ilieva
Telerik team
 answered on 07 Oct 2013
1 answer
72 views
Hi,
I'm using formdecorator for a formview and in ItemTemplate I user a checkbox and this is bounded with data.But it isnt checked if th DB value it's true...if I exclude checkbox to formdecorator the value is checked correctly.
Any help?

Sample code:

<telerik:RadFormDecorator ID="FormDecorator1" runat="server" 
            EnableRoundedCorners="true" Width="100%"  Skin="CustomSkin"
            DecoratedControls="All" DecorationZoneID="decoratedzone"  
            RenderMode="Lightweight" ></telerik:RadFormDecorator>

<div id="decoratedzone">

<asp:FormView runat="server" RenderOuterTable="true" ID="frvEmployees" 
        BorderStyle="None" BackColor="#F1F1F1"
        DataKeyNames="ID" DefaultMode="ReadOnly" 
        DataSourceID="sds" Width="100%" >
    <ItemTemplate>
<asp:CheckBox ID="chk" Enabled="false" Checked='<%#Eval("CheckValue")%>' runat="server" /> 

</ItemTemplate>
</asp:FormView>
</div>
Slav
Telerik team
 answered on 07 Oct 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?