I have a simple RadGridView as defined below:
<
UserControl
x:Class
=
"SLF.CustomerAgedReceivables.MainPage"
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
You may try to set the Height and Width properties of the RadWindow to the values you want.
Maya
the Telerik team
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.
George
the Telerik team
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
Unfortunately, we are not aware of such problem with RadWindow in Sharepoint 2010. We will test this scenario, but this might take some time.
George
the Telerik team
Thank you very much. I look forward to your response on your test results.
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.
George
the Telerik team
(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
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.
George
the Telerik team
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
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