Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
100 views

Hello,

I'm using the below code to setup a grid. The columns don't stay frozen when I am using the keyboard to navigate the grid.

 

<ClientSettings AllowKeyboardNavigation="true" >
                            <Selecting AllowRowSelect="false" EnableDragToSelectRows="false" CellSelectionMode="SingleCell" />
                            <Scrolling UseStaticHeaders="false" AllowScroll="true" ScrollHeight="100%" FrozenColumnsCount="5"
                                EnableColumnClientFreeze="true" SaveScrollPosition="true" />
                            <KeyboardNavigationSettings AllowSubmitOnEnter="true" EnableKeyboardShortcuts="true" SaveChangesKey="S" />

 

Any help on this would be much appreciated.

Pavlina
Telerik team
 answered on 08 Feb 2017
8 answers
2.6K+ views

Hi, 

When I export my grid to an excel file (ExcelML), I need to hide some column in this excel file (same as when you hide a column in excel). How can I do that?

Thx.

Bouyez
Top achievements
Rank 1
 answered on 08 Feb 2017
1 answer
82 views

I am using a RadGrid in Batch Edit mode.

When RenderMode is set to "Classic" (or not set at all), I can see the dirty indicators for changed cells.

When RenderMode is set to "Lightweight", I no longer see the dirty indicators.

Is this expected behavior?  Or should I be able to see dirty indicators in Lightweight mode for a Batch Edit RadGrid?

Eyup
Telerik team
 answered on 08 Feb 2017
7 answers
1.0K+ views

Hello everybody,

I know that this error has a lot of documentation on the forum/documentation but not any of the given solutions has worked for me...

I have a website that uses telerik, everything works fine but when I try to deploy it on an Integrated IIS 8.5, I have the following error on my page :

The assembly is copied into the bin folder but doesn't seems to be loaded

http://www.telerik.com/blogs/web-resources-demystified-part-3-troubleshooting

I don't see any failed request...

I added the following line to the system.webserver in web.config in addition with the ones given there : http://docs.telerik.com/devtools/aspnet-ajax/general-information/web-config-settings-overview

<handlers>
  <add name="Telerik.Web.UI.WebResource"  path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource" />
</handlers>

But the problem persists...

I have no clue on how to resolve this issue

THank you for your support, 

Bests regards, Nicolas.

Nicolas
Top achievements
Rank 1
 answered on 07 Feb 2017
1 answer
98 views

The Rotator is displaying 4 buttons... Up, Down, Left, Right.
How can I hide, Up and Down?

Thanks.

JC

Juan
Top achievements
Rank 2
 answered on 07 Feb 2017
0 answers
115 views

I amusing this technique to set an edit link in a grid template column.

editlink.Attributes.Add("href", "#");
editlink.Attributes.Add("onclick", string.Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["SubscriberID"], e.Item.ItemIndex));

In the past,  I have called a telerik window with a separate aspx page that would display the detail record data for the ID that was passed in the querystring.

I am now working with bootstrap and would like to do this with a bootstrap modal.

Are there any examples where this has been done?


Thomas
Top achievements
Rank 1
 asked on 07 Feb 2017
0 answers
148 views

Hi,

    Well i am new to Sitefinity. I was trying to implement Dynamic Sorting Filtering and Pagination in client side. I have implemented sorting and pagination. I want to implement excel type filtering as explained in the demo ( http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/excel-like-filtering/defaultcs.aspx) to my department column. The issue is i cant use FilterType="HeaderContext". I get a issue saying The values permitted for this attribute dosent inclue HeaderContext. I went to multiple article but couldn't figure out. Can you please help me out. The other issue is i am binding my radgrid in ajax call i don't know how to bind the data for the filtering in ajax call and how to pass filter data from ajax call to webservice.

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="SitefinityWebApp.Pages.test" EnableEventValidation="true" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="sf" Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.PublicControls" %>

<html xmlns='http://www.w3.org/1999/xhtml'>

<head runat="server">
    <title>Telerik ASP.NET Example</title>


    <telerik:RadScriptBlock ID="RadCodeBlock" runat="server">
        <script type="text/javascript">

            function rad_gridCreated(sender, args) {
                tableView = $find("<%= gridData.ClientID %>").get_masterTableView();
                makeServiceCall(updateGrid, serviceFailure);
            };

            function serviceFailure(error) { alert("failure " + error.statusText); };
            function updateGrid(result) {
                tableView.set_dataSource(result.employee);
                tableView.dataBind();
                tableView.set_virtualItemCount(result.totalCount);
            };
            function getRequestStringfyData(startIndex, pageSize, sortExpression, filterExpression) {
                return JSON.stringify({
                    startIndex: startIndex,
                    maximumRows: pageSize,
                    sortExpression: sortExpression,
                    filterExpression: filterExpression
                });
            };

            function makeURL(startIndex, pageSize, sortExpression, filterExpression) {
                return "/CustomServices/NewsService/getmyWork?startIndex=" + startIndex + "&maximumRows=" + pageSize + "&sortExpression=" + sortExpression + "&filterExpression=" + filterExpression;
            };

            function makeServiceCall(onCallBackSuccess, onCallbackFailure) {
                var pageSize = tableView.get_pageSize(); var startIndex = (tableView.get_currentPageIndex() * pageSize);
                var sortExpression = tableView.get_sortExpressions().toString(); var filterExpression = "";
                $.ajax({
                    type: "GET",
                    url: makeURL(startIndex, pageSize, sortExpression, filterExpression),
                    dataType: "json",
                    data: getRequestStringfyData(startIndex, pageSize, sortExpression, filterExpression),
                    contentType: "application/json; charset=utf-8",
                    processData: true,
                    success: onCallBackSuccess,
                    error: onCallbackFailure
                });
            };

            function radgrid_OnCommand(sender, args) {
                tableView = sender.get_masterTableView();
                makeServiceCall(updateGrid, serviceFailure);
            };
        </script>
    </telerik:RadScriptBlock>




</head>
<body>
    <form id="form1" runat="server">

        <script type="text/javascript" src="test.js"></script>

        <telerik:RadScriptManager runat="server" ID="RadScriptManager1">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <div style="margin-top: 100px;">
            <asp:UpdatePanel ID="ProductsUpdatePanel" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">
                <ContentTemplate>
                    <telerik:RadGrid RenderMode="LightWeight" ID="gridData" name="gridData" runat="server" EnableViewState="false"  AutoGenerateColumns="false" AllowPaging="true" PageSize="10" AllowSorting="true" FilterType="HeaderContext">
                        <MasterTableView TableLayout="Fixed">
                            <Columns>
                                <telerik:GridBoundColumn DataField="EmpID" HeaderText="Emp ID" ReadOnly="true" SortExpression="EmpID" UniqueName="EmpID" />
                                <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" ReadOnly="true" SortExpression="FirstName" UniqueName="FirstName" />
                                <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" ReadOnly="true" SortExpression="LastName" UniqueName="LastName" />
                                <telerik:GridBoundColumn DataField="Department" HeaderText="Department" ReadOnly="true" SortExpression="Department" UniqueName="Department" />
                            </Columns>
                        </MasterTableView>
                        <ClientSettings EnablePostBackOnRowClick="false">
                            <ClientEvents OnCommand="radgrid_OnCommand" OnGridCreated="rad_gridCreated" />
                        </ClientSettings>
                    </telerik:RadGrid>
                </ContentTemplate>
           </asp:UpdatePanel>
        </div>

       
    </form>
</body>
</html>

 

Interface 

namespace SitefinityWebApp.CustomServices
{
    [ServiceContract]
    [AllowDynamicFields]
    public interface INewsService
    {
        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "getmyWork?startIndex={startIndex}&maximumRows={maximumRows}&sortExpression={sortExpression}&filterExpression={filterExpression}", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
        SitefinityWebApp.CustomServices.NewsService.DynamicItemsContext DoWork(int startIndex, int maximumRows, string sortExpression, string filterExpression);
    }

wcf class

 [ServiceBehavior(IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    public class NewsService : INewsService
    {

        public DynamicItemsContext RetrieveItems(int startIndex, int maximumRows, string sortExpression)
        {
            DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager();
            Type testType = TypeResolutionService.ResolveType("Telerik.Sitefinity.DynamicTypes.Model.Employees.Employee");
            var dynamicItems = dynamicModuleManager.GetDataItems(testType).Where(d => d.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Master);

            if (!string.IsNullOrEmpty(sortExpression))
                dynamicItems = dynamicItems.OrderBy(sortExpression);

            List<Employee> employees = new List<Employee>();
            foreach (var item in dynamicItems)
            {
                var employee = new Employee();
                employee.FirstName = item.GetValue("FirstName").ToString();
                employee.LastName = item.GetValue("LastName").ToString();
                employee.Department = item.GetValue("Department").ToString();
                employee.EmpID = item.GetValue("EmpID").ToString();
                employees.Add(employee);
            }

            var dynamicItemContext = new DynamicItemsContext();
            dynamicItemContext.totalCount = employees.Count;
            dynamicItemContext.employee = employees;
            dynamicItemContext.employee = dynamicItemContext.employee.Skip(startIndex).Take(maximumRows);
            // employees.Skip(startIndex).Take(maximumRows);
            return dynamicItemContext;
        }


        public DynamicItemsContext DoWork(int startIndex, int maximumRows, string sortExpression, string filterExpression)
        {
            var items = RetrieveItems(startIndex, maximumRows, sortExpression);
            return items;
        }

        public class Employee
        {
            public string FirstName { get; set; }
            public string LastName { get; set; }
            public string Department { get; set; }
            public string EmpID { get; set; }
        }

        [DataContract]
        [KnownType(typeof(Employee))]
        public class DynamicItemsContext
        {
            [DataMember]
            public IEnumerable<Employee> employee { get; set; }

            [DataMember]
            public int totalCount { get; set; }

        }
    }

 

Nilesh
Top achievements
Rank 1
 asked on 07 Feb 2017
9 answers
138 views
I'm using the radscheduler to export a timetable to iCAL  -  I need to include more fields (ie location, staff) to export than just the start date time ,title , description etc,  and so have added 2 fields in the CustomAttributeNames, - these appear on the calendar but are not included in the export file - is this possible or is outlook/google not able to read these fields? 

Are there more fields that can be added to the Vcard - ie location or are these not included in the Telerik control.

Thanks
Peter Milchev
Telerik team
 answered on 07 Feb 2017
6 answers
429 views
Hi.

I have a RadGrid on an ASP.NET page. When I do something that requieres a postback directly on the grid, like changing the page size, or browsing to a new page in the grid, my data gets lost and my grid becomes empty. Here's my markup:

<telerik:RadGrid ID="ReporteGridView" runat="server" AllowPaging="True" PageSize="20"
    AllowAutomaticInserts="false" AllowSorting="True" ShowStatusBar="true" Width="880px">
    <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" />
    <MasterTableView NoMasterRecordsText="No hay registros para mostrar" ShowHeadersWhenNoRecords="True"
        PageSize="20" CommandItemDisplay="None" Width="100%">
        <PagerStyle FirstPageToolTip="Primera página" LastPageToolTip="Ultima página" NextPagesToolTip="Página siguiente"
            PageSizeLabelText="Tamaño página" PrevPagesToolTip="Página anterior" />
        <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
    </MasterTableView>
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="True"></Scrolling>
    </ClientSettings>
</telerik:RadGrid>

I'm binding my grid to a DataTable at runtime. Is there something I'm missing?

Thanks.
Arash
Top achievements
Rank 1
 answered on 07 Feb 2017
7 answers
402 views
Hi
I have a RadGrid with Grouping, Collapse and Expand functionality.
That works very well.

My problem:
When I click the command "Edit", edit mode = "popup", go to Collapse and Expand selections lost.
What can I do that the users stay with selection Collapse and Expand exist forever?

Sorry for my bad English
Rolf Burri
Switzerland


<telerik:RadGrid ID="RadGrid_Zeiten" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource_Zeiten" GridLines="Vertical" Skin="Office2007"
AllowAutomaticUpdates="True" AutoGenerateEditColumn="True"
style="font-weight: 700">
<ExportSettings ExportOnlyData="True" IgnorePaging="True">
</ExportSettings>
<MasterTableView CommandItemDisplay="None" datakeynames="ID"
datasourceid="SqlDataSource_Zeiten" editmode="PopUp" font-bold="False"
font-italic="False" font-names="Verdana" font-overline="False" font-size="8"
font-strikeout="False" font-underline="False">
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<GroupByExpressions>
<telerik:GridGroupByExpression>
<SelectFields>
<telerik:GridGroupByField FieldName="nachname" HeaderText=" "
HeaderValueSeparator=" " />
<telerik:GridGroupByField FieldName="vorname" HeaderText=" "
HeaderValueSeparator=" " />
</SelectFields>
<GroupByFields>
<telerik:GridGroupByField FieldName="username" SortOrder="Ascending" />
</GroupByFields>
</telerik:GridGroupByExpression>
</GroupByExpressions>
<Columns>
<telerik:GridBoundColumn DataField="user_id" ReadOnly="True"
SortExpression="user_id" UniqueName="user_id" Visible="False">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="name_tag" HeaderText="Tag"
SortExpression="name_tag" UniqueName="name_tag" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Datum" DataFormatString="{0:dd.MM.yyyy}"
HeaderText="Datum" SortExpression="Datum" UniqueName="Datum"
ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Vorname" HeaderText="Vorname"
SortExpression="Vorname" UniqueName="Vorname" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="Nachname" HeaderText="Nachname"
SortExpression="Nachname" UniqueName="Nachname" ReadOnly="True">
</telerik:GridBoundColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_1_von"
DataFormatString="{0:HH:mm}" HeaderText="Von" PickerType="TimePicker"
UniqueName="arbeitszeiten_1_von">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_1_bis"
DataFormatString="{0:HH:mm}" HeaderText="Bis" PickerType="TimePicker"
UniqueName="arbeitszeiten_1_bis">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_2_von"
DataFormatString="{0:HH:mm}" HeaderText="Von" PickerType="TimePicker"
UniqueName="arbeitszeiten_2_von">
<ItemStyle BackColor="#E6EBF3" />
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_2_bis"
DataFormatString="{0:HH:mm}" HeaderText="Bis" PickerType="TimePicker"
UniqueName="arbeitszeiten_2_bis">
<ItemStyle BackColor="#E6EBF3" />
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_3_von"
DataFormatString="{0:HH:mm}" HeaderText="Von" PickerType="TimePicker"
UniqueName="arbeitszeiten_3_von">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_3_bis"
DataFormatString="{0:HH:mm}" HeaderText="Bis" PickerType="TimePicker"
UniqueName="arbeitszeiten_3_bis">
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_4_von"
DataFormatString="{0:HH:mm}" HeaderText="Von" PickerType="TimePicker"
UniqueName="arbeitszeiten_4_von">
<ItemStyle BackColor="#E6EBF3" />
</telerik:GridDateTimeColumn>
<telerik:GridDateTimeColumn DataField="arbeitszeiten_4_bis"
DataFormatString="{0:HH:mm}" HeaderText="Bis" PickerType="TimePicker"
UniqueName="arbeitszeiten_4_bis">
<ItemStyle BackColor="#E6EBF3" />
</telerik:GridDateTimeColumn>
<telerik:GridBoundColumn DataField="total_zeiten" HeaderText="Total Zeiten"
UniqueName="total_zeiten" ReadOnly="True" SortExpression="total_zeiten">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="total_arbeiten" HeaderText="Total Arbeiten"
ReadOnly="True" SortExpression="total_arbeiten" UniqueName="total_arbeiten">
</telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn DataField="abgeschlossen" HeaderText="Gesendet"
ReadOnly="True" UniqueName="abgeschlossen">
</telerik:GridCheckBoxColumn>
</Columns>
<EditFormSettings>
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
<FormStyle BackColor="#E6EBF3" />
<FormTableStyle BackColor="#E6EBF3" />
<FormMainTableStyle BackColor="#E6EBF3" BorderStyle="Double" />
<FormTableItemStyle BorderStyle="Solid" Height="20px" />
<FormTableAlternatingItemStyle BackColor="White" Height="20px" />
</EditFormSettings>
<GroupHeaderItemStyle Font-Bold="True" ForeColor="Black" />
</MasterTableView>
<GroupingSettings GroupByFieldsSeparator="" />
<GroupHeaderItemStyle Font-Bold="True" ForeColor="Black" />
<FilterMenu EnableTheming="True" Skin="Gray">
<CollapseAnimation Duration="200" Type="OutQuint" />
</FilterMenu>
</telerik:RadGrid>
Eyup
Telerik team
 answered on 07 Feb 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?