Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
184 views
Dear Telerik team,

Firstly, appologize my weak english.
I am using RadScheduler in ASP.NET MVC (WebService binding mode), but having hard time with customization. Can You please answer me these questions?
I know, that RadScheduler was developed mainly for ASP.NET , but I need to get it to work as much as possible in ASP.NET MVC.

1) Is it possible to use Ajax Loading panel? I had a go to get it to work, but without success
2) I would like to allow user create an appoiment with mouse only. User should have the opportunity to click on start time and drag the appointment to the end time. I have success only with creating an appointment with given duration (and dragging after creation).

<telerik:RadCodeBlock runat="server" ID="InitialScriptCodeBlock1">  
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptLocalization="true" 
            EnableScriptGlobalization="true" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager2" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">  
            <ClientEvents /> 
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Panel1">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1" Skin="Office2007" 
             BackImageUrl="~/Content/Images/loadingAnimation.gif" BackgroundPosition="Center" /> 
               
        <telerik:RadAjaxPanel ID="Panel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">  
            <telerik:RadScheduler runat="server" ID="RadScheduler1" AllowDelete="false" AllowEdit="true" 
                AllowInsert="false" MinutesPerRow="15" StartEditingInAdvancedForm="false" StartInsertingInAdvancedForm="false" 
                OnClientAppointmentDoubleClick="OnClientAppointmentDoubleClick" OnClientTimeSlotClick="OnClientTimeSlotClick" 
                OnClientAppointmentDeleting="OnClientAppointmentDeleting" OnClientAppointmentDataBound="OnClientAppointmentDataBound" 
                Height="900px" OnClientAppointmentEditing="OnClientAppointmentEditing" OnClientAppointmentContextMenuItemClicked="appointmentContextMenuItemClicked" 
                SelectedView="WeekView" DayHeaderDateFormat="dddd, dd MMMM yyyy" HoursPanelTimeFormat="HH:mm">  
                <AppointmentContextMenus> 
                    <%--The appointment context menu interaction is handled on the client--%> 
                    <%--See the JavaScript code above--%> 
                    <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">  
                        <Items> 
                            <telerik:RadMenuItem Text="Export iCalendar" Value="GenerateVCal" ImageUrl="~/Content/Images/Icons/iCalendar16.png" /> 
                            <telerik:RadMenuItem IsSeparator="True" /> 
                            <telerik:RadMenuItem Text="Delete" Value="CommandDelete" ImageUrl="~/Content/Images/DataEditing/Delete.gif" 
                                Enabled="True" /> 
                        </Items> 
                    </telerik:RadSchedulerContextMenu> 
                </AppointmentContextMenus> 
                <TimelineView GroupBy="Calendar" GroupingDirection="Vertical" /> 
                <AdvancedForm Enabled="false" EnableResourceEditing="false" /> 
                <WebServiceSettings Path="~/Models/SchedulerWebService.asmx" ResourcePopulationMode="ServerSide" /> 
            </telerik:RadScheduler> 
        </telerik:RadAjaxPanel> 
    </telerik:RadCodeBlock> 



Thank You Jan
Georgi Krustev
Telerik team
 answered on 16 Dec 2009
6 answers
154 views
I have radpanelbar defined in my code in front with an embedded user control.

<telerik:RadPanelBar ID="RadPanelBar1" runat="server">  
    <Items runat="server">  
        <telerik:RadPanelItem ID="RadPanelItem1" runat="server">  
            <uc:ComponentDescriptionPurpose ID="ComponentDescriptionPurpose" runat="server" /> 
        </telerik:RadPanelItem> 
    </Items> 
</telerik:RadPanelBar> 

In the code-behind, I need to access a function within the user control. I tried below to find it, but it doesn't work.
How do I find it within the panelbar so I can access its functions?
        Dim ComponentDescriptionPurpose As Telerik.Web.UI.RadPanelBar = DirectCast(Page.FindControl("ComponentDescriptionPurpose"), Telerik.Web.UI.RadPanelBar)  
 
        ComponentDescriptionPurpose.LoadByOrm(idKey) 

Thanks.

