Telerik Forums
UI for WinForms Forum
1 answer
279 views
Want to change the value of one cell based on the value of other. Here is want I'm doing.
The RadGridView (unbounded) is not displaying the the changed value. Both columns are of type GridViewComboBoxColumn.

private void trDetailsRadGridView_CellValueChanged(object sender, GridViewCellEventArgs e)
{
    if(e.Column.HeaderText == "Acc Code")
    {
        e.Row.Cells["accTitle"].Value = e.Row.Cells["accCode"].Value;
    }
}

Jack
Telerik team
 answered on 29 Apr 2010
2 answers
135 views
Hello every one..

I'm using Telerik Rad Control for winforms 2009 Q3 and Visual Studio 2008.
I developed a windows application using telerik controls. But when I try to run in my client machine...it shows an error
"Application had encountered a problem".

I had copied the exe file along with the telerik dlls to the same folder and made it run. But still the same error.

Any help wil be appreciated.

Thanks
Peter
Telerik team
 answered on 29 Apr 2010
1 answer
117 views
Hi,

I am using rad grid winform ,I could not delete the mid row of the rad grid

this is my code

  Dim cb As New OleDbCommandBuilder(da)
                Dim dt1 As DataTable = CType(RadGridView1.DataSource, DataTable)
                da.Update(dt1)
                dt.AcceptChanges()

{"Exception has been thrown by the target of an invocation."}

This error message is displayed i cant continue my work.please give me the optional answer


Julian Benkov
Telerik team
 answered on 29 Apr 2010
1 answer
137 views
How can I bound RadGridView such that it allows to edit cell contents bu do not save updates in the databse?
I want to use custom method for his purpose.
Julian Benkov
Telerik team
 answered on 29 Apr 2010
6 answers
394 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
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
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
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?