public
void
test()
{
LineSeries line1 =
new
LineSeries() { };
for
(
int
i = 0; i < 10; i++)
{
line1.DataPoints.Add(
new
Telerik.Charting.CategoricalDataPoint() { Value = i });
}
line1.MouseLeftButtonDown += (sender, args) => MouseLeftDown(sender, args, chart1);
chart1.Series.Add(line1);
}
public
void
MouseLeftDown(
object
sender,MouseButtonEventArgs args,RadCartesianChart chart)
{
}
chart[i].HorizontalAxis=
new
LinearAxis() { LabelInterval = 10 };
[TypeConverter(typeof(LineTypeConverterNoExpand)), GlobalizedCategory("Misc"), GlobalizedDisplayName("LineType"), GlobalizedDescription("Get/Set the vdLinetype object that the vdFigure will be drawn with."), ScriptSerialize]
public vdLineType LineType
{
get
{
return this.mLineType;
}
set
{
if ((this.mLineType != value) && base.RaiseOnBeforeModify("LineType", value))
{
if ((!this.Deleted && (value != null)) && value.Deleted)
{
value.Deleted = false;
}
base.AddHistory("LineType", value);
this.mLineType = value;
base.RaiseOnAfterModify("LineType");
}
}
}
namespace VectorDraw.Professional.vdPrimaries
{
using System;
using System.ComponentModel;
using System.Globalization;
using VectorDraw.Professional.Utilities;
using VectorDraw.Professional.vdObjects;
public class LineTypeConverterNoExpand : TypeConverter
{
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
{
if (context == null)
{
return false;
}
return ((sourceType == typeof(string)) || base.CanConvertFrom(context, sourceType));
}
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
{
if (value is string)
{
try
{
string name = (string) value;
vdDocument document = TypeConverterUtilities.getDocument(context);
object solid = null;
if (document != null)
{
solid = document.LineTypes.FindName(name);
}
if (solid == null)
{
solid = document.LineTypes.Solid;
}
return solid;
}
catch
{
throw new NotSupportedException("Can not convert '" + ((string) value) + "' to type LineType");
}
}
return base.ConvertFrom(context, culture, value);
}
public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
{
vdDocument document = TypeConverterUtilities.getDocument(context);
if (document == null)
{
return new TypeConverter.StandardValuesCollection(new string[0]);
}
return new TypeConverter.StandardValuesCollection(document.LineTypes.GetNotDeletedItemsAndVisibleOnForms());
}
public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
{
return true;
}
}
}
Hi,
I have
only one column in grid view and I do not want to show any grid lines and
row/column headers. When I set GridLinesVisibility="None"
ShowColumnHeaders="False" ShowGroupPanel="False" RowIndicatorVisibility="Collapsed". I can see vertical grid line (or it may be something else)
only before first column. Do we have any direct way or some workaround to hide
that?
I have
attached a screenshot for this.
Thanks and regards,
Shiv
<
Window
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
x:Class
=
"Telerik_Forum.MainWindow"
xmlns:numericinput
=
"clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input"
Title
=
"MainWindow"
Height
=
"150"
Width
=
"525"
>
<
Window.Resources
>
<
ControlTemplate
x:Key
=
"CustomErrorTemplate"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
Border
Margin
=
"-1"
VerticalAlignment
=
"Center"
>
<
AdornedElementPlaceholder
x:Name
=
"Holder"
/>
</
Border
>
<
Border
Margin
=
"3 1 0 1"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Center"
>
<
StackPanel
>
<
TextBlock
Text
=
"!!!"
ToolTip
=
"{Binding ElementName=Holder, Path=AdornedElement.DisplayErrorMessage}"
/>
</
StackPanel
>
</
Border
>
</
StackPanel
>
</
ControlTemplate
>
</
Window.Resources
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"30"
/>
<
RowDefinition
Height
=
"30"
/>
<
RowDefinition
Height
=
"30"
/>
</
Grid.RowDefinitions
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
Width
=
"Auto"
/>
<
ColumnDefinition
Width
=
"*"
/>
</
Grid.ColumnDefinitions
>
<
TextBlock
Grid.Column
=
"0"
Grid.Row
=
"0"
Text
=
"Project Number:"
/>
<
telerik:RadMaskedNumericInput
Grid.Column
=
"1"
Grid.Row
=
"0"
Width
=
"100"
Validation.ErrorTemplate
=
"{StaticResource CustomErrorTemplate}"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Top"
Value
=
"{Binding ProjectNumber, ValidatesOnDataErrors=True, ValidatesOnNotifyDataErrors=True, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsClearButtonVisible
=
"False"
Mask
=
"#4"
AutoFillNumberGroupSeparators
=
"False"
Placeholder
=
" "
/>
<
TextBlock
Grid.Column
=
"0"
Grid.Row
=
"1"
Text
=
"Cost Summary:"
/>
<
telerik:RadMaskedNumericInput
Grid.Column
=
"1"
Grid.Row
=
"1"
Width
=
"100"
Validation.ErrorTemplate
=
"{StaticResource CustomErrorTemplate}"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Top"
Value
=
"{Binding CostSummary, ValidatesOnDataErrors=True, ValidatesOnNotifyDataErrors=True, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsClearButtonVisible
=
"False"
Mask
=
"#9.2"
AutoFillNumberGroupSeparators
=
"False"
Placeholder
=
" "
/>
<
TextBlock
Grid.Column
=
"0"
Grid.Row
=
"2"
Text
=
"Project Description:"
/>
<
telerik:RadMaskedTextInput
Grid.Column
=
"1"
Grid.Row
=
"2"
Width
=
"300"
AllowInvalidValues
=
"True"
UpdateValueEvent
=
"PropertyChanged"
Validation.ErrorTemplate
=
"{StaticResource CustomErrorTemplate}"
HorizontalAlignment
=
"Left"
VerticalAlignment
=
"Top"
Value
=
"{Binding ProjectDescription, ValidatesOnDataErrors=True, ValidatesOnNotifyDataErrors=True, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Mask
=
""
IsClearButtonVisible
=
"False"
numericinput:MaskedInputExtensions.MinTextLength
=
"5"
numericinput:MaskedInputExtensions.MaxTextLength
=
"80"
Placeholder
=
" "
/>
</
Grid
>
</
Window
>
public
partial
class
MainWindow : Window
{
public
MainWindow()
{
InitializeComponent();
TestModel m_Model =
new
TestModel(0, 0,
"Test"
);
this
.DataContext = m_Model;
}
}
public
class
TestModel : IDataErrorInfo
{
public
TestModel()
{ }
public
TestModel(
int
project_number,
double
cost_summary,
string
project_description)
{
this
.ProjectNumber = project_number;
this
.CostSummary = cost_summary;
this
.ProjectDescription = project_description;
}
public
int
ProjectNumber {
get
;
set
; }
public
double
CostSummary {
get
;
set
; }
[StringLength(10, MinimumLength = 5)]
public
string
ProjectDescription {
get
;
set
; }
public
string
Error
{
get
{
return
this
[
string
.Empty]; }
}
public
string
this
[
string
propertyName]
{
get
{
string
validationResult =
null
;
switch
(propertyName)
{
case
"ProjectNumber"
:
validationResult = Validate_ProjectNumber();
break
;
case
"CostSummary"
:
validationResult = Validate_CostSummary();
break
;
case
"ProjectDescription"
:
validationResult = Validate_ProjectDescription();
break
;
default
:
throw
new
ApplicationException(
"Unknown Property being validated on Product."
);
}
return
validationResult;
}
}
private
string
Validate_ProjectNumber()
{
string
Result =
""
;
if
(ProjectNumber == 0)
{
Result =
"Please Enter a Project Number."
;
}
if
(ProjectNumber < 1 || ProjectNumber > 9999)
{
Result =
"Only ProjectNumber Between 1 and 9999"
;
}
return
Result;
}
private
string
Validate_CostSummary()
{
string
Result =
""
;
if
(CostSummary == 0)
{
Result =
"Please Enter Cost Summary Value."
;
}
else
if
(CostSummary < 0.0)
{
Result =
"Cost Summary allows only positive Values."
;
}
return
Result;
}
private
string
Validate_ProjectDescription()
{
string
Result =
""
;
if
(ProjectDescription.Length == 0)
{
Result =
"Please Enter a Project Description"
;
}
else
if
(ProjectDescription.Length < 5)
{
Result =
"You must enter a Project Description with 5 Characters."
;
}
return
Result;
}
}
CustomLine line =
new
CustomLine();
line.Style = (Style)Application.Current.FindResource(
"DashedCustomLine"
);
line.Stroke = Brushes.Black;
line.StrokeThickness = 1;
line.YIntercept = 0;
line.Slope = 1;
<
Style
x:Key
=
"DashedCustomLine"
TargetType
=
"telerikCharting:CustomLine"
>
<
Setter
Property
=
"StrokeDashArray"
Value
=
"5,2"
/>
</
Style
>
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
RadDocking
>
<
DocumentHost
>
<
RadSplitContainer
SerializationTag
=
"m_splitContainer2"
Orientation
=
"Vertical"
>
<
Items
>
<
RadPaneGroup
SerializationTag
=
"m_paneGroup2"
SelectedIndex
=
"-1"
>
<
Items
/>
</
RadPaneGroup
>
<
RadPaneGroup
SerializationTag
=
"m_paneGroup3"
SelectedIndex
=
"-1"
>
<
Items
/>
</
RadPaneGroup
>
</
Items
>
</
RadSplitContainer
>
</
DocumentHost
>
<
SplitContainers
>
<
RadSplitContainer
SerializationTag
=
"m_splitContainer1"
Dock
=
"DockedLeft"
Width
=
"240"
>
<
Items
>
<
RadPaneGroup
SerializationTag
=
"m_paneGroup1"
SelectedIndex
=
"-1"
>
<
Items
/>
</
RadPaneGroup
>
</
Items
>
</
RadSplitContainer
>
</
SplitContainers
>
</
RadDocking
>