Veselin Vasilev
Telerik team
 answered on 16 Dec 2009
1 answer
103 views
Hi, All

I want to export to excel at CardView
  (Grid > LayOut> Cardview)

Whe I was export to excel I used this code at C#

protected void Button1_Click(object sender, EventArgs e)
    {
        RadGrid1.MasterTableView.ExportToExcel();
    }

How can I export at cardview

GOD regard You
Daniel
Telerik team
 answered on 16 Dec 2009
3 answers
153 views
Tried 2009 Q3 Official and 2009.3.1201.35.
I am using declarative datasources.  
It works fine with HierarchyLoadMode="Client" but this is too slow prefetching all the child records since I have 2 lower levels.

When setting it to ServerOnDemand or ServerBind and I click on expand, it seems to go back to the server to do something (ajax loading template shows) but then nothing happens on the front-end.   Nothing is expanded.

I did NOT turn off EnableViewState on the grid.  
All connection strings for datasources to assigned in Page_Load.   Again this works with "Client" mode...   Help??

  <telerik:RadGrid EnableViewState="true" ID="RadGrid1" DataSourceID="srcMyWorklist" GridLines="None" runat="server"  
            AllowSorting="true" AllowFilteringByColumn="true"  
            AllowPaging="true" PageSize="20" AutoGenerateColumns="false" AllowAutomaticUpdates="False" Skin="Web20"  
            GroupingSettings-CaseSensitive="false" EnableLinqExpressions="false" 
            ShowGroupPanel="True" ShowHeader="true" ShowHeadersWhenNoRecords="true" AllowMultiRowEdit="false"
       
            <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="false"
                <Selecting AllowRowSelect="True" /> 
                <ClientEvents OnFilterMenuShowing="filterMenuShowing"  /> 
                <Scrolling AllowScroll="False" UseStaticHeaders="True" /> 
            </ClientSettings> 
             
            <FilterMenu OnClientShown="MenuShowing" ExpandAnimation-Type="None" CollapseAnimation-Type="None" /> 
             
            <MasterTableView DataKeyNames="ID"        
                NoDetailRecordsText="No records matching criteria" ShowHeadersWhenNoRecords="true"  
                AllowAutomaticUpdates="false" CommandItemDisplay="None">                           
 
                <PagerStyle Position="TopAndBottom" Mode="NextPrevNumericAndAdvanced" /> 
 
                <DetailTables> 
                    <telerik:GridTableView AutoGenerateColumns="false" HierarchyLoadMode="ServerOnDemand"    
                        DataSourceID="srcActivity" AllowMultiRowSelection="False" OverrideDataSourceControlSorting="true" 
                        runat="server" CommandItemDisplay="None" ShowStatusBar="False" AllowSorting="false" AllowFilteringByColumn="False"  
                       Name="grdActivity" DataKeyNames="ProcInstID,ActInstID" Width="50%" ShowHeadersWhenNoRecords="false" BackColor="Gainsboro"
                        <ParentTableRelation> 
                            <telerik:GridRelationFields DetailKeyField="ProcInstID" MasterKeyField="ID" /> 
                        </ParentTableRelation>     
 
                        <DetailTables> 
                            <telerik:GridTableView AutoGenerateColumns="false" HierarchyLoadMode="ServerOnDemand"  
                                DataSourceID="srcActivityDest" AllowMultiRowSelection="False" OverrideDataSourceControlSorting="true" 
                                runat="server" CommandItemDisplay="None" ShowStatusBar="False" AllowSorting="false" AllowFilteringByColumn="False"  
                                NoDetailRecordsText="N/A" DataKeyNames="ProcInstID,ActInstID" 
                                Name="grdActivityDest" Width="80%" ShowHeadersWhenNoRecords="true" BackColor="Gainsboro"
                                <ParentTableRelation> 
                                    <telerik:GridRelationFields DetailKeyField="ProcInstID" MasterKeyField="ProcInstID" /> 
                                    <telerik:GridRelationFields DetailKeyField="ActInstID" MasterKeyField="ActInstID" /> 
                                </ParentTableRelation>                         
                                <Columns> 
                                    <telerik:GridBoundColumn SortExpression="ProcInstID" HeaderText="ProcInstID" DataType="System.Int32" 
                                        DataField="ProcInstID" UniqueName="ProcInstID" ReadOnly="true" Display="false"
                                    </telerik:GridBoundColumn> 
 
                                    <telerik:GridBoundColumn SortExpression="ActInstID" HeaderText="ActInstID" DataType="System.Int32" 
                                        DataField="ActInstID" UniqueName="ActInstID" ReadOnly="true" Display="false"
                                    </telerik:GridBoundColumn>                                     
                                                         
                                    <telerik:GridBoundColumn SortExpression="User" HeaderText="User" DataType="System.String" 
                                        DataField="User" UniqueName="User" ReadOnly="true"
                                    </telerik:GridBoundColumn> 
                                                   
                                    <telerik:GridBoundColumn SortExpression="status" HeaderText="Status" DataType="System.String" ItemStyle-Width="60px" 
                                        DataField="status" UniqueName="status" ReadOnly="true"
                                    </telerik:GridBoundColumn>  
                                     
                                    <telerik:GridBoundColumn SortExpression="FinishDate" HeaderText="Finish By" DataType="System.DateTime" ItemStyle-Width="150px" 
                                        DataField="FinishDate" UniqueName="FinishDate" ReadOnly="true"
                                    </telerik:GridBoundColumn>                         
                                </Columns> 
                             </telerik:GridTableView> 
                        </DetailTables>              
                                                         
                        <Columns> 
                            <telerik:GridBoundColumn SortExpression="ProcInstID" HeaderText="ProcInstID" DataType="System.Int32" 
                                DataField="ProcInstID" UniqueName="ProcInstID" ReadOnly="true" Display="false"
                            </telerik:GridBoundColumn> 
 
                            <telerik:GridBoundColumn SortExpression="ActInstID" HeaderText="ActInstID" DataType="System.Int32" 
                                DataField="ActInstID" UniqueName="ActInstID" ReadOnly="true" Display="false"
                            </telerik:GridBoundColumn>                             
                                                 
                            <telerik:GridBoundColumn SortExpression="name" HeaderText="Activity" DataType="System.String" 
                                DataField="name" UniqueName="name" ReadOnly="true"
                            </telerik:GridBoundColumn> 
                                           
                            <telerik:GridBoundColumn SortExpression="status" HeaderText="Status" DataType="System.String" ItemStyle-Width="60px" 
                                DataField="status" UniqueName="status" ReadOnly="true"
                            </telerik:GridBoundColumn>  
 
                            <telerik:GridBoundColumn SortExpression="StartDate" HeaderText="Start At" DataType="System.DateTime" ItemStyle-Width="150px" 
                                DataField="StartDate" UniqueName="StartDate" ReadOnly="true"
                            </telerik:GridBoundColumn> 
                             
                            <telerik:GridBoundColumn SortExpression="FinishDate" HeaderText="Finish By" DataType="System.DateTime" ItemStyle-Width="150px" 
                                DataField="FinishDate" UniqueName="FinishDate" ReadOnly="true"
                            </telerik:GridBoundColumn>                         
                        </Columns> 
                     </telerik:GridTableView> 
                </DetailTables>    
                 
                                                                     
                <Columns>                                        
                    <telerik:GridHyperLinkColumn Target="_blank" DataNavigateUrlFields="ID,ProcID" AllowFiltering="false" ItemStyle-Width="30px" Display="false" 
                    Text="View" DataNavigateUrlFormatString="FormMgr.asp?ProcID={1}&ProcInstID={0}"
                    </telerik:GridHyperLinkColumn> 
 
                    <telerik:GridHyperLinkColumn Target="_blank" DataNavigateUrlFields="Data" AllowFiltering="false" ItemStyle-Width="30px" Display="true" 
                    Text="Open" NavigateUrl="{0}"
                    </telerik:GridHyperLinkColumn>                  
                                                             
                    <telerik:GridTemplateColumn UniqueName="Status" HeaderText="Status" DataField="Status" SortExpression="Status" 
                            EditFormColumnIndex="0" > 
                        <ItemTemplate>  
                            <asp:Label ID="lblStatus" runat="server" Text='<%# Bind("Status") %>'></asp:Label>  
                        </ItemTemplate> 
                        <FilterTemplate> 
                            <telerik:RadComboBox runat="server" ID="StatusFilter" Width="90px"  
                                DataSource='<%# (New string() {"", "Active", "Completed", "Error"}) %>' 
                                CollapseAnimation-Type="None" ExpandAnimation-Type="None" 
                                SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("Status").CurrentFilterValue %>' 
                                OnClientSelectedIndexChanged="StatusIndexChanged" >                  
                            </telerik:RadComboBox> 
                             
                            <telerik:RadScriptBlock ID="StatusScriptBlock" runat="server"
                                <script type="text/javascript"
                                    function StatusIndexChanged(sender, args) { 
                                        var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>"); 
                                        tableView.filter("Status", args.get_item().get_value(), "EqualTo"); 
                                    } 
                                </script> 
                            </telerik:RadScriptBlock>                            
                        </FilterTemplate>       
                        <EditItemTemplate>                  
                           <asp:DropDownList ID="cboStatusType" runat="server" SelectedValue='<%# Bind("Status") %>' 
                                DataSource='<%# (New string() {"", "Active", "Completed", "Error" }) %>'  
                                Width="50px"
                           </asp:DropDownList>                                         
                        </EditItemTemplate>                                        
                    </telerik:GridTemplateColumn>                 
 
                    <telerik:GridBoundColumn HeaderText="Process" DataType="System.String"     
                        AutoPostBackOnFilter = "true" CurrentFilterFunction = "Contains" 
                        DataField="ProcessName" UniqueName="ProcessName" ItemStyle-Width="100px"
                    </telerik:GridBoundColumn> 
 
                    <telerik:GridBoundColumn HeaderText="Initiator" DataType="System.String"  
                        AutoPostBackOnFilter = "true" CurrentFilterFunction = "Contains"   
                        DataField="Originator" UniqueName="Initiator" ItemStyle-Width="90px"
                    </telerik:GridBoundColumn>                                   
                     
                    <telerik:GridBoundColumn HeaderText="Start Date" DataType="System.DateTime" DataFormatString="{0:MM/dd/yy}"  
                        CurrentFilterFunction = "GreaterThanOrEqualTo" AutoPostBackOnFilter = "true"  
                        DataField="StartDate" UniqueName="StartDate" ItemStyle-Width="50px"
                    </telerik:GridBoundColumn>                 
                                 
                    <telerik:GridBoundColumn HeaderText="Folio" DataType="System.String" HeaderStyle-HorizontalAlign="Center"  
                        AutoPostBackOnFilter = "true" CurrentFilterFunction = "Contains"   
                        DataField="Folio" UniqueName="Folio"
                    </telerik:GridBoundColumn>      
 
                    <telerik:GridBoundColumn HeaderText="ID" DataType="System.Int32"  
                        DataField="ID" UniqueName="ID" Display="false"
                    </telerik:GridBoundColumn>                              
                </Columns> 
 
                <RowIndicatorColumn Visible="true"
                <HeaderStyle Width="10px"></HeaderStyle> 
                </RowIndicatorColumn>                        
             
            </MasterTableView> 
 
        </telerik:RadGrid> 

