Telerik Forums
UI for WinForms Forum
3 answers
227 views

Hello,

I did all the steps in the documentation, I do not load the selected resource of the appointment, but if they are saving in the database the 3 tables

I need help, what am I doing wrong

I leave the code and attach images

 

        public radForm1()
        {
            InitializeComponent();

            AppointmentsTableAdapter appointmentsTableAdapter = new AppointmentsTableAdapter();
            appointmentsTableAdapter.Fill(testDataSet.Appointments);

            ResourcesTableAdapter resourcesTableAdapter = new ResourcesTableAdapter();
            resourcesTableAdapter.Fill(testDataSet.Resources);

            AppointmentsResourcesTableAdapter appointmentsResourcesTableAdapter = new AppointmentsResourcesTableAdapter();
            appointmentsResourcesTableAdapter.Fill(testDataSet.AppointmentsResources);

        }

  private void radButtonSave_Click(object sender, EventArgs e)
        {
            AppointmentsTableAdapter appointmentsTableAdapter = new AppointmentsTableAdapter();
            AppointmentsResourcesTableAdapter appointmentsResourcesTableAdapter = new AppointmentsResourcesTableAdapter();

            TestDataSet.AppointmentsResourcesDataTable deletedChildRecords =
                this.testDataSet.AppointmentsResources.GetChanges(DataRowState.Deleted)
                as TestDataSet.AppointmentsResourcesDataTable;

            TestDataSet.AppointmentsResourcesDataTable newChildRecords =
              this.testDataSet.AppointmentsResources.GetChanges(DataRowState.Added)
              as TestDataSet.AppointmentsResourcesDataTable;

            TestDataSet.AppointmentsResourcesDataTable modifiedChildRecords =
            this.testDataSet.AppointmentsResources.GetChanges(DataRowState.Modified)
            as TestDataSet.AppointmentsResourcesDataTable;

            try
            {
                if (deletedChildRecords != null)
                {
                    appointmentsResourcesTableAdapter.Update(deletedChildRecords);
                }
                appointmentsTableAdapter.Update(this.DataSet.Appointments);

                if (newChildRecords != null)
                {
                    appointmentsResourcesTableAdapter.Update(newChildRecords);
                }

                if (modifiedChildRecords != null)
                {
                    appointmentsResourcesTableAdapter.Update(modifiedChildRecords);
                }

                this.DataSet.AcceptChanges();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                if (deletedChildRecords != null)
                    deletedChildRecords.Dispose();

                if (newChildRecords != null)
                    newChildRecords.Dispose();

                if (modifiedChildRecords != null)
                    modifiedChildRecords.Dispose();

            }
        }

 

Emmanuel
Top achievements
Rank 1
 answered on 10 Oct 2018
16 answers
1.6K+ views
Hi,

I`m new to Telerik, so please help!

I have a GridView with several columns of different types..Two of these column types are GridViewComboBoxColumn..

The content in the GridViewComboBoxColumn cell can be unique for each row. And the content in the GridViewComboBoxColumn cell depends on another cell. 
If I change the value in one cell, I want the GridViewComboBoxColumn cell to update automaticly when the editing ends.

How can I achieve this?

Please help!
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Oct 2018
1 answer
269 views

Hello, 

I am relatively new here, and would need help with how i can set different ContextMenusStrip based on selected child template in my RadGridView.

I am using one GridView with four child templates and would want each of them to be assigned a different ContextMenuStrip to ease  the operations around the data in each template. So my barrier now is now to programatically check which template is currently selected (focused) and bind the ContextMenuStrip accordingly or at least disable some buttons in it based on desired output

 

Thanks in advance for looking into this

Jules R

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Oct 2018
5 answers
460 views

I've just updated to the latest release and am very happy with the improved PDF support over previous versions. I see there is still no support for comments, highlights or stamps though. Is there any way to enable these or will only be added in future versions. These are old PDF features so I am very surprised they are not yet included.

I have a very basic sample file demonstrating this.
Hristo
Telerik team
 answered on 10 Oct 2018
1 answer
331 views

Hello,

I'm trying to use RadTimePicker but i have a problem if a user selected a time, no way to clear the timepicker after a lot of search i found that this control has a clear button buildin, i made the button it visible and set it text once i run the application (Windows Application) it doesn't show at all.

I tried by code and by Edit UI Elements.

((Telerik.WinControls.UI.RadTextBoxElement)(RadTimePicker1.TimePickerElement.Children[2].Children[0])).ClearButton.Visibility = ElementVisibility.Visible;
((Telerik.WinControls.UI.RadTextBoxElement)(RadTimePicker1.TimePickerElement.Children[2].Children[0])).ClearButton.Text = "Clear";
((Telerik.WinControls.UI.RadTextBoxElement)(RadTimePicker1.TimePickerElement.Children[2].Children[0])).ShowClearButton = true;

 

Could you please advice.

Thank you

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Oct 2018
3 answers
214 views

Hi, 

I have a simple grid with 1 field in the master template, and one field in the child template. I want to use the load on demand, the solution works fine without await/async:

 

 

Private Async Sub RadGridView1_RowSourceNeeded(sender As Object, e As GridViewRowSourceNeededEventArgs) Handles RadGridView1.RowSourceNeeded
      'Add 3 sub rows
       Dim row1 As GridViewRowInfo = e.Template.Rows.NewRow
       row1.Cells(0).Value = "Test 1"
       e.SourceCollection.Add(row1)
 
       Dim row2 As GridViewRowInfo = e.Template.Rows.NewRow
       row2.Cells(0).Value = "Test 2"
       e.SourceCollection.Add(row2)
 
       Dim row3 As GridViewRowInfo = e.Template.Rows.NewRow
       row3.Cells(0).Value = "Test 3"
       e.SourceCollection.Add(row3)
   End Sub

 

 

However, when I use await with the event, the parent row does not auto expand, and the behavior become weird when trying to select child row there is a lot of scrolling and flickering:

 

Private Async Sub RadGridView1_RowSourceNeededAsync(sender As Object, e As GridViewRowSourceNeededEventArgs) Handles RadGridView1.RowSourceNeeded
         
'Simulate Await
        Await Task.Delay(1000)
 
        Dim row1 As GridViewRowInfo = e.Template.Rows.NewRow
        row1.Cells(0).Value = "Test 1"
        e.SourceCollection.Add(row1)
 
        Dim row2 As GridViewRowInfo = e.Template.Rows.NewRow
        row2.Cells(0).Value = "Test 2"
        e.SourceCollection.Add(row2)
 
        Dim row3 As GridViewRowInfo = e.Template.Rows.NewRow
        row3.Cells(0).Value = "Test 3"
        e.SourceCollection.Add(row3)
    End Sub

 

Many Thanks

Sameh

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 Oct 2018
1 answer
184 views

Hi, 

 

Is there any way to add new control (radbutton for instance) in the SearchRow? next to the gear button for example?

 

Many thanks

Sameh.

Hristo
Telerik team
 answered on 09 Oct 2018
4 answers
1.5K+ views

I have a WinForms Window with gridview in it And When this window opens, the following Exception appears

 

Exception: Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll ("Could not load file or assembly 'Telerik.WinControls.XmlSerializers, Version=2017.3.912.40, Culture=neutral' or one of its dependencies. The system cannot find the file specified."). Exception thrown: 'System.IO.FileNotFoundException' in mscorlib.dll ("Could not load file or assembly 'Telerik.WinControls.XmlSerializers, Version=2017.3.912.40, Culture=neutral, PublicKeyToken=a4675be94ecbc7b2' or one of its dependencies. The system cannot find the file specified.")

 

 

Whether The App is in the Debug mode or Release mode
How to solve this problem

Thank you very much in advance.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Oct 2018
1 answer
274 views

hi,

i am new in programming

i want to fill raddropdownlist manually using entity framework (DataSource,displaymember,valuemember) whats the code for that

also i want to know when i made update using linq how i pass raddropdownlist  value member to id table by where id=id whats the code i write i tried search in google but nothing found i need help please 

Hristo
Telerik team
 answered on 08 Oct 2018
1 answer
145 views

I'm using a winforms radvirtualgrid to display pages of data.

I allow the user to apply search strings and filters.

When data needs refreshing, I first run code to perform a total count of records on the database, then similar to pull a page of 100 records..

If I have several pages of data, zoom to the last page, then the correct number of pages is told to me in the paging panel.

If I then cause a search that retrieves less data then my code range checks the grid.pageindex against grid.totalpages and adjusts the page inded downwards.

But I've found that if Im viewing the final page of data, and a new search returns no data, then my range check fails and the pageindex is not changed in the display on the paging panel. i.e line 8 of the following code snip does nothing. I've also tried setting pageindex to zero (fails in the code), and turning paging on and off on the grid in the hope it refreshes.

I'm guessing it's something to do with there being no data. Is this a bug please, or can I do anything to reset the value to zero?

01.Tables = new dsUser.MemberSelectionDataTable[TotalFilteredMembers / Grid.PageSize + 1];
02.Grid.ColumnCount = _columnNames.Count;
03.Grid.RowCount = totalFilteredMembers;
04. 
05.if (Grid.PageIndex >= Grid.TotalPages)
06.  Grid.MasterViewInfo.MoveToLastPage();
07. 
08. if (totalFilteredMembers == 0)
09. {
10.    Grid.MasterViewInfo.MoveToFirstPage();
11. }

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 Oct 2018
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)
Form
Chart (obsolete as of Q1 2013)
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
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Top achievements
Rank 1
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ivory
Top achievements
Rank 1
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
YF
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?