Telerik Forums
UI for WPF Forum
1 answer
134 views
We use several radGridViews in our project and have often included an export button to push the content of the grids to Excel. Our users love the feature.

Recently we discovered a problem when you have a combobox column.  It seems to be trying to convert the display string to the type of the column during the export.  It's difficult to explain so I have prepared a small demo of the problem:

https://www.dropbox.com/s/4zkr5ofgmyfbgtt/radGridViewErrorTest.zip

if you try to export the data it will throw an error saying that the 'String must be exactly one character long'.  For combo boxes that use an integer as the selected value instead of a char (like this example does) the message will ready 'Input string not in correct format'.

Is there a better way to do combo box columns or the export so that this error can be avoided?
Yoan
Telerik team
 answered on 03 Dec 2012
0 answers
128 views
Hi
RadPaneGroup.Items.Refresh();

when I use this code in my wpf project all of RadDocumentPane is closed.
whats the basic concept of using RadPaneGroup and RadDocumentPane?
Ahad
Top achievements
Rank 1
 asked on 03 Dec 2012
10 answers
483 views
I'm trying to build a page using the DataForm ICollectionVew Synchronization demo as an example - having a GridView and a DataForm bound to the same CollectionView.

My underlying data is an ObservableCollection of my own record objects, which are instances of a class that implements INotifyPropertyChanged and IEditableObject. This collection is populated from a database.

In my VIewModel, I construct a QueryableCollectionView from the ObservableCollection, and I bind both the GridView and the DataForm to this.  Everything seems to work fine, as I navigate through the records, both on the form and in the grid.  Changing the selected record in the form changes the selected record in the grid, and vice versa.

If I edit a record in the form, the changes appear immediately in the grid, and if I hit cancel in the form, they immediately revert to what they were, in the grid.  (Which indicates that the ICollectionView.EditCancel is working right).

I have a CollectionChanged handler listening for changes in the QueryableCollectionView.  When I click on Delete, it sees a NotifyCollectionChangedAction.Remove, and deletes the record from the database.  And this seems to be working fine.

When I click "Add", I see a new row in the GridView, blank fields in the DataForm, and the CollectionChanged handler sees a NotifyCollectionChangedAction.Add, and is passed an empty instance of the record.  All it does then is populate the fields in the record that aren't visible in the GridView or the DataForm.  Later, when the user hit's the "OK" button on the DataForm, the ICollectionView.EditEnd method on the record is called - which does an insert or an update to put the record into the database.

And here's where things go wrong.  The new row in the GridView stays highlighted, like the grid thinks it's still being edited.  And while if I navigate to next and previous records in the DataForm, I see the selected row in the grid changing, if I change the selected row in the grid, I do not see the DataForm updated with the newly-selected record.

Something is not quite right, and I'm at a loss as to where to look.

Any ideas?
Maya
Telerik team
 answered on 03 Dec 2012
0 answers
115 views
Solved, was using wrong property.

Hi,

Event though I have set the WeekGroupHeaderStringFormat property to {}{0:dddd(MM/dd/yy)} it does not appear to affect the header which remains as i.e. 01 Monday. I just wish to have the names of the days displayed as Monday to Sunday without date numbers but seem to be failing, although changing firstDayOfWeek does seem to have an effect. Can anyone help?

<telerik:RadScheduleView Name="_scheduleView"
                                 AppointmentsSource="{Binding Appointments}"
                                 Grid.Row="5"
                                 Grid.ColumnSpan="2"
                                 CurrentDate="2012-10-01"
                                 NavigationHeaderVisibility="Collapsed"
                                 MinAppointmentWidth="10"
                                 MinAppointmentHeight="5"
                                 ShowDialog="RadScheduleView_ShowDialog"
                                 ToolTipTemplate="{StaticResource AppointmentToolTipTemplate}"
                                 telerik:StyleManager.Theme="Metro">
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:WeekViewDefinition FirstDayOfWeek="Monday"
                                            WeekGroupHeaderStringFormat="{}{0:dddd(MM/dd/yy)}">
                </telerik:WeekViewDefinition>
            </telerik:RadScheduleView.ViewDefinitions>
        </telerik:RadScheduleView>
Daniel
Top achievements
Rank 1
 asked on 03 Dec 2012
1 answer
81 views
I am after a view, like weekview. However only shows every Friday. 

so it may show every friday, for 7 fridays .

I have no idea where to start. 
Yana
Telerik team
 answered on 03 Dec 2012
0 answers
91 views
Hi ,

i have deleted a value in radgridview cell and moved to another cell still the value is showing in old cell. can you please tell me what i need to do to resolve this?

i am using this control for WPF applications.
Ravindra
Top achievements
Rank 1
 asked on 03 Dec 2012
0 answers
109 views
Hi All,

I am adding the new Row in RowEditEnded Event. When the RowEditEnded is called it Creates two empty Rows. Also when i press Shift+Tab to move focus to previous cell's and focus tries to move previous row it again calls the roweditended and creates the Two Empty Rows. Expected behavior is it should change the focus to previous row.

Also one more thing when i load the GridView it should be with one Empty Row.

Any workaround for this 2 issues.

private void playersGrid_AddingNewDataItem(object sender, Telerik.Windows.Controls.GridView.GridViewAddingNewEventArgs e)
        {           
            e.NewObject = new Player();
        }
  
        private void playersGrid_RowEditEnded(object sender, Telerik.Windows.Controls.GridViewRowEditEndedEventArgs e)
        {
            if (e.EditAction == GridViewEditAction.Cancel)
            {
                return;
            }
            if ( e.EditAction == GridViewEditAction.Commit)
            {
                this.playersGrid.CurrentColumn = this.playersGrid.Columns.OfType<GridViewColumn>().First();
                this.playersGrid.BeginInsert();
            }
        }

Thanks and Regards,
Sakthi
Sakthi
Top achievements
Rank 1
 asked on 03 Dec 2012
2 answers
181 views
HI!
i have a raddataform with a datagrid, the problem is that when i click "delete" on the raddataform there is any "confirmation" like "are u sure to delete blabla" , it makes all the process automatic.

its possible to put a confirmation in that button? i mean the button with a "trash can icon", in raddataform? im using WPF C#. like a dialog window "yes/no"

also my button cancel and ok in "delete mode" are disabled.

Thanks in advance,
Dempsey
Top achievements
Rank 1
 answered on 02 Dec 2012
12 answers
904 views
Hello, I need to get the text under the caret, my position has to check a text format and retrieve it. This format is "Code, delimiter, keywords"

Example: "CODE1;,;CODE2;?;CODE3"

When the user presses F11, a function must retrieve the text regardless of the position of the caret in the text (beginning, middle, end)

I tried, but every time I have only pieces of text, I can not get the entire text.
Iva Toteva
Telerik team
 answered on 30 Nov 2012
1 answer
129 views
Hello,

Here is the scenario: one autocomplete and one button(mvvm with mvvmlight). The Button is enabled only(canexecute command) if the SelectedItem property is null. If the list of suggestions expands beyond the window, two behaviors can occur:
  • If the elemet clicked  is over the window, the command is evaluated immediately.
  • If the element clicked is beyond the window(as in the screenshot), the command is not evaluated until the componebt lose focus.



<Window x:Class="WpfApplication1.TestAutoComplete"
         xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        Title="TestAutoComplete" Height="100" Width="100"
        DataContext="{Binding TestAutoCompleteBinding, Source={StaticResource Locator}}">
    <Grid>
        <StackPanel Orientation="Vertical">
            <telerik:RadAutoCompleteBox ItemsSource="{Binding Source,Mode=TwoWay}" AutoCompleteMode="Suggest" SelectionMode="Single" SelectedItem="{Binding SelectedItem,Mode=TwoWay}" DisplayMemberPath="FirstName"/>
            <Button Command="{Binding TestCommand}" Content="test"/>
        </StackPanel>
    </Grid>
</Window>


public class TestAutoCompleteViewModel : ViewModelBase
 {
     public ObservableCollection<Customer> _source;
 
     public ObservableCollection<Customer> Source
     {
         get
         {
             return this._source;
         }
         set
         {
             this._source = value;
             this.RaisePropertyChanged(() => this.Source);
         }
     }
 
     private ICommand _testCommand;
 
     public ICommand TestCommand
     {
         get
         {
             return this._testCommand;
         }
     }
 
     private Customer _selectedItem;
 
     public Customer SelectedItem
     {
         get
         {
             return this._selectedItem;
         }
         set
         {
             this._selectedItem = value;
             this.RaisePropertyChanged(() => this.SelectedItem);
         }
     }
 
     /// <summary>
     /// Initializes a new instance of the <see cref="TestAutoCompleteViewModel" /> class.
     /// </summary>
     public TestAutoCompleteViewModel()
     {
         var customers = new List<Customer>();
         customers.Add(new Customer("testLast1", "testFirst1"));
         customers.Add(new Customer("testLast2", "testFirst2"));
         customers.Add(new Customer("testLast3", "testFirst3"));
         customers.Add(new Customer("testLast4", "testFirst4"));
         customers.Add(new Customer("testLast5", "testFirst5"));
         customers.Add(new Customer("testLast6", "testFirst6"));
         this.Source = new ObservableCollection<Customer>(customers);
         this._testCommand = new RelayCommand(() => { }, () =>
         {
             return this.SelectedItem != null;
         });
     }
 }
Ivo
Telerik team
 answered on 30 Nov 2012
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?