Tsvetoslav
Telerik team
 answered on 16 Dec 2009
5 answers
702 views
How do I set a column's DataFormatString server side? If a user selects a dropdown I want to change to DataFormatString of all the columns in my grid.
Sebastian
Telerik team
 answered on 16 Dec 2009
1 answer
100 views
I have the next issue. I have a filexplorer :
- inside a tabstrip
- it´s located in the second tab, not index 0
- filexplorer just have the Grid option enabled
- filexplorer is empty. No files are shown
- when the page is first opened, and the user selects the second tab(where the filexplorer is located) in IE8 the filexplorer shows Grid, and the treeview. But the treeview option is not enabled. How can I avoid this behaviour.
Fiko
Telerik team
 answered on 16 Dec 2009
1 answer
383 views
I want to apply role management in a grid
I have 3 tables in the database 1. Role master 2.Action Master 3.RoleActionAssociation
the procedure is
@RoleID int
as
select actionname,isnull(ra.actionid,0) from actionmaster
left outer join
(select actionid from roleactionassociation where roleid=@RoleID
) ra
on (actionmaster.actionid=ra.actionid)

now this gets me all the names of the actions present alongside the actionids
if the role is associated then the actionid is displayed else its null

Now I want to display this in the grid ie if the actionid is null I need the checkbox to be checked else unchecked
Rad Grid is as follows
<telerik:RadGrid   AutoGenerateDeleteColumn="true"    ID="RolesActionsGrid" runat="server" AutoGenerateColumns="False" AllowAutomaticInserts="false"
    AllowAutomaticDeletes="false"  AllowPaging="true" allowSorting="true">
<MasterTableView>
<Columns>
<telerik:GridBoundColumn DataField="ActionName" HeaderText="Permissions" SortExpression="ActionName">


</telerik:GridBoundColumn>
<telerik:GridBoundColumn  DataField="ActionID" Visible="false" HeaderText="Permissions" SortExpression="ActionID">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn>
<HeaderTemplate>
<asp:CheckBox  runat="server" id="checkAll"/>
</HeaderTemplate>
<ItemTemplate >
<asp:CheckBox id="checkIndividual" runat="server" />
</ItemTemplate>
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>

code behind

 Protected Sub DDRoles_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles DDRoles.SelectedIndexChanged

        Dim objActions As New clsActionMaster
        Dim objDataTable As New DataTable

        objDataTable = objActions.getActionsByRoleID(15).Tables(0)
        RolesActionsGrid.DataSource = objDataTable
        RolesActionsGrid.DataBind()

    End Sub


    Protected Sub RolesActionsGrid_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles RolesActionsGrid.DataBound
        For Each item As GridDataItem In RolesActionsGrid.Items


        Next



    End Sub

Even when I check uncheck the checkbox an appropriate function shld be called





Yavor
Telerik team
 answered on 16 Dec 2009
3 answers
120 views
Good morning,

Posting a strange issue which only manifests on IE8.  I have a fairly complex page which I have styled with CSS and used the telerik skins to style all of the controls.

When I load this page in IE8 I periodically get a flash of arrows, or an orange bar, or what looks like loading panels in random parts of the screen.  (see attached issue.png).

The other attachment no-issue.png is how the page should look.

This issue goes away if i wave my mouse over the affected area but it is still really annoying and I just know the end user will raise it as an issue.

Has anybody else had this issue?

Cheers,


James
Martin
Telerik team
 answered on 16 Dec 2009
2 answers
182 views
Hi all,

I'm trying to build a user control that has a radCombox on it.  One of the features of the combobox is that you can list the ID's of child radcomboboxes that will clear when the ItemsRequested event fires on the parent box.  However, when I run the following code to get the child radComboBox, the Item.count is always 0, and the items in the box never clear, even when I clearly see items in the child radComboBox.
 
  private void ClearChildren() 
    { 
        RelationalComboBox Child; 
 
        string[] ChildrenList = _Children.Split(_ChildrenDelimeter.ToCharArray()); 
 
        for (int i = 0; i < ChildrenList.Length; i++) 
        { 
            Child = (RelationalComboBox)this.Parent.FindControl(ChildrenList[i]); 
            Child.radComboBox.Text = " "
            Child.radComboBox.ClearSelection(); 
 
            do 
            { 
                if (Child.radComboBox.Items.Count > 0) 
                { 
                    Child.radComboBox.Items[0].Remove(); 
                } 
            } while (Child.radComboBox.Items.Count > 0); 
 
 
      
        } 
    } 


Any ideas how I can get the other radComboBox control and clear it's items?  

Thanks,
Joshua Wise
Aramark





Simon
Telerik team
 answered on 16 Dec 2009
1 answer
97 views

 

I'm showing a radalert window on page load.

All works OK, except the text I'm displaying on the master page comes up bigger than what it does when I'm not showing the radalert window?

Any ideas?


Thanks.

Georgi Tunev
Telerik team
 answered on 16 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?