heey guys
I got this fu... error but i don't know why I checked every thing in my class and code behind still don't know why ..
Error message Type 'Telerik.Web.UI.GridBoundColumn' does not have a public property named 'Columns'.(Cod Line 41)
Code :
code behind
as always thanks for your help and fast answers ^^
I got this fu... error but i don't know why I checked every thing in my class and code behind still don't know why ..
Error message Type 'Telerik.Web.UI.GridBoundColumn' does not have a public property named 'Columns'.(Cod Line 41)
Code :
<%@ Page Title="" Language="C#" MasterPageFile="~/ABBMaster.Master" AutoEventWireup="true" CodeBehind="EmployeGrid.aspx.cs" Inherits="HolidayTracker.Employe.EmployeGrid" %><asp:Content ID="Content1" ContentPlaceHolderID="MainRegionContentPlaceHolder" runat="server"> <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All" EnableRoundedCorners="false" /> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadGrid1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGrid1"></telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadGrid ID="RadGrid1" OnPreRender="RadGrid1_PreRender" ShowStatusBar="True" DataSourceID="SqlDataSource1" runat="server" AutoGenerateColumns="False" PageSize="7" AllowSorting="True" AllowPaging="True" GridLines="None" CellSpacing="0"> <PagerStyle Mode="NumericPages" /> <MasterTableView DataSourceID="SqlDataSource1" DataKeyNames="DepartmentId" AllowMultiColumnSorting="true"> <DetailTables> <telerik:GridTableView DataKeyNames="UserId" DataSourceID="SqlDataSource2" Width="100%" runat="server"> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="DepartmentId" MasterKeyField="DepartmentId" /> </ParentTableRelation> <DetailTables> <telerik:GridTableView DataKeyNames="Name" DataSourceID="SqlDataSource2" Width="100%" runat="server"> <ParentTableRelation> <telerik:GridRelationFields DetailKeyField="Name" MasterKeyField="Name" /> </ParentTableRelation> <Columns> <telerik:GridBoundColumn SortExpression="FromData" HeaderText="From Date" HeaderButtonType="TextButton" DataField="FromDate" UniqueName="FromDate"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="ToDate" HeaderText="To Date" HeaderButtonType="TextButton" DataField="ToDate" UniqueName="ToDate"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="WorkingTime" HeaderText="Working Time" HeaderButtonType="TextButton" DataField="WorkingTime" UniqueName="WorkingTime"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="VacationDays" HeaderText="Vacation Days" HeaderButtonType="TextButton" DataField="VacationDays" UniqueName="VacationDays"> </ telerik:GridBoundColumn> </Columns> </telerik:GridTableView> </DetailTables> <Columns> <telerik:GridBoundColumn SortExpression="Name" HeaderText="Name" HeaderButtonType="TextButton" DataField="Name" UniqueName="Name"> </telerik:GridBoundColumn> </Columns> </telerik:GridTableView> </DetailTables> <Columns> <telerik:GridBoundColumn SortExpression="DepartmentId" HeaderText="DepartmentId" HeaderButtonType="TextButton" DataField="DepartmentId" UniqueName="DepartmentId"> </telerik:GridBoundColumn> <telerik:GridBoundColumn SortExpression="Name" HeaderText="Department Name" HeaderButtonType="TextButton" DataField="Name" UniqueName="Name"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HolidayTrackerConnectionString %>" SelectCommand="SELECT [DepartmentId], [Name] FROM [HtDepartment]"></asp:SqlDataSource> <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:HolidayTrackerConnectionString %>" SelectCommand="SELECT * FROM [AnnualVacationView] ORDER BY [UserId], [Name]"></asp:SqlDataSource></asp:Content>using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;using Telerik.Web.UI;namespace HolidayTracker.Employe{ public partial class EmployeGrid : System.Web.UI.Page { protected void RadGrid1_PreRender(object sender, EventArgs e) { if (!Page.IsPostBack) { RadGrid1.MasterTableView.Items[0].Expanded = true; RadGrid1.MasterTableView.Items[0].ChildItem.NestedTableViews[0].Items[0].Expanded = true; } } }}as always thanks for your help and fast answers ^^