Telerik Forums
UI for WinForms Forum
6 answers
395 views
Hi, I've been working with Telerik controls for about 6 months.

I am having an issue where I have a RadGridView with a GridViewComboBoxColumn.  The GridViewComboBoxColumn is populated with a list of companies and the RadGridView is populated with a list of employees. 

If an employee has just been created in the system, they have default "N/A" company assigned to them until it is assigned to them using the RadGridView employees screen I am creating.  So I can have a RadGridView with 500 rows of employees and each has an "N/A" Company assigned to them. 

The issue I am having is, when I am editing the employees in the RadGridView with the GridViewComboBoxColumn, when I select a company for one employee, ALL the other rows that have "N/A" company assigned to them change to that combo box selection as well.

 peopleCardEntryGrid.MasterGridViewTemplate.AutoGenerateColumns = false
            peopleCardEntryGrid.MasterGridViewTemplate.AllowAddNewRow = false
            peopleCardEntryGrid.MasterGridViewTemplate.AllowDeleteRow = false
            peopleCardEntryGrid.MasterGridViewTemplate.AllowEditRow = true
            peopleCardEntryGrid.MasterGridViewTemplate.AllowAutoSizeColumns = true
            peopleCardEntryGrid.EnableGrouping = false
            peopleCardEntryGrid.CellValueChanged += peopleCardEntryGrid_CellValueChanged; 
 
GridViewComboBoxColumn companydLookUpColumn = new GridViewComboBoxColumn 
                                                              { 
                                                                  FieldName = "EMPLOYEE.COMP.Id"
                                                                  ValueMember = "Id"
                                                                  DisplayMember = "CompanyName"
                                                                  HeaderText = "Company"
                                                                  DataSource = _job.LoadCompanies() 
                                                              }; 
 
peopleCardEntryGrid.MasterGridViewTemplate.Columns.Add(companydLookUpColumn); 
 
IList<EMPLOYEE> employees = _job.GetEmployeeList(); 
 
IBindingList boundEmployees = new BindingList<EMPLOYEE>(employees); 
 
peopleCardEntryDataGrid.DataSource = boundEmployees; 

The above code shows that COMP is a company object that belongs to the EMPLOYEE Object.  The field name is the Id property of the Company.   "_job" is just a class that Populates and IList<T> of objects from the database and returns them to the form.

So if the employee had a default "N/A" company assigned to them the COMP.Id value would be 111.  So all new employees without a company, will actually have a default company assigned to them and that will be company Id 111, and CompanyName of "N/A".

I am attaching two screen shots of the grid which I hope will help explain the problem a little better.  This is kind of a difficult question to explain.

Thanks.



Martin Vasilev
Telerik team
 answered on 29 Apr 2010
1 answer
177 views
Hello Telerik Team,

I'm using 2010.1 409 Winform Telerik library on both VStudio 2005 and VStudio 2008.

I'm trying to implement a (rad)gridview in Virtual Mode using more than 150000 records/table.

Moving across the first 1000 records is very flawless.
Instead, if I try to scroll to the last records, the grid significantly slow down.

The following code should reproduce the problem:
        public Form1() 
        { 
            InitializeComponent(); 
            this.radGridView1.EnableSorting = false
            this.radGridView1.EnableFiltering = false
            this.radGridView1.EnableGrouping = false
 
            this.radGridView1.Dock = DockStyle.Fill; 
            this.radGridView1.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill; 
            this.radGridView1.CellValueNeeded += new GridViewCellValueEventHandler(radGridView1_CellValueNeeded); 
            this.radGridView1.CellValuePushed += new GridViewCellValueEventHandler(radGridView1_CellValuePushed); 
            radGridView1.VirtualMode = true
            radGridView1.ColumnCount = 10
            //// Increase RowCount --> increase memory usage: why??
            this.radGridView1.RowCount = 150000
        } 
 
        void radGridView1_CellValuePushed(object sender, GridViewCellValueEventArgs e) 
        { 
        } 
        void radGridView1_CellValueNeeded(object sender, GridViewCellValueEventArgs e) 
        { 
            e.Value = e.RowIndex + e.ColumnIndex; 
        } 

The standard C# DataGridView, with the same code, works without any problem.

Thanks in advance.

Carlo
Julian Benkov
Telerik team
 answered on 29 Apr 2010
1 answer
137 views
I'm using RadGridView in unbound mode. I've added a GridViewComboBoxColumn (bounded) at design time.
Now I want to fill that grid with the data from a database table. I'm using the RadGridView.Rows.AddNew()  
method. When I try to set the value of this column using RadGridView.Rows[index].value i generate an exception
objec reference not set. What is the solution o tthis problem?
Julian Benkov
Telerik team
 answered on 29 Apr 2010
1 answer
679 views

The previous value of the column is 3000 then after I changed it to 3 then CellValueChanged is fired but then the string quantity does not return 3 but instead 3000. I will be using the new value to update the record on the database.

        private void radGridView1_CellValueChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e) 
        { 
            String quantity = radGridView1.Rows[e.RowIndex].Cells[3].Value.ToString(); 
            String dbidx = radGridView1.Rows[e.RowIndex].Cells[4].Value.ToString(); 
            String itemcode = radGridView1.Rows[e.RowIndex].Cells[0].Value.ToString(); 
            var query = (from p in db.TB_ITEMs 
                         where p.ITEM_DBIDX == Convert.ToInt32(dbidx) 
                         select p).Single(); 
            query.ITEM_DURABILITY = Convert.ToInt32(quantity); 
            if (!String.IsNullOrEmpty(itemcode)) 
                query.ITEM_IDX = Convert.ToInt32(itemcode); 
            db.SubmitChanges(); 
        } 


The datasource comes from a result of a LINQ query, I need to update at database level using this event. If I am not using the right event please direct me to the right event. This event fires up after editing the field and clicking outside the field BUT it does not return the new value but the old value. Please tell me if you need more information, this is kind of urgent.

After clicking outside the cell the value reverts to the old value hence the CellValueChanged event gets the old value. What should I do to commit the new value to the Grid Row and to retrieve the new value for database updating?

Language: C#
Telerik Version: 2010.1.10.308
.NET: 3.5

Need Help,
Aivan


Svett
Telerik team
 answered on 29 Apr 2010
4 answers
237 views
Our WinForms application loads some assemblies into the Load and LoadFrom contexts. Some RadButtons are used by assemblies in each group, so we also load Telerik.WinControls.dll into both contexts.  However when we do this, some machines receive an error when opening the main form.  It appears that a telerik library is popping the dialog with the following text:

Visual Studio is attempting to load class instances from a different assembly than the original used to create your components.  This will result in failure to load your designed component.  More information that will help you to correct the problem.

Component Assembly:
D:\Documents and Settings\09006318\Local Settings\Application Data\Test App\Assemblies\Telerik.WinControls.dll

Designer Assembly:
C:\Program Files\Test App\Telerik.WinControls.dll

Please Close Visual Studio, remove the errant assembly and try loading your designer again.

Ensure that you do not attempt to save any designer that opens with errors, as this can result in loss of work.  Note that you may receive this message multiple times, once for each component instance in your designer.


Of course Visual Studio is not installed on any of the machines with this problem.  If we only load the Telerik libraries into the Load context, the error disappears.  What is causing this error?

Nikolay
Telerik team
 answered on 29 Apr 2010
4 answers
139 views
How do you modify the contents of the context menu in the bottome right corner of the radpanelbar?  I want to remove the Nav pane option item but I cannot figure out where to modify the items for that menu.
Nikolay
Telerik team
 answered on 29 Apr 2010
0 answers
181 views
Hi ,

am using masked edit box in Telerik winforms for date , i have set masked type=standard, mask=00/00/0000,  it allows user to enter the date .working fine but i need to validate the controls  like if the user typed wrong date format i want show some msg box to indicate,,, if they have not entered any thing on it, we dont bother about that ....this is the criteria, i have tried by  setting type=datetime  but it not works...... is  there any way for validating this particular control... review me

thanks.
dev
deva subramanian
Top achievements
Rank 1
 asked on 29 Apr 2010
3 answers
942 views
Is there a way to control the border of the radgridview itself?  I want to have a thicker border around the control.

Thank You
Basel Nimer
Top achievements
Rank 2
 answered on 29 Apr 2010
1 answer
144 views
Hello guys, I am working for a client who is using Q2 2009 (i believe).

I have coded this program up, and it works great on their dev machine.

Another coder also can load it / view it perfectly.

Dev Machine 1: XP Pro 64bit.
Dev Machine 2: Vista Home Premium

We were getting ready to release, and tested the script on a fresh install of Vista & Windows 7. Both have .NET 4 installed.

The application is a 3 part program. Parts 1 and 2 are not using any telerik controls. They load fine.

The 3rd crashed as soon as it was ran.

When running the exe itself, we receive:

Description:
  Stopped working

Problem signature:
  Problem Event Name: CLR20r3
  Problem Signature 01: mainprogram.exe
  Problem Signature 02: 1.0.0.0
  Problem Signature 03: 4bc63d9e
  Problem Signature 04: MAINPROGRAM
  Problem Signature 05: 1.0.0.0
  Problem Signature 06: 4bc63d9e
  Problem Signature 07: 12
  Problem Signature 08: e0
  Problem Signature 09: System.InvalidOperationException
  OS Version: 6.1.7600.2.0.0.256.1
  Locale ID: 1033

so, after hours of research as to why it would be doing that...no dice.

Finally, I decide to run the click once installer.

and I receive:

Unable to install or run the application. The application requires that assembly Telerik.WinControls.Themes.Aqua Version 2009.2.9.701 be installed in the global assembly cache (GAC) first.

Note, in the Reference name, I have copy local set to true.

In this list I have: Telerik.WinControls, Telerik.WinControls.GridView/RadChart/Themes.Aqua/Themes.Office2007Black/UI

all of which are set to copy local.

All are version 2009.2.9.701.

Any help in the matter would be fantastic, thanks guys.


Martin Vasilev
Telerik team
 answered on 28 Apr 2010
5 answers
435 views
Hello
I created a form user the Rad WinForms toolbox in visual studio and now i like to apply the aqua theme to the entire application without assigning the aqua theme to each form. 

I notice that i need to add this code at the begining of my code 
ThemeResolutionService.ApplicationThemeName = "aqua"

so when i did add this line of code it does not work. In fact, this parcel of the code ThemeResolutionService will have a a curly black line under it. More over, i have dragged and dropped the aqua theme from the toolbox on to my application!!!


I am using vb.net

what should i do to apply the theme to the entire application???


thanks  
Martin Vasilev
Telerik team
 answered on 28 Apr 2010
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
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?