This is a migrated thread and some comments may be shown as answers.

[Solved] Grid Size inside panel bar

6 Answers 156 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
MGrassman
Top achievements
Rank 2
MGrassman asked on 15 Jan 2009, 08:27 AM

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>



6 Answers, 1 is accepted

Sort by
0
Serrin
Top achievements
Rank 1
answered on 15 Jan 2009, 02:20 PM

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. :)

0
MGrassman
Top achievements
Rank 2
answered on 15 Jan 2009, 04:20 PM
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,

0
MGrassman
Top achievements
Rank 2
answered on 15 Jan 2009, 07:27 PM
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,
0
Jordan
Telerik team
answered on 19 Jan 2009, 05:24 PM
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.
0
MGrassman
Top achievements
Rank 2
answered on 19 Jan 2009, 05:28 PM
Please send me a custom Build.

Thanks,
0
Accepted
Jordan
Telerik team
answered on 22 Jan 2009, 03:38 PM
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.
Tags
GridView
Asked by
MGrassman
Top achievements
Rank 2
Answers by
Serrin
Top achievements
Rank 1
MGrassman
Top achievements
Rank 2
Jordan
Telerik team
Share this question
or