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

RadGridView and RadWindow Size

11 Answers 125 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Amy
Top achievements
Rank 1
Amy asked on 07 Mar 2011, 11:41 PM
Hi,

I have a simple RadGridView as defined below:

<UserControl x:Class="SLF.CustomerAgedReceivables.MainPage" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:tgv="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
             xmlns:tdata="clr-namespace:Telerik.Windows.Data;assembly=Telerik.Windows.Data" 
             mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480">
    <Grid x:Name="LayoutRoot">
        <tgv:RadGridView x:Name="CustomerGroupsGridView" 
                         IsReadOnly="True"
                         AutoGenerateColumns="False"
                         ShowColumnFooters="True" 
                         ShowGroupPanel="False">
            <tgv:RadGridView.Columns>
                <tgv:GridViewDataColumn DataMemberBinding="{Binding CustomerGroupName}" Header="Customer Group" IsGroupable="False"/>
                <tgv:GridViewColumn IsGroupable="False">
                    <tgv:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <Button Content="View Details" Click="Button_Click"/>
                        </DataTemplate>
                    </tgv:GridViewColumn.CellTemplate>
                </tgv:GridViewColumn>
            </tgv:RadGridView.Columns>
        </tgv:RadGridView>
    </Grid>
</UserControl>
 

 


The code behind is as follows:

partial class MainPage : UserControl
{
    public MainPage()
    {
        InitializeComponent();
        TestLoadCustomerGroups();
    }
    private void TestLoadCustomerGroups()
    {
        CG.RadGridViewXmlDataSource ds = new CG.RadGridViewXmlDataSource();
        ds.Source = "TestCustomerGroups/CustomerGroups.xml";
        this.CustomerGroupsGridView.ItemsSource = ds;
    }
    private void Button_Click(object sender, RoutedEventArgs e)
    {
        RadWindow detailsWindow = new RadWindow();
        detailsWindow.Header = "Details";
        detailsWindow.ShowDialog();
    }
}

When I click the 'View Details' button the Rad window opens but I am unable to resize the window larger than the RadGridView size.  Is it possible to resize the RadWindow so that it is larger than the RadGridView? 
(I am opening the RadWindow to view a larger list of data which may be quite long.  It was requested by the end-user to be able to open a new window to view this data rather than using a child hierarchy with scroll bars.) 
Or am I taking the wrong approach to this...? 

Thank you for your help.
Amy

11 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 08 Mar 2011, 09:24 AM
Hi Amy,

You may try to set the Height and Width properties of the RadWindow to the values you want. 
 

Best wishes,
Maya
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Amy
Top achievements
Rank 1
answered on 08 Mar 2011, 02:38 PM
Thank you for you suggestiion Maya.  I tried setting the height and width properties fo the RadWindow.  However, only part of the window is displayed as shown in the attached screenshot.  I believe this might have something to do with the fact that I am hosting this SilverLight control in SharePoint.  Do you have any other suggestions on how I might accomplish what I am trying to do?
0
George
Telerik team
answered on 11 Mar 2011, 02:58 PM
Hi Amy,

 
I would suggest you to open the RadWindow with zero Top/LeftOffset and with Manual WindowStartupLocation. Please, refer to our online example to configure the RadWindow - http://demos.telerik.com/silverlight/#Window/Configurator

I hope this helps.

All the best,
George
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Amy
Top achievements
Rank 1
answered on 11 Mar 2011, 07:31 PM
Hi George,

Thank you for your suggestion.  I have tried it the example, but I am still running into the same issue as shown in my attached screenshot.  It seems that it treats the specific web part zone as the main window...

I've resorted to opening my own javascript window on the button click event as a workaround.  However, this means that I have to create an additional page to host the RadGridView control that I am using to display the details.  I would've rather used the RadWindow so that I could keep all of my files in one project.

Can you confirm if this is expected behaviour when using the RadWindow in SharePoint 2010?

Thanks,
Amy
0
George
Telerik team
answered on 17 Mar 2011, 09:53 AM
Hello Amy,

 
Unfortunately, we are not aware of such problem with RadWindow in Sharepoint 2010. We will test this scenario, but this might take some time. 

Kind regards,
George
the Telerik team
0
Amy
Top achievements
Rank 1
answered on 17 Mar 2011, 02:42 PM
That would be appreciated.  As I mentioned previously, I do have a workaround for the time being.  I would just like to know if this workaround is neccessary.

Thank you very much.  I look forward to your response on your test results.

Amy
0
George
Telerik team
answered on 19 Mar 2011, 02:01 PM
Hello Amy,

 
I tried to reproduce the issue, but to no avail. I tested the scenario with a sample project that opens a modal RadWindow on button click. It seems that the RadWindow works the same as it works in a normal page. Attached you can find the video. 

Greetings,
George
the Telerik team
0
Amy
Top achievements
Rank 1
answered on 21 Mar 2011, 01:04 PM
Thanks for taking the time to do this George.  I can see from your video that you are experiencing the same "issue" that I have encountered.  What I am trying to accomplish is to be able to move the RadWindow outside of the web part zone that it was opened from. 

(For example, if you resized your web part to be smaller than the size of your RadWindow, the maximum size of the RadWindow would be the size of the web part zone.  Also, any attempt to move the RadWindow would result in it appear as 'off the screen'.)

I've attached a screenshot of what I am trying to accomplish (currently done by opening my own JavaScript Window.)  As mentioned previously, I would just like to confirm if this is expected behavior when using a RadWindow in a web part in SharePoint.

Thanks,
Amy
0
George
Telerik team
answered on 24 Mar 2011, 05:38 PM
Hi Amy,

 
Please, excuse me for this misunderstanding. The RadWindow is a Silverlight component and it cannot be placed outside of the Silverlight plugin( and outside of the silverlight web part as well). This is the correct behavior. 

Kind regards,
George
the Telerik team
0
Amy
Top achievements
Rank 1
answered on 24 Mar 2011, 05:43 PM
Thanks George. 
We are thinking about trying out the Telerik AJAX controls.  Do you think that I will be able to acheive what I am trying to do with the AJAX controls?  If so, are there any other factors that I should keep in mind with the AJAX controls?  For example, will the two different types of controls work well if placed on the same web page?

Thanks for your advice.
Amy
0
Rumen
Telerik team
answered on 28 Mar 2011, 01:01 PM
Hello Amy,

RadWindow for ASP.NET AJAX is a composite DHTML component which could be rendered above every HTML element on the page. The only limitation is that it cannot be displayed outside of the Browser, because the HTML elements could not be rendered outside the browser's window.

You should not experience problems when working with both types of controls on the same web page, but please let us know if any side effects occur. In order to show the RadWindow over the Silverlight object set the windowless property, e.g.

<param name="windowless" value="true" /> 

Best regards,
Rumen
the Telerik team
Tags
GridView
Asked by
Amy
Top achievements
Rank 1
Answers by
Maya
Telerik team
Amy
Top achievements
Rank 1
George
Telerik team
Rumen
Telerik team
Share this question
or