Grid Size inside panel bar

7 posts, 1 answers
  1. MGrassman
    MGrassman avatar
    92 posts
    Member since:
    Apr 2007

    Posted 15 Jan 2009 Link to this post

    I have a grid inside the panel bar and I can't seem to figure out how to get the grid to show all three rows.

    It loads the data and only shows 1 row as well as the column headers.  Am I missing something.

    Also is the documentation with the lasted 1217 release suposed to work?

    Here is my XAML.

    Thanks,

    <telerik:RadPage xmlns:telerikExtras="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView" 
        xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"  xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"  xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        x:Class="HI_Tracker.Dashboard"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        >
        <Grid x:Name="LayoutRoot" Background="White" Height="Auto" Width="Auto">
           
            <telerikNavigation:RadPanelBar x:Name="rpbDashboard" ExpandMode="Multiple" Height="Auto" Width="Auto">
                <telerikNavigation:RadPanelBarItem Header="Projects" x:Name="rpbiProjects" IsExpanded="True" Height="Auto" Width="Auto" >
                    <telerikGridView:RadGridView x:Name="rgProjects" AutoGenerateColumns="False" ShowGroupPanel="False" ColumnsWidthMode="Fill" >
                        <telerikGridView:RadGridView.Columns>
                            <telerikExtras:GridViewDataColumn HeaderText="Name" UniqueName="Name"></telerikExtras:GridViewDataColumn>
                            <telerikExtras:GridViewDataColumn HeaderText="Description" UniqueName="Description"></telerikExtras:GridViewDataColumn>
                            <telerikExtras:GridViewDataColumn HeaderText="Start Date" UniqueName="StartDate"></telerikExtras:GridViewDataColumn>
                            <telerikExtras:GridViewDataColumn HeaderText="End Date" UniqueName="EndDate"></telerikExtras:GridViewDataColumn>
                            <telerikExtras:GridViewDataColumn HeaderText="Percent Complete" UniqueName="PercentComplete"></telerikExtras:GridViewDataColumn>

                        </telerikGridView:RadGridView.Columns>
                    </telerikGridView:RadGridView>
                </telerikNavigation:RadPanelBarItem>
                <telerikNavigation:RadPanelBarItem Header="Tasks">
                    <telerikGridView:RadGridView x:Name="rgTasks" ShowGroupPanel="False"></telerikGridView:RadGridView>
                </telerikNavigation:RadPanelBarItem>
                <telerikNavigation:RadPanelBarItem Header="Issues">
                    <telerikGridView:RadGridView x:Name="rgIssues" ShowGroupPanel="False" ></telerikGridView:RadGridView>
                </telerikNavigation:RadPanelBarItem>
            </telerikNavigation:RadPanelBar>
        </Grid>
    </telerik:RadPage>



  2. Serrin
    Serrin avatar
    286 posts
    Member since:
    Sep 2008

    Posted 15 Jan 2009 Link to this post

    Hey MGrassman,

     

    Would it be possible to post the code that you are using to populate the GridView?  I know a lot of the problems I run into with silverlight involving data usually end up being somewhere in the WCF service I'm using or how I handle that. :)

  3. DevCraft banner
  4. MGrassman
    MGrassman avatar
    92 posts
    Member since:
    Apr 2007

    Posted 15 Jan 2009 Link to this post

    Here is the service code.

    [OperationContract]
            public List<ProjectFields> GetProjectByUserId(string UserID)
            {
                Guid userId = new Guid(UserID);
                OneClickProjectDataContext db = new OneClickProjectDataContext();
                var query = from p in db.ProjectActiveByUserIds
                            where p.UserId == userId
                            select  new ProjectFields
                            {
                                RecId = p.RecId,
                                Name = p.Name,
                                Description = p.Description,
                                StartDate = p.StartDate.Value,
                                EndDate = p.EndDate.Value,
                                PercentComplete = p.PercentComplete.Value

                            };

                return query.ToList();
               
               

            }

    [DataContract]
        public class ProjectFields
        {
            [DataMember]
            public int RecId { get; set; }
            [DataMember]
            public string Name { get; set; }
            [DataMember]
            public string Description { get; set; }
            [DataMember]
            public DateTime StartDate { get; set; }
            [DataMember]
            public DateTime EndDate { get; set; }
            [DataMember]
            public double PercentComplete { get; set; }
            [DataMember]
            public double UserId { get; set; }
           
           
        }

    Thanks,

  5. MGrassman
    MGrassman avatar
    92 posts
    Member since:
    Apr 2007

    Posted 15 Jan 2009 Link to this post

    I just noticed another issue with the grid inside the RadPanelBar.  I can't edit the rows.  I can insert a new record but when I double click the cell I don't get a textbox. 

    Should this work.  If not is there a work around.

    Thanks,
  6. Jordan
    Admin
    Jordan avatar
    123 posts

    Posted 19 Jan 2009 Link to this post

    Hi MGrassman,

    First about that only 1 row is visible. It is an issue with the silverlight items control that we used for RadPanelBar. The only way to work around this is to set fixed size for RadGridView or RadPanelBarItem's Height.

    Second about editing: If you use RagGridView out of the RadPanelBar it works fine, but when you add it to the RadPanelBar it stops working. The problem is that the grid doesn't handle mouse down event. We will fix this bug. If it is a show stopper for you, we can send you a custom build.

    Best wishes,
    Jordan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. MGrassman
    MGrassman avatar
    92 posts
    Member since:
    Apr 2007

    Posted 19 Jan 2009 Link to this post

    Please send me a custom Build.

    Thanks,
  8. Answer
    Jordan
    Admin
    Jordan avatar
    123 posts

    Posted 22 Jan 2009 Link to this post

    Hi MGrassman,

    Attached is the sample project I've created. You can find the latest binaries in Binaries folder.

    Kind regards,
    Jordan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
DevCraft banner