Telerik Forums
UI for WinForms Forum
1 answer
413 views
I am trying to use the CurrentRowChanging event to determine when the user changes a row in the grid.  My grid is hierarchical with tabbed child views.  I have a column that is hidden on the parent row for "comments".  Instead, I have a text entry box else where in the UI that the user can type comments into for that row (parent row only).  This is working fine when I only select parent rows.  When I have expanded the child view and select a row there and then select a parent row, my code crashes.  I presume  that's because these are different tables in my data set.   Is there an easy way from the event data to determine if I have two different tables/objects?

Code snippet here:


        // This method will catch the CurrentRowChanging event in the Grid and will
        // handle updating changing the comments in the text widget for each Job.
        private void radGridView1_CurrentRowChanging(object sender, CurrentRowChangingEventArgs e)
        {
            // Check for error conditions
            if ((e.CurrentRow == null) || (e.NewRow == null))
            {
                return;
            }

            if (e.NewRow.Cells["JobName"].Value == null)
                return;

            string newJobName = (string)e.NewRow.Cells["JobName"].Value;
            string oldJobName = (string)e.CurrentRow.Cells["JobName"].Value;

            // They changed rows within the job, but did not change jobs
            if (newJobName == oldJobName)
            {
                return;
            }

            // save current text into old job
            if (radTextBox1.Text == "")
            {
                e.CurrentRow.Cells["Comments"].Value = "";
            }
            else
            {
                e.CurrentRow.Cells["Comments"].Value = radTextBox1.Text;
            }

            // put new job comments into text widget
            if (e.NewRow.Cells["Comments"].Value.ToString() == "")
            {
                radTextBox1.Text = "";
            }
            else
            {
                radTextBox1.Text = (string)e.NewRow.Cells["Comments"].Value;     <<<< ------  crashes here
            }
        }


It crashes I'm sure because Comments is not a valid column for the child table.

Any suggestions would be appreciated.

John
Svett
Telerik team
 answered on 30 Apr 2010
5 answers
202 views
Hi,

I do have a RadPanelBar in my application. It works great while I click on the "button" below to switch the content. But, may I know how can I control that programmaticaly? Example, when I click on some other button in the application, the RadPanelBar Content will change? (All the items are preloaded, I just need to show the different content from time to time, just like manually clicked on the button @ radPanelBar)

please advice.
Veselin Vasilev
Telerik team
 answered on 30 Apr 2010
2 answers
103 views
Hello!

I'm kind of new to using Telerik controls. I'm trying to add columns to a GridView. I'm trying to use the Property Builder, but the Behavior labels are truncated. Resizing the Property Builder window doesn't help.

I have a screenshot here: Screenshot

Is there anything I can do to fix this?

Thanks!

Doug
Nikolay
Telerik team
 answered on 29 Apr 2010
2 answers
191 views
im using telerik Q1 2010 and i have a radgridview with an GridViewMultiComboBoxColumn y I can not write directly to the column I have to select an item in the comnobox.

exiate a solution?

Gustavo
Top achievements
Rank 1
 answered on 29 Apr 2010
1 answer
680 views

Hello,

I need help I am trying to compare to cells value in different rows grouped within in a grid. The groups will alway contain only two rows becauase user select two selections from a combox then click on a compare button and it display the result from the first and second selected items in the combox so they can see the difference between the two. I have alreay tried summaryrows it doesn't allow for calculating different between the two, alway highlighting the cells with colors (red) will allow for easy spot of differences.

 

Any help is surely appreciated.

grid
-----------------------------------
Outter GridView
--------------------
column 1 |  column 2 | column 3 | column 4 | column 5

Inner GridViewTemplate (groupBy column 1): will always have two rows of data
------------------
Group 1
 column 1 | columns 2 | columns 3 | column 4
Name1 | 98.45 (red) | 35.33 (yellow) | comments data
Name1 | 98.47 (red) | 35.33 (yellow)  | comments data

Group 2
 column 1 | columns 2 | columns 3 | column 4
Name2 | 100.23(yellow) | 35.33 (yellow) | comments data
Name2 | 100.23 (yellow) | 35.33 (yellow)  | comments data

 

Group 1
 column 1 | columns 2 | columns 3 | column 4
Name3 | 45.21(red) | 35.33 (red) | comments data
Name3 | 46.23(red) | 35.89(red)  | comments data

If columns 2 or 3 values are different make cell red for that group else make color yellow

Jack
Telerik team
 answered on 29 Apr 2010
1 answer
146 views
Hello,

How do I create an exception for the first occurrence of a recurring event? When I use the same technique as for future occurrences, it does create a new scheduler entry, but the original one stays around instead of being removed/replaced by the exception one.

Thanks!
Jeremy
Dobry Zranchev
Telerik team
 answered on 29 Apr 2010
1 answer
305 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
191 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
153 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
169 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
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
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
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
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
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?