Hi,
I have a gridview to show only some columns of a table the first time, and some others after the first time. The problem is if I do not include all columns in the first query when the query is changed the gridview do not update those columns.
Please assist me in this regard
Thank you
XAML
<telerik:RadGridView Grid.Row="1" Grid.ColumnSpan="4" Name="GridNewDate" ItemsSource="{Binding Path=dataTable}" ActionOnLostFocus="None"
AutoGenerateColumns="False" HorizontalAlignment="Left" CanUserInsertRows="False" CanUserDeleteRows="True"
ScrollViewer.HorizontalScrollBarVisibility="Visible" ScrollViewer.VerticalScrollBarVisibility="Visible" Margin="0,5,0,0" CanUserFreezeColumns="True">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="A" DataMemberBinding="{Binding A}" />
<telerik:GridViewDataColumn Header="B" DataMemberBinding="{Binding B}" />
<telerik:GridViewDataColumn Header="C" DataMemberBinding="{Binding C}" />
<telerik:GridViewDataColumn Header="D" DataMemberBinding="{Binding D}" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
C# (Model)
DataTable dataTable;
…
If (firstTime)
{
_View.GridNewDate.ItemsSource = GetData(“SELECT A, C FROM T”);
firsTime = false;
}
else
{
_View.GridNewDate.ItemsSource = GetData(“SELECT A, B, C, D FROM T”);
}
From following the Telerik documentation on cell validation, there seems to be two distinct approaches:
-Handling a Cell Validation event in code behind, which leads to a nice styling around the cell, a red triangle which encourages the user to hover over, and an animated red tooltip.
-Throwing an exception in the binding layer, which just leads to a red border around the cell.
http://docs.telerik.com/devtools/silverlight/controls/radgridview/features/managing-data-validation
Is there a reason why the 2nd approach is so lacking compared to the first?
Is there an example demonstrating how to have Property validation but with the improved styling?
Hi,
I can make my own RadDiagramShape Style:
<
Style
TargetType
=
"telerik:RadDiagramShape"
x:Key
=
"ShapeStyle"
>
<
Setter
Property
=
"Width"
Value
=
"200"
/>
<
Setter
Property
=
"Height"
Value
=
"80"
/>
<
Setter
Property
=
"FontSize"
Value
=
"16"
/>
<
Setter
Property
=
"StrokeThickness"
Value
=
"1"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"Black"
/>
<
Setter
Property
=
"Stroke"
Value
=
"Black"
/>
<
Setter
Property
=
"Background"
>
<
Setter.Value
>
<
LinearGradientBrush
EndPoint
=
"0.5,1"
StartPoint
=
"0.5,0"
>
<
GradientStop
Color
=
"#FFB0B0FB"
Offset
=
"0"
/>
<
GradientStop
Color
=
"#FF3C2ECA"
Offset
=
"0.527"
/>
<
GradientStop
Color
=
"#FF746BCC"
Offset
=
"0.987"
/>
</
LinearGradientBrush
>
</
Setter.Value
>
</
Setter
>
<
Setter
Property
=
"Foreground"
Value
=
"White"
/>
</
Style
>
<
telerik:RadDiagram
Grid.Row
=
"1"
IsRotationEnabled
=
"False"
AllowDrop
=
"True"
SelectionChanged
=
"MainDiagram_SelectionChanged"
ShapeStyle
=
"{StaticResource ShapeStyle}"
ConnectionStyle
=
"{StaticResource ConnectionStyle}"
ConnectionBridge
=
"Gap"
IsPanEnabled
=
"True"
x:Name
=
"MainDiagram"
>
<
telerik:RadDiagramToolbox
x:Name
=
"MainToolBox"
IsEnabled
=
"{Binding ActiveStructuur, Converter={StaticResource NullToBoolConverter}}"
HorizontalAlignment
=
"Stretch"
Title
=
"Gallery"
Header
=
"ToolBox"
IsOpen
=
"False"
/>
From code behind and the ToolBox these are respected: FontSize, StrokeThickness, BorderBrush, Stroke, Background.
But not the width and height when I drag from the ToolBox.
They are respected when I add the shape from code behind.
Is there a way to make the ToolBox respect the width and height I specified in the style?
Regards,
Bayram
Hi,
I can't figure out how to change the geometry of a Shape in a Diagram using the SettingsPane. For example, I want to change a circle to a rectangle.
In your example:
http://demos.telerik.com/silverlight/#Diagrams/DesignToolbox
There is a SettingsPane that appears when you click on the cog next to a diagram shape.
Under the Style tab there is a Geometry, but that only changes the line style.
Is there a way to change a circle to a rectangle?
Regards,
Bayram
Hi,
I am trying to set the Header and Footer(Raddocument's) default style. Could you guys help me in this please ?
We configure the MainDocuments default style in the xaml and load them using XamlFormatProvider.Import(xaml) to create the instance of RadDcoument. Would be great if we could set default style for Header and footer in xaml as well and load them.
If configuring like above is not possible, please suggest some other way to set the default style for Header and footers
Thanks
Anand
Hi,
I am trying to set Default style for the RadDocument Header and Footer, could you guys help me in this please ? I would like to set them on loading the document and creating the Raddocument instance.
We set the MainDocuments default style in xaml and load the xaml using XamlFormatProvider.Import(xaml) to create default document. would be great if we can configure style for the Header and footer in xamlas well.
If configuring in xaml is not possible, please suggest some other approach to achieve this
Thanks
Anand
I am using the RadAutoCompleteBox for getting the user input.
i can also see the DropDownItemTemplate (which is used to put a template to the dropdownitems shown)...but I can't see/find anywhere a way to use a data template for the textbox ...after the users have made a selection.
so for example... the drop down displays (Value : Display Name) and when the selection happens on the display name is shown...but i want to display the entire thing in the autocomplete textbox...
is there any way i can acheieve this.
thanks and regards,
arun
Hello,
With the RadScheduleView, is it possible to make it so that the user can resize only by dragging the end time of an appointment, but not the start time?
I attempted to implement this by overriding CanStartResize in a custom ScheduleViewDragDropBehavior, but couldn't find any way to determine if it is the start or end time that is being dragged.
Any assistance would be greatly appreciated
Thanks