Hi,
We are exporting the documents created in RadRichTextBox to PDF files. Then we add a Barcode on the upper right of pages as a new layer. We need to check if the Barcode borders intersects with any document element (text, table, image, etc.) in the document.
First Approach: We try to set the caret position to first line, then set to line ending, get the location and check if it intersects with Barcode border.
Problem with this approach: When we get the location of caret position, it returns position offset to the RadRichTextBox control. But we need the offset coordinates to the page borders.
Code:
01.
for
(
int
i = 2; i <= pageCount; i++)
02.
{
03.
RadEditor.Document.CaretPosition.MoveToPage(i);
04.
RadEditor.Document.CaretPosition.MoveToCurrentLineEnd();
05.
if
((RadEditor.Document.CaretPosition.Location.X) > 700 && (RadEditor.Document.CaretPosition.Location.Y) < 100)
06.
{
07.
// barcode border intersects with the text in the document
08.
}
09.
}
Second Approach: We can use GetLayoutBoxByPosition method to check if there is an element at the coordinates we will add Barcode border.
Problem with this approach: We should give the position offset to the RadRichTextBox but we need to give the position offset to the page borders.
I've attached 3 images to describe the problem more clearly.
Regards.
Hello,
I've edited the RadTreeListView row template to add additional visuals that I need, but after the modifications an horizontal scrollbar appears and what seems to be an empty column header is added (image attached)
I've seen that the problem lies in the extra visuals I added to the row template, because when I remove the 2 colored borders the empty column header disappears.
Here you can find a sample project that reproduces the issue:
How can I prevent this issue and make the empty column header disapper ?
Thank you for your support.
Hi,
We have a RadGridView binded on DataTable.DefaultView object as ItemsSource.
Our DataTable is define as follow:
A DataRow object is overrided by our own Record object that contains Collection of Property object as ItemArray
public
class
Record : DataRow, IEquatable<Record>, ICloneable
{
public
Record(DataRowBuilder builder)
:
base
(builder)
{
}
public
new
Property
this
[
string
columnName]
{
get
{
return
(Property)
base
[columnName];
}
set
{
SetRowVisibility(value);
base
[columnName] = value;
}
}
}
All Property objects are updated in realtime by a thread that changes Property Value
We don't have any problem to see all data updated.
But when we apply a filter on a column, the filter is not reapply automatically when data value changed.
One solution was to remove completely the Row and add it with new values..It 's running for filter, but we have identify several problems with sorting, because Rows are deleted/added during sorting thread, that generate an IndexOutOfBoundsException
What's the solution ?
regards,
I have created an Excel spreadsheet using Microsoft Excel 2013. The spreadsheet I created is empty but it has some formatting, e.g. I selected all cells and set text alignment to right. I also selected some of columns and set their type to Number, short date, or general. Is it possible to get these formattings and types from an empty spreadsheet? I already tried this, but it seems that RadHorizontalAlignment is always General, not Right as I would like it to be.
Hi,
I use global custom template for Window control in application. So all dialogs have Ok, Cansel buttons and Close button. The problem is that the same style is applied to drag&drop window that appears when I'm reordering columns in RadGridView. So it looks like it also uses that Window template.
Is there a way how could I change style for drag and drop header in RadGridView without modifying my global template?
I have a RadTreeView that I am binding to some data.
I would like to have all the items in the tree expanded by default.
The issue I have when I do this is that the tree is autoscrolling to the right to bring into focus the most right hand expanded item.
To try and get round this I have disabled the horizontal scroll bar, call ExpandAll(), then after that reenable the horizontal scroll bar.
This is not working.
private
void
FrameworkElement_OnLoaded(
object
sender, RoutedEventArgs e)
{
RadTreeView rtv = sender
as
RadTreeView;
if
(rtv.ScrollViewer !=
null
)
{
rtv.ScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
rtv.ExpandAll();
rtv.ScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;
}
}
Please can you advise on the correct way to achieve this?
Thanks.
Hello,
I am using RadCartesianChart LineSeries and I can not set line color.
my XAML
<chart:RadCartesianChart x:Name="radChart"
Grid.Row="3"
Grid.Column="0"
Palette="Windows8"
Margin="6,-5,0,0"
Height="240">
<chart:RadCartesianChart.Resources>
<DataTemplate x:Key="PointTemplate1">
<Ellipse Height="10" Width="10" Fill="#FF1B9DDE" />
</DataTemplate>
</chart:RadCartesianChart.Resources>
<chart:RadCartesianChart.HorizontalAxis>
<chartView:CategoricalAxis FontSize="14"/>
</chart:RadCartesianChart.HorizontalAxis>
<chart:RadCartesianChart.VerticalAxis>
<chartView:LinearAxis FontFamily="Segoe UI" FontSize="14" Title="Calories" TickThickness="1" Minimum="0" Maximum="{Binding LinearAxisMaxValue}" />
</chart:RadCartesianChart.VerticalAxis>
<chart:RadCartesianChart.Grid>
<chartView:CartesianChartGrid MajorLinesVisibility="XY" StripLinesVisibility="none" />
</chart:RadCartesianChart.Grid>
<ctChart:ChartSeriesTypeSwitch.SeriesType >
<Binding Path="SelectedChartType" />
</ctChart:ChartSeriesTypeSwitch.SeriesType>
</chart:RadCartesianChart>
please help me
When copying multiple cells from an excel sheet to the GridView, empty cells are skipped and following non-empty cells are moved forward. See attached screenshots for an illustration.
This behavior is undesirable for obvious reasons. Is this a bug or a feature. If it's a feature, is there a workaround?
We are implementing a drag&drop scenario, where the drop target can be another control from our application or the drop target can be the desktop or another folder from the file system. How can I set the dragged data inside the DragInitializeHandler to handle both scenarios simultaneously?
If the dragged data is a DataObject where the data is set via SetFileDropList I can drag the data to the desktop but not to another control. If I create a IPayload and sets the data via SetData("DragData", ...) and SetData("FileDrop", ...) I can drag the data to the other control but not to the desktop?
How can I create a payload, which is working for both scenarios?
Felix
We are currently using a GridViewComboBoxColumn control in a GridView, and like a few others, we would like the combobox editor (arrow) to always be visible. Most answers have involved using the said 'GridViewComboBoxColumn' or a 'GridViewDataColumn' in conjunction with a DataTemplate to target the ComboBox.
I have both approaches, both with the same result. I get a column of combo boxes, but no data.
This is our current markup:
<
telerik:GridViewComboBoxColumn
x:Name
=
"ColP4"
Width
=
"150"
IsReadOnly
=
"False"
IsComboBoxEditable
=
"False"
EditTriggers
=
"CellClick"
ItemsSource
=
"{Binding PermissionCollection}"
DataMemberBinding
=
"{Binding Col4}"
UniqueName
=
"Permission"
Header
=
"{Binding Source={StaticResource TranslationAreas}, Path=[exportproject][TXT_COLUMN_5]}"
DisplayMemberPath
=
"Name"
SelectedValueMemberPath
=
"ID"
/>
ItemsSource is an ObservableCollection of type 'Permission'. Permission has two properties, int: ID and str: Name.
This looks like what we want, only with no data:
<
telerik:GridViewDataColumn
x:Name
=
"ColP4"
DataMemberBinding
=
"{Binding Col4}"
Header="{Binding Source={StaticResource TranslationAreas}, Path=[exportproject]
[TXT_COLUMN_5]}" >
<
telerik:GridViewColumn.CellTemplate
>
<
DataTemplate
>
<
ComboBox
DisplayMemberPath
=
"Name"
ItemsSource
=
"{Binding PermissionCollection}"
SelectedValue
=
"ID"
SelectedValuePath
=
"ID"
/>
</
DataTemplate
>
</
telerik:GridViewColumn.CellTemplate
>
</
telerik:GridViewDataColumn
>
I'm sure the problem lies with the databinding. Any help is very much appreciated.