Hello,
We are using the RichTextBox to display emails and the emails coming from one of the servers shows the embedded image as 10 x 10 pixels. If I take the temporary image that was downloaded (and linked to the ImageInline) and send it in another email or open it with an image viewer, it shows up with the proper dimensions.
Thanks,
Wil
//pFilterDescriptors is the FilterDescriptors collection from RadGridView
//_FilterStore is a local CompositeFilterDescriptorCollection
public
void
StoreFilter(Telerik.Windows.Data.CompositeFilterDescriptorCollection pFilterDescriptors) {
if
(_FilterStore !=
null
) {
_FilterStore.Clear();
foreach
(IFilterDescriptor o
in
pFilterDescriptors) {
_FilterStore.Add(o);
}
}
}
//pFilterDescriptors is the FilterDescriptors collection from RadGridView
//_FilterStore is a local CompositeFilterDescriptorCollection
public
void
RestoreFilter(Telerik.Windows.Data.CompositeFilterDescriptorCollection pFilterDescriptors) {
if
(pFilterDescriptors !=
null
) {
pFilterDescriptors.Clear();
foreach
(IFilterDescriptor o
in
_FilterStore) {
pFilterDescriptors.Add(o);
}
}
}
public
void
HandleNewRowPosition()
{
var showNewRow = !GridTreeListHasItems() && Grid.CanUserInsertRows;
Grid.NewRowPosition = GetInsertNewRowPosition(showNewRow);
}
private
bool
GridTreeListHasItems()
{
var anyValue =
false
;
var x = Grid.ItemsSource
as
IEnumerable;
if
(x !=
null
)
{
anyValue = x.GetEnumerator().MoveNext();
}
return
anyValue;
}
private
GridViewNewRowPosition GetInsertNewRowPosition(
bool
show)
{
var converter =
new
BooleanToGridViewNewRowPositionConverter();
return
(GridViewNewRowPosition)converter.Convert(show,
typeof
(GridViewNewRowPosition),
null
, CultureInfo.CurrentUICulture);
}
/// <summary>
/// Converts a boolean to the position of new rows. True corresponds with the top.
/// </summary>
[ValueConversion(
typeof
(
bool
),
typeof
(GridViewNewRowPosition))]
public
class
BooleanToGridViewNewRowPositionConverter : IValueConverter
{
public
object
Convert(
object
value, Type targetType,
object
parameter, System.Globalization.CultureInfo culture)
{
return
(
bool
) value ? GridViewNewRowPosition.Top : GridViewNewRowPosition.None;
}
public
object
ConvertBack(
object
value, Type targetType,
object
parameter, System.Globalization.CultureInfo culture)
{
return
(GridViewNewRowPosition) value == GridViewNewRowPosition.Top;
}
}
_canUserInserRowsPropertyDescriptor = DependencyPropertyDescriptor.FromProperty(GridViewDataControl.CanUserInsertRowsProperty,
typeof
(GridViewDataControl));
if
(_canUserInserRowsPropertyDescriptor !=
null
)
{
_canUserInserRowsPropertyDescriptor.AddValueChanged(
this
.AssociatedObject, CanUserInserRowsChanged_Handler);
}
private
void
CanUserInserRowsChanged_Handler(
object
sender, EventArgs e)
{
HandleNewRowPosition();
}
RadDocument.SectionDefaultPageOrientation = PageOrientation.Landscape;and it does not work.
andRadRichTextBox.Document.SectionDefaultPageOrientation = PageOrientation.Landscape;
and
Section.PageSize = new Size() { Height = 11.0, Width = 8.5 };
RadRichTextBox.FontSize = 5.0;
and it does not work.<
telerik:RadGridView
>
<
telerik:RadGridView.RowStyle
><!-Style-> <
telerik:RadGridView.RowStyle
>
<
telerik:RadGridView.AlternateRowStyle
><!-Style-> <
telerik:RadGridView.AlternateRowStyle
>
<
telerik:RadGridView.RowDetailsTemplate
>
<
telerik:RadGridView
ItemsSource
=
"{Binding DataContext.VMPOPERTEY, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
AutoGenerateColumns
=
"True"
Name
=
"myGrids"
ColumnWidth
=
"Auto"
IsReadOnly
=
"True"
>
</
telerik:RadGridView.RowDetailsTemplate
>
</
telerik:RadGridView
>
In my application I am using telerik:GridViewImageColumn.
My scenario is I am assigning collection to gridview each object row contains the byte array of image. Collection contains more than 1000 rows. Actually collection is for my company product users. We have few products (say 10).
I am showing those product user details in gridview with product image. Each user row contains product image byte array.
After assigning data source when I scroll the gridview sometimes getting exception “Target invocation exception”Exception type: TargetInvocationException
Source: mscorlib
-----======== InnerException ========
Description: The value should not null.
Parametername: uriSource
Exception type: ArgumentNullException
Source: PresentationCore
Stack Trace:
System.Windows.Media.Imaging.BitmapImage..ctor(Uri uriSource, RequestCachePolicy uriCachePolicy)
Telerik.Windows.Controls.GridViewImageColumn.image_ImageFailed(Object sender,
ExceptionRoutedEventArgs e)
My xaml code for assigning data member is
<telerik:GridViewImageColumn Header="" UniqueName="colProductImage" DataMemberBinding="{Binding ProductImage}" ImageHeight="20" ImageWidth="20" />
What could be the solution for above problem?
My idea is to avoid above problem, instead of loading image byte data for each row just loads all 10 products data in
one collection and give the reference to image column with collection index. If it is possible please tell how to do .
Thanks for help.
Naresh Mesineni