Telerik Forums
UI for WinForms Forum
6 answers
149 views

Hi,

I'm having some trouble trying to insert my gridview data into a table using store procedure.

Here's the scenario:

I have a dataset1 with a query that selects about 20 columns from left outer joins 3 views (lets call them A, B, C views) and 1 table (D table). 

I created a gridview that fills the gridview that the dataset... of the 20 columns 3 are hidden.

On this D table, I have one column that the cells are empty.  This is where we need to enter the data during runtime.

I created a store procedure that will insert 5 columns from the dataset (3 of the hidden columns, 1 visible, and 1 column where we need to enter the value during runtime) using parameters

On my dataset1 configuration, I added a query that will execute the store procedure (lets call it InsertPIWidthTable, which is D table)

 

Problem:

I got my gridview to populate the data, but can't seem to get what I entered in the cell to store in my D Table.  It says there is no argument given that correspond to the required parameter, but I have all the parameter names correct... So I stuck. Help?

I attached screenshots of everything.  Thank you!

 

This is my code:

private void radGridView1_CellValueChanged(object sender, GridViewCellEventArgs e)
        {
            IEditableObject editableObject = e.Row.DataBoundItem as IEditableObject;
            if (editableObject != null)
            {
                editableObject.EndEdit();
            }
            DataRowView dataRowView = e.Row.DataBoundItem as DataRowView;
            if (dataRowView != null)
            {     

                   this.vW_ProdPrintPageTableAdapter.InsertPIWidthTable();
            }

Dimitar
Telerik team
 answered on 25 Jun 2019
1 answer
1.1K+ views

Regards!

I'm trying adjust an columns of my GridView, but I don't know why it not change.

I Want adjust the first column with AutoResize Fill, and de remain cells with BestFit:

                LoadGrid();
                InitializeTemplate();
                
                foreach (var Column in rgvHorasProveedores.MasterTemplate.Columns)
                {
                    if (Column.Name != "Equipo") //Distinct to first column
                    {
                        if(Column.AllowResize == true)
                        Column.AllowResize = false;
                    }
                }


                //rgvHorasProveedores.Templates[0].BestFitColumns();
                foreach (var Column in rgvHorasProveedores.Templates[0].Columns)
                {
                    if (Column.Name != "Equipo")
                    {
                        
                        Column.AllowResize = false;
                    }
                }
                rgvHorasProveedores.Templates[0].AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
                rgvHorasProveedores.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

The level 2 (second template)it does not change and when reload thr grid, it lost the format.

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Jun 2019
10 answers
793 views
This is the first time that I write, sorry my english. Well, the problem that I have is that I don't know how to the packages that I generate with the Visual Style builder, I know load them in *.xml format, but I would like to that as package. I tried all that I could find in Google or in the Telerik's tutorials, but nothing works for me, if you could explain the most possible I'll be glad you.
Johnson
Top achievements
Rank 1
 answered on 25 Jun 2019
2 answers
309 views

I have a dropdownList that has the following:

DataSource: binds to a table with 2 columns (ID, Style)

DisplayMember: Is Set to "Style"

ValueMember: Is Set to "Style"

 

I have a binding source which binds to an model. One of its properties, "PartitionStyle" is a string value.

I set the dropdownList DataBinding.Text: BindingSource.PartitionStyle (Note, I did also try DataBinding.SelectedValue as well)

Now when I choose a value from the drop down list, the "PartitionStyle" property updates to that value which is great. So I save that model and close the form down. Now when I relaunch the form passing in that model to the bindingsource, the display or text of that dropdownlist does not have the correct value(has the index 0 value selected).

I've tried setting BindingSource.DataSource to that model, then BindingSource.ResetBindings, it doesn't work. All the rest of the controls that are NOT dropdownList are displaying correctly(textboxes have the correct values from the properties they are binded to, checkboxes as well).

Any help?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Jun 2019
3 answers
508 views

Hello
Have problem with negative sign in grid with right-to-left =true

the negative numeric values are displayed like:
10-
20-
300-
instead of:
-10
-20
-300

I use decimal Column

Nadya | Tech Support Engineer
Telerik team
 answered on 25 Jun 2019
1 answer
195 views

I am looking for a way to put a arrow head on a line (Draw Shape).

Is there a way to do this, if not can I suggest it for a future release?

Dimitar
Telerik team
 answered on 24 Jun 2019
2 answers
125 views

Hello,

 

How can I filter enum from unwished values.

public enum StudentType
{
None,
Commercial,
Free,
Partial
}
 
public class Student
    {
        public Student()
        {
        }
 
        public StudentType StudentType { get; set; }   

 

///

}

 

I want to see in the DataEntry list only filtered values, ex. Commercial and Free.  

Emin
Top achievements
Rank 1
 answered on 24 Jun 2019
1 answer
105 views

Hi,

  In RadDateTimePicker the dd/MM/yyyy is not moving as individually but changing on whole. After entering the year it should not go back to date. Video link mentioned below with the issue & how we need it. Please check & share your inputs.

 

Issue Video link : https://suganya-gmail.tinytake.com/tt/MzU5ODI1Ml8xMDg3NTE3NQ

How we need it, Video link : https://suganya-gmail.tinytake.com/tt/MzU5ODI2MF8xMDg3NTE4NA

 

Dimitar
Telerik team
 answered on 24 Jun 2019
2 answers
328 views

 Grid position is not proper after reload the data. Winforms radgridview we are using.

Grid is having huge data with headers and child grids (Nested grid).

The issue is related to grid position after data save.

User will expand the grid including header ,child and do some edits and save the records.

After save the grid position we are trying to set from code. As a part of the save function grid data will be reloaded and then we are expanding the headers and child grid same as how the user kept.

Below two properties are not consistent before save and after data reload.

 rdGrid.VerticalScroll.Maximum
 rdGrid.VerticalScroll.Minimum

Other than setting these properties how we can set the grid position.  Thanks in Advance

 

 int position = vScroll.Maximum ;
 bool isMaxValue = position == vScroll.Maximum - vScroll.LargeChange + 1;

     if (isMaxValue)
                            {
                                position = vScroll.Maximum - vScroll.LargeChange + 1;
                            }
                            rdGrid.TableElement.VScrollBar.Value = position;

 

Dimitar
Telerik team
 answered on 24 Jun 2019
1 answer
153 views

In your example when you maximize the window, it does not stay fullscreen, but rather before the Windows Taskbar. how to do this?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Jun 2019
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
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
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
FilterView
Accessibility
NavigationView
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?