Telerik Forums
UI for WinForms Forum
3 answers
170 views
I am executing the code below following a refresh from the database.  What I'm trying to make happen is that after a process completes to update one of the rows, the data is refreshed and the previously selected record is still selected for the user and scrolled into view.  When I execute this code following an update routine the grid is scrolled completely to the bottom, and both the record I selected and the visible row within the grid (even though it is now a different row) is selected.  If I execute it from a command button, the first record is selected and the grid is scrolled completely to the top.  What am I doing wrong?

datagridview1.DataSource = Nothing
datagridview1.DataSource = Log_Table
If Log_Table.Rows.Count > 0 Then
    ' Log_Rec = Log_Table.First
    Dim Row As Telerik.WinControls.UI.GridViewRowInfo
    For Each Row In datagridview1.Rows
 
        If Row.Cells("Rec_ID").Value = RecID Then
            Row.IsSelected = True
        Else
            Row.IsSelected
= False
        End If
    Next
 
    For Each Row In datagridview1.Rows
        If Row.IsSelected Then
  Row.EnsureVisible()
        End If
    Next
End If
Ivan Petrov
Telerik team
 answered on 01 Jul 2013
1 answer
111 views
Hi all,

I change my gridviewrow template successfully but the gridview disable selection. I need  my gridview  can enable multi selection mode.
 I use
  <ControlTemplate x:Key="CustomRowTemplate"
                         TargetType="telerik:GridViewRow">
            <Border x:Name="rowsContainer"
                    Background="Transparent"
                    
BorderThickness="0,0,0,1"
                    Padding="1">
                <Grid Width="Auto"
 HorizontalAlignment="Stretch">

                    <Grid.RowDefinitions>
                        <RowDefinition Height="20" />
                        <RowDefinition Height="20" />
                        <RowDefinition Height="20" />
                    </Grid.RowDefinitions>

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition MinWidth="150" Width="Auto" />
                        <ColumnDefinition Width="10" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <Border Grid.Column="0"
Grid.RowSpan="3"
Grid.Row="0"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
Height="60"
Width="60"
Margin="15,0"
BorderThickness="1"
CornerRadius="1"
BorderBrush="Black">

                    </Border>

                    <TextBlock Text="Device Name: "
Margin="5,0,0,0"
FontWeight="Bold"
Grid.Row="0"
Grid.Column="1"
VerticalAlignment="Center"
  HorizontalAlignment="Left" />
                    <TextBlock Text="{Binding UserName}"
  Margin="5,0,0,0"
  Grid.Row="0"
  Grid.Column="2"
  VerticalAlignment="Center"
  HorizontalAlignment="Left" />

                    <TextBlock Text="Source: "
  Margin="5,0,0,0"
  FontWeight="Bold"
  Grid.Row="1"
  Grid.Column="1"
  HorizontalAlignment="Left"
  VerticalAlignment="Center" />
                    <TextBlock Text="{Binding LastLoginDate}"
  Margin="5,0,0,0"
  Grid.Row="1"
  Grid.Column="2"
  VerticalAlignment="Center"
  HorizontalAlignment="Left" />

                </Grid>
            </Border>
        </ControlTemplate>
        <Style TargetType="telerik:GridViewRow" >
            <Setter Property="Template" Value="{StaticResource CustomRowTemplate}" />
        </Style>

to change gridivewrow template and this make my gridivew can not have selection function.

If any one have experiences in this. Please help me, thanks

Yoan
Telerik team
 answered on 01 Jul 2013
2 answers
131 views
hello,

i have a RadRibbonForm that has a skewed icon in the Form's titlebar.

i have removed and replaced dozens of times - it does not help.

i cannot start over on a new form - i have too much invested in this form already.

does anyone have any ideas of how to resolve this?  what property is set to make it behave this way?



Tops Software
Top achievements
Rank 2
 answered on 29 Jun 2013
2 answers
251 views
I want to prevent a user from using the property grid context menu to reset a value that has changed. I tried setting the IsModified property to false, but it is read-only. Is there another way to make sure the "Reset" item in the context menu is always disabled for a specific property grid item?
Paul
Top achievements
Rank 1
 answered on 28 Jun 2013
1 answer
118 views
Well, may i don't understand something in this page http://www.telerik.com/help/winforms/gridview-exporting-data-export-to-csv.html
or i have a missing dll?

Imports Telerik.WinControls.Data
Imports Telerik.WinControls.UI.Export
Imports Telerik.WinControls
Imports System.IO
 
 
 
Private Sub ToolStripButton2_Click(sender As Object, e As EventArgs) Handles ToolStripButton2.Click
        Dim exporter As ExportToCSV = New ExportToCSV(Me.RadGridView1)
 
        exporter.FileExtension = "csv"
 
        Dim camara As String = "C:\Users\FTL\Documents"
        exporter.RunExport(camara)
 
    End Sub
what I'm doing wrong?  i'll appreciate any help you can give me, thanks.

Paul
Telerik team
 answered on 28 Jun 2013
7 answers
161 views
I would like to go to the database every time a user inputs a filter and then clicks on the filter button.
So 2 things are different here.
  1. Filter does not get applied as user types in the filter, but only when user clicks on the filter button for that column.
  2. When user clicks on the filter button, then a new result set is returned from database based on filter condition. The results of this filter query will re-bind the database.

Thanks
Ivan Petrov
Telerik team
 answered on 28 Jun 2013
8 answers
226 views
Private Sub RadDateTimePickerEndDate_Opened(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadDateTimePickerEndDate.Opened
 Dim table As CalendarTableElement = TryCast(TryCast(Me.RadDateTimePickerEndDate.DateTimePickerElement.GetCurrentBehavior(), RadDateTimePickerCalendar).Calendar.CalendarElement.CalendarVisualElement.Children(0).Children(1), CalendarTableElement)
        For Each cell As CalendarCellElement In table.Children
            If cell.Date < Me.DateTimePickerEndDateMin Then
                cell.BackColor = Color.Red
            Else
                cell.BackColor = Color.Green
            End If
            If cell.[Date].DayOfWeek = DayOfWeek.Saturday Or cell.[Date].DayOfWeek = DayOfWeek.Sunday Then
                cell.BackColor = Color.Transparent
            End If
        Next
    End Sub

Hello All,
This is the code I am using to set the back ground color of the cells in the calendar control based on the min date.
1)I open the calendar  the back color for all the dates less than the min date is showing up as red. Let us assume the min date is 6/12/2000
Now when I go to next month(i.e., 7/12/2000) the back color for all the cells in that month is supposed to be green. But this is not the case. Whats happening is that some of the Cells color is still Red and the others are green. But if i reopen the Calendar all the dates show up as Green. Now if I go back to 6/12/2000 all the dates including dates less than 12 th of June are showing up as Green too.
Is there any other event in which this code needs to be executed when i change the month using the arrow on the top of raddatepicker. I am using raddatetimepicker for winforms. Q3 2010 version. I do not see a viewchanged event here. Any help would be appreciated.

Thanks a lot.
Stefan
Telerik team
 answered on 28 Jun 2013
2 answers
201 views
Hello,

I would like to disable the ContextMenu popup fade-in animation for a RadDock, but I cannot find where to do this.

I know how to disable the contextmenu animation for a RadGrid, for example, by subscribing to the grid's ContextMenuOpening event and using e.ContextMenu.AnimationEnabled = false; when the event fires.

However, the RadDock context menus are handled by the ContextMenuService, which only has the ContextMenuDisplaying event, and in this events handler, there is not a reference to the actual context menu object, just a list of the menuitems and the upcoming display position.

I know that ThemeResolutionService.AllowAnimations = false; will accomplish this, but this will also disable all animations across the application, which I do not want to do. I just want to disable the ContextMenu fade-in animation.

Any advice on how to do this?

Thanks,


Michelle
Michelle
Top achievements
Rank 1
 answered on 28 Jun 2013
3 answers
974 views
Error:  Cannot access a disposed object. Object name: 'GridViewSynchronizationService'.

Scenario: This error only appears to happen when I'm utilizing an EventLogEntryCollection as the datasource and refreshing the datasource via a timer event. The form is a simple event log monitor.

The error occurs randomly on either of these lines (this is from within a custom control):

this.dgResults.DataSource = null;
this.dgResults.DataSource = this.DataCache;

The above DataCache object is a dynamic property that is populated by the code below.

EventLog e = new EventLog(EDI.Definitions.EVENT_LOG, ConfigurationManager.AppSettings["EventLogServerName"]);
this.dgResults.DataSource = e.Entries;

The above snippet is from a form that is consuming the custom datagrid control (so the dgResults object is distinguishable for anyone reading).

I can't recreate the issue as it just randomly appears from time to time.

Hopefully this is a known issue of some type and there is an easy fix.  I saw that clearing the relations might work, but that doesn't seem to be working for me.

Ideas anyone?  Thanks in advance! Let me know if more is required.

Peter
Telerik team
 answered on 27 Jun 2013
1 answer
84 views
Hello, I have a question. How can I edit themes. Radcontrols already come with a few themes but none I really like, so I want to make my own how can I edit the themes and add them just like a regular theme for me to use every time?
George
Telerik team
 answered on 27 Jun 2013
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Barcode
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TimeSpanPicker
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?