Telerik Forums
UI for WinForms Forum
3 answers
153 views

Hi all,

When inserting a row everything goes okay.
But when I delete that same row again using the radgridview contextmenu option Delete Row

Then the debugger shows the following error massage:
'System.Data.DBConcurrencyException: 'Concurrency violation: the DeleteCommand affected 0 of the expected 1 records.''

My code is below.

What am I doing wrong?

Chris.

 public partial class mainForm : Form
    {

        public static OleDbConnection con3 = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source = " + Application.StartupPath + "\\parts.accdb");
        public static DataTable dt = new DataTable();
        public OleDbDataAdapter adapter;
        public OleDbCommandBuilder commandbuider;
        public mainForm()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            string SQL = "SELECT * from supplier";
            adapter = new OleDbDataAdapter(SQL, con3);
            commandbuider = new OleDbCommandBuilder(adapter);

            adapter.Fill(dt);

            PartsGrid.DataSource = dt;

            PartsGrid.RowsChanged  += new GridViewCollectionChangedEventHandler(PartsGrid_Update);

        }

        private void PartsGrid_Update(object sender, GridViewCollectionChangedEventArgs e)
        {
            if (adapter.Update(dt) > 0)
            {
                MessageBox.Show("done");
            }
        }
    }

 

Chris
Top achievements
Rank 2
Iron
 answered on 04 Oct 2022
1 answer
127 views

I use Telerik.WinControls.UI.RadChartView

I try to use RadChartView for show graphical lines. I have prepared series of ScatterLineSeries and upload its to RadChartView.Series. First page can show successfully. Unfortunately I can not show next page. I setting break after uploading data to RadChartView. Visual Studio mark by red color any changes (differences) in RadChartView properties and data.

I can see only small changes in data value and no more.

So, data for showing on second page is similar to data on the first page. However RadChartView show absolutely empty page.

Can anybody advice for me, what checklist I can pass to understand why second page is clear blank page?

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 04 Oct 2022
1 answer
146 views

Easy to reproduce.

Unzip attached. I've only included the project as the zipped solution with its lib was too big to upload.

In function that's located in a RadForm

void DoSomething(Form form)
{
  MessageBox.Show(form.FormBorderStyle.ToString());

  MessageBox.Show(this.FormBorderStyle.ToString());

}

It returns "none" if form is a RadForm. The 2nd messagebox shows "sizeable" as this is a radform.

I wondered why it's doing this if a RadForm is a descendent.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 Oct 2022
1 answer
673 views
Hello good day,
Help me with this I know it's something simple but I can't find it.
how to print automatically without showing the report viewer a telerik report made in vb.net

the report has a parameter and I would like it to be printed automatically
Justin
Telerik team
 answered on 30 Sep 2022
0 answers
162 views
Hello good day,
Help me with this I know it's something simple but I can't find it.
how to print automatically without showing the report viewer a telerik report made in vb.net

the report has a parameter and I would like it to be printed automatically
Hector
Top achievements
Rank 1
 asked on 29 Sep 2022
2 answers
138 views

Hello,
In RadGridView, I set the column to GridViewDateTimeColumn.
I want to change the date display format to short.
Code below.

Public Class RadForm5
    Private Sub RadForm5_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Dim listTest As New List(Of TestDate)
        listTest.Add(New TestDate With {.Name = "John", .DateStart = New Date(2022, 5, 1)})
        listTest.Add(New TestDate With {.Name = "Arya", .DateStart = New Date(2022, 5, 2)})
        listTest.Add(New TestDate With {.Name = "Brandon", .DateStart = New Date(2022, 5, 3)})
        listTest.Add(New TestDate With {.Name = "Catelyn", .DateStart = New Date(2022, 5, 4)})

        For Each col In RadGridView1.Columns
            If col.Name = "colDate" Then
                col.FieldName = "DateStart"
                Dim colDate As GridViewDateTimeColumn = TryCast(col, GridViewDateTimeColumn)
                colDate.Format = DateTimePickerFormat.Short
            End If
        Next

        RadGridView1.DataSource = listTest
    End Sub
End Class

Public Class TestDate
    Public Property Name As String
    Public Property DateStart As Date
    Public Sub New()

    End Sub
End Class


Unfortunately, setting the display format does not work properly.
I have to add more fields in object every time

   Public ReadOnly Property DateStartStr As String
        Get
            Return DateStart.ToShortDateString
        End Get
    End Property

And

col.FieldName = "DateStartStr"

Is there another way to do this?

 

Regards

Jack

Jacek
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 29 Sep 2022
1 answer
184 views

Hello all.

Does anyone know how to fix this?  Please see image #1

That's just a small section of the Toolbox - every Telerik Control has multiple entries.

Each duplicate points to the same Library.

Each tool has the identical Version as its Duplicate.

I have uninstalled, reinstalled a few times.  Does not fix it.

Telerik Toolbox Configurator does not fix it.

Help/Advice would be appreciated!

 

Thanks all :)

-c

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 29 Sep 2022
1 answer
220 views

So, this is weird and I'm sure my fault, but I'm having a problem.

This is an unbound grid.

I have 26 rows that should be added to the grid.  So I iterate through all of the rows to add them to the grid, all appears well.  Checking the row count, there are 26 rows. But when viewing the grid, there are only 24 rows displayed.  The last two rows that should be there, do not appear.

However, if I enable the default row filtering and filter on one of the missing rows, I can find them and they are displayed as expected.

Pagination is disabled (I enabled it just to see if they were appearing on the next page, they are not).

There are no filters applied to this grid (except as the above test with the default filter row displayed)

I have no idea what I'm doing wrong, so any help to point me in the right direction would be great.

Again, to be clear, its not a data problem, the rows are there in the grid.  Its a display problem.

Thanks for any suggestions!

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Sep 2022
1 answer
227 views

Hi. 

 

I have images on the screen for the DB and when I select one, I need the app to simulate a "Next" Click

 

code:

            txt_db.Text = "MSSQL";

            frm_generator_database_connection_step02_mssql frm = new frm_generator_database_connection_step02_mssql() { Dock = DockStyle.Fill, TopLevel = false, TopMost = true };
            frm.FormBorderStyle = (FormBorderStyle);
            pContainer.Controls.Clear();
            pContainer.Controls.Add(frm);
            frm.Show();

 

 

Regards

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 27 Sep 2022
1 answer
497 views

Hello,

I am trying to develop an option to work with employees and their shifts. Locations and their opening times indicate the possible working hours. In an overview I pass the location in a ComboBox, in the individual, the employee as a parameter. It would be beneficial to have a possibility to add a location to the appointment dialog to be able to dynamically query with EF. Has anyone here already gained experience?

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