Hello,
When I have NewRowPosition set to Bottom, I see the "Click here to add new item" button at the bottom of the GridView, as expected.
My issue is that when I click the NewRow button, the button disappears as I am adding the new row. Note that this only happens when adding a new row - when editing an existing row, the NewRow button appears as expected.
Is there a way to always have the NewRow button shown when adding new rows?
Thanks,
-Thanos
<
StackPanel
x:Name
=
"PART_FooterPanel"
HorizontalAlignment
=
"Right"
Orientation
=
"Horizontal"
>
<
telerik:RadButton
x:Name
=
"PART_CommitButton"
Content
=
"{TemplateBinding CommitButtonContent}"
Command
=
"{Binding Source={StaticResource DataContextProxy}, Path=Data.UpdateItem}"
InnerCornerRadius
=
"0"
Margin
=
"2,4,4,4"
MinWidth
=
"48"
MinHeight
=
"20"
>
<
telerik:StyleManager.Theme
>
<
telerik:Office_BlackTheme
/>
</
telerik:StyleManager.Theme
>
</
telerik:RadButton
>
<
telerik:RadButton
x:Name
=
"PART_CancelButton"
Content
=
"{TemplateBinding CancelButtonContent}"
Command
=
"{Binding Source={StaticResource DataContextProxy},Path=Data.CancelItemUpdate}"
InnerCornerRadius
=
"0"
Margin
=
"2,4,4,4"
MinWidth
=
"48"
MinHeight
=
"20"
>
<
telerik:StyleManager.Theme
>
<
telerik:Office_BlackTheme
/>
</
telerik:StyleManager.Theme
>
</
telerik:RadButton
>
</
StackPanel
>
<
telerik:RadDataForm
x:Name
=
"DataForm1"
CurrentItem
=
"{Binding CurrentLevelItem,UpdateSourceTrigger=PropertyChanged}"
Style
=
"{StaticResource RadDataFormStyle1}"
DataFieldStyle
=
"{StaticResource DataFormDataFieldStyle1}"
AutoEdit
=
"True"
CommandButtonsVisibility
=
"None"
/>
Hello,
I am trying to create a email message viewer like Outlook using the RichTextbox.
Is this the right control to use for this scenario?
The viewer should be able to display plain-text emails and HTML emails.
I implemented it partially but I cant get the scrollbar visiblewhen the message is longer then what can be contained in the richtextbox.
<
ContentControl
Grid.Row
=
"6"
Grid.Column
=
"0"
Grid.ColumnSpan
=
"3"
>
<
Grid
>
<
telerikHtml:HtmlDataProvider
Html
=
"{Binding BodyText, Mode=TwoWay}"
RichTextBox
=
"{Binding ElementName=rtbHtmlEmail}"
x:Name
=
"htmlDataProvider"
/>
<
ScrollViewer
HorizontalScrollBarVisibility
=
"Auto"
VerticalScrollBarVisibility
=
"Auto"
>
<
telerik:RadRichTextBox
x:Name
=
"rtbHtmlEmail"
Padding
=
"15"
MinWidth
=
"800"
MinHeight
=
"650"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
HorizontalContentAlignment
=
"Left"
VerticalContentAlignment
=
"Top"
IsReadOnly
=
"True"
LayoutMode
=
"Flow"
/>
</
ScrollViewer
>
</
Grid
>
</
ContentControl
>
Hello,
I am using VS Professional 2015, DevCraft Ultimate version 2016.2.613, UI for WPF RadListBox. Using Office2013 Theme, I wish to override the color of a RadListBox's selected RadListBoxItem. I also want to override this background color for mouseover. Currently these are an orange color and I want to change that. My understanding is that the RadListBoxItem control template has a border named "SelectedVisual" and I need to override its background color. Maybe something similar for mouseover? (haven't got there yet). My problem is that I can't figure out how to do any of this using Expression Blend 2015. I'm on the Objects and Timeline pane and when I right click on my RadListBox I don't see an option for "Edit Additional Styles" which I think would get me to the RadListBoxItem's style. I do see "Edit Additional Templates" but nothing I try around that option is getting me to the "SelectedVisual" border. I would welcome any info on 1) how to do this in Blend or 2) any recommended alternative method to override RadListBoxItem's selected and mouseover background colors. Please see attached imagesto better visualize what I'm trying to do.
Thanks,
Chris
I am using WPF. I want to Export the selected Rows from the RadGridView to Excel. I have managed to export all the rows to Excel, but if the user makes a selection I want to export only the selected rows to Excel. Here is my code below, I just need ti implement the TODO section. Can someone help ?
01.
public
void
Execute_OpenExportView(RadGridView gridViewExport)
02.
{
03.
if
(gridViewExport==
null
)
04.
{
05.
return
;
06.
}
07.
08.
string
extension =
"xlsx"
;
09.
SaveFileDialog dialog =
new
SaveFileDialog()
10.
{
11.
DefaultExt = extension,
12.
Filter = String.Format(
"{1} files (*.{0})|*.{0}|All files(*.*)|*.*"
, extension,
"Excel"
),
13.
FilterIndex = 1,
14.
AddExtension =
true
,
15.
Title =
"Export to Excel"
,
16.
//FileName =
17.
};
18.
19.
20.
//TODO export the selected rows from RadGRidView
21.
if
(gridViewExport.SelectedItems.Count!=0)
22.
{
23.
24.
25.
}
26.
27.
if
(dialog.ShowDialog()==
true
)
28.
{
29.
using
(Stream stream = dialog.OpenFile())
30.
{
31.
gridViewExport.ExportToXlsx(stream,
32.
new
GridViewDocumentExportOptions()
33.
{
34.
ShowColumnFooters =
true
,
35.
ShowColumnHeaders =
true
,
36.
ShowGroupFooters =
true
,
37.
AutoFitColumnsWidth =
true
,
38.
});
39.
}
40.
}
41.
42.
}
hi dear supporters,
i have used the connection content and connection points to route the connection.
now, the connection content is positioned in the middle of the connection but i need to position it in other positions.
the image is attached.
my code is also here.
how can i get the needed position of the connection content.
private void diagram1_ConnectionManipulationCompleted(object sender, ManipulationRoutedEventArgs e)
{
var image = new System.Windows.Controls.Image() { Source = new BitmapImage(new Uri("components/" + "conn"+ ".png",UriKind.Relative)) };
System.Windows.Point startPoint= e.Connection.StartPoint;
System.Windows.Point endPoint= e.Connection.EndPoint;
double deltaX = Math.Abs(endPoint.X - startPoint.X);
double deltaY = Math.Abs(endPoint.Y - startPoint.Y);
image.Stretch=Stretch.Fill;
image.Width = 0.8*Math.Max(deltaX,deltaY);
image.Height = 5;
TextBlock txt = new TextBlock();
txt.Text = strSelectedComponent;
StackPanel stpanel = new StackPanel();
stpanel.Children.Add(txt);
stpanel.Children.Add(image);
Viewbox viewBox = new Viewbox() { Stretch = Stretch.None, Margin = new Thickness(-4) };
viewBox.Child = stpanel;
e.Connection.ConnectionPoints.Add(new System.Windows.Point(endPoint.X,startPoint.Y));
e.Connection.Content = viewBox;
}
Hi, I tried to follow the examples in this thead but I can't get it working. Can someone show me ho to set the backgroud of the rows where the columns Quantità and QtaPrelevata have the same value?
VB.net please.
<telerik:RadDataPager x:Name="rDataPager" PageSize="10" Source="{Binding Items, ElementName=gridOrdini}" ></telerik:RadDataPager>
<telerik:RadGridView x:Name="gridOrdini" SelectionUnit="FullRow" AutoGenerateColumns="False" CanUserInsertRows="False" CanUserDeleteRows="False" RowIndicatorVisibility="Collapsed"
ShowGroupPanel="False" IsReadOnly="False" Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Window}}}" SelectionMode="Single" CanUserReorderColumns="False"
FontFamily="Source Sans Pro Semibold" FontSize="14" GridLinesVisibility="Horizontal" IsFilteringAllowed="False">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn x:Name="Vettore1" UniqueName="Vettore1" Header="Vettore" IsReadOnly="True" IsVisible="False" Width="60" DataMemberBinding="{Binding Vettore1}"/>
<telerik:GridViewDataColumn x:Name="Articolo" Header="Articolo" IsReadOnly="True" DataMemberBinding="{Binding Articolo}" Width="100"/>
<telerik:GridViewDataColumn x:Name="Descri" Header="Descri" IsReadOnly="True" DataMemberBinding="{Binding Descri}" Width="*"/>
<telerik:GridViewDataColumn x:Name="Quantita" Header="Quantità" IsReadOnly="True" DataMemberBinding="{Binding Quantita}" Width="80"/>
<telerik:GridViewDataColumn x:Name="QtaPrelevata" Header="Qta Prelevata" IsReadOnly="True" DataMemberBinding="{Binding QtaPrelevata}" Width="80"/>
<telerik:GridViewDataColumn x:Name="Reparto" Header="Reparto" IsReadOnly="True" DataMemberBinding="{Binding Reparto}" Width="80"/>
<telerik:GridViewDataColumn x:Name="UnMis" Header="UnMis" IsReadOnly="True" DataMemberBinding="{Binding UnMis}" Width="60"/>
<telerik:GridViewDataColumn x:Name="Cella" Header="Cella" IsReadOnly="True" DataMemberBinding="{Binding Cella}" Width="60"/>
<telerik:GridViewDataColumn x:Name="GruppoCella" Header="GruppoCella" IsReadOnly="True" DataMemberBinding="{Binding GruppoCella}" Width="80"/>
<telerik:GridViewDataColumn x:Name="CatMerc" Header="CatMerc" IsReadOnly="True" DataMemberBinding="{Binding CatMerc}" Width="80"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Thank you very mutch
Hi all,
I am working on a WPF application using Telerik and coded in C# .NET.
My following question is over a WPF page using the “Code behind” model to implement the logic of the page.
Currently, I have a <telerik:RadGridView> for which the source is the DefaultView of a DataTable containing 365 columns (or 366, it depends on the number of days in a year).
But I am facing an issue :
The source of the RadGridView is a 365/6 columns DataTable (DefaultView).
It does not seem that all the columns are loaded at the begining.
I mean that I have to scroll 3 times to the end of the scrollbar to make all the 365/6 columns appear . => This could be another issue, but it is my opinion.
I would like to know how to load all that columns at once ?
Any help or tip will be much appreciated :)
I have a fairly complicated application that includes a RadDataForm that contains a TextBox that is supposed to allow a user to type multiple lines. The TextBox has TextWrapping="Wrap" and AcceptsReturn="True", but it doesn't work, of course, because RadDataForm binds the return key, and commits the form, regardless of what type of field has the focus.
So I wrote a simple DataFormCommandProvider:
public
class
ClearReturnKeyActionCommandProvider : DataFormCommandProvider
{
public
ClearReturnKeyActionCommandProvider()
:
base
(
null
)
{
}
public
ClearReturnKeyActionCommandProvider(RadDataForm dataForm)
:
base
(dataForm)
{
this
.DataForm = dataForm;
}
public
override
List<DelegateCommandWrapper> ProvideCommandsForKey(KeyEventArgs args)
{
var actionsToExecute =
base
.ProvideCommandsForKey(args);
if
(args.Key == Key.Return)
{
actionsToExecute.Clear();
}
return
actionsToExecute;
}
}
Stick this in a resource, and set the form's CommandProvider, and suddenly I can enter multiple lines in the TextBox:
<telerik:RadDataForm Grid.Row=
"1"
Grid.Column=
"0"
ItemsSource=
"{Binding Path=viewModel.contacts, RelativeSource={RelativeSource AncestorType=KtWpf:ContactsControl}}"
AutoGenerateFields=
"False"
EditTemplate=
"{StaticResource contactsEditTemplate}"
NewItemTemplate=
"{StaticResource contactsEditTemplate}"
ReadOnlyTemplate=
"{StaticResource contactsEditTemplate}"
AutoEdit=
"False"
CommandButtonsVisibility=
"None"
CommandProvider=
"{StaticResource clearReturnKeyActionCommandProvider}"
InitializingNewItem=
"radDataForm_InitializingNewItem"
EditEnding=
"radDataForm_EditEnding"
/>
And, of course, something else breaks.
I have a pair of save and cancel buttons, outside the form, that set RadDataFormCommands.CommitEdit and RadDataFormCommands.CancelEdit.
<telerik:RadButton Style=
"{StaticResource actionButton}"
Content=
"Save"
Command=
"telerik:RadDataFormCommands.CommitEdit"
CommandTarget=
"{Binding ElementName=radDataForm}"
/>
<telerik:RadButton Style=
"{StaticResource actionButton}"
Content=
"Cancel"
Command=
"telerik:RadDataFormCommands.CancelEdit"
CommandTarget=
"{Binding ElementName=radDataForm}"
/>
When I do not have the CommandProvider set, these work fine. But when I do, they're disabled. Both of them are disabled, even the Cancel button, which isn't ever supposed to be disabled.
This should be simple. What am I doing wrong?