Telerik Forums
UI for WinForms Forum
2 answers
191 views
Hi everyone , I have an application using telerik controls curently running in my business. Sometimes I got this message directly on the thread and I would like to know if there is an issue.
Thanks
I let follow the stack trace. ExceptionType : NullReferenceException

at Telerik.WinControls.UI.PopupManager.OnKeyDown(Int32 param)
   at Telerik.WinControls.UI.PopupManager.Telerik.WinControls.IMessageListener.PreviewMessage(Message& msg)
   at Telerik.WinControls.RadMessageFilter.NotifyGetMessageEvent(Message& msg)
   at Telerik.WinControls.RadMessageFilter.GetMessageHookProc(Int32 code, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.UnsafeNativeMethods.GetMessageW(MSG& msg, HandleRef hWnd, Int32 uMsgFilterMin, Int32 uMsgFilterMax)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(ApplicationContext context)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
Boryana
Telerik team
 answered on 22 Jul 2010
2 answers
258 views
I have a group of radiobuttons (in a groupbox) I need to know which one is toggled on when the user makes a change. The documentation offers the following code to handle the toggle state change:

 

 

private void radioBtn_ToggleStateChanged(object sender,Telerik.WinControls.UI.StateChangedEventArgs args)

 

{

 

 

    <my code here>    

 

}
I need to iterate through the radiobuttons to see which one was selected. All the event handler gives me it the toggle state. I am looking for a foreach() to do this.

Emanuel Varga
Top achievements
Rank 1
 answered on 22 Jul 2010
6 answers
1.2K+ views
Hi All,

My Problem is anchor not working as expected in dockpane.

I add a windows form, change the inheritance to the radform. Add a dockmanager and set dock = fill, and add a dockpane. Inside the dockpane add a textbox and set anchor property to top,left,right. And when i run the application, anchor not work properly.

Regards

Ahmet HOSO
Stefan
Telerik team
 answered on 22 Jul 2010
1 answer
152 views
I am using the latest release - Q2 2010.

My project used to use the Combobox control and since it will be obsolete I thought I would switch to using the new DropDownList control instead.

What I have found is that you cannot bind to the Text property on the DropDownList control like you could on a ComboBox control.

My VB code simply reads:

Textboxcontrol.Databindings.Add("text",bindingsourceobject,"fieldname")

Any reason for this ? I know I can still use the ComboBox control but I would rather use a control that is not going to be obsolete.

Many thanks


Paul.
Victor
Telerik team
 answered on 21 Jul 2010
2 answers
180 views
Default filter condition on a Filter is "Contains"
When I enter text in the filter text box, the Grid filter OK,
Now if I remove all Text, filter switches to "No Filter", an subsequent entry of text does nothing until I change to another filter again.

Also note that I can enter Text even if the Filter is on "No Filter", while as if I choose "No Filter" from the Menu, the filter Textbox is disabled an I cannot enter Text.

Regards
Erwin
Vassil Petev
Telerik team
 answered on 21 Jul 2010
1 answer
176 views
Hi,

I have a GridView control that I bind to a dataset that contains two tables.  I then create the relationship and display the hierarchy fine.  I want to control the way that new rows are added in my grid so the AllowAddNewRow for both master and child tables is set to false.  I have a custom form that creates new rows.  To simulate this, I just have a command column that inserts some hardcoded values into the grid.
The problem is that I cannot get the grid to refresh with the newly added records in the child table.  When I click the "Add" command column, a vertical scroll bar appears in the child table but I cannot see the rows.  Below is the sample code that I have.  Any ideas will be greatly appreciated.  Thanks.

Private

 

Sub frmCustomProperties_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

 

 

 

 


Dim
adpProperties As New SqlDataAdapter()

 

' ... here I populate the database with two tables named cntCustomProperties and PropertyValues

 

adpProperties.Fill(dsProperties)

 

 

 

' set the master

 

 

grdProperties.DataSource = dsProperties.Tables(

"cntCustomProperties")

 

grdProperties.MasterGridViewTemplate.AllowAddNewRow =

 

False

 

 

grdProperties.MasterGridViewTemplate.AllowDeleteRow =

False

 

 

grdProperties.MasterGridViewTemplate.AllowEditRow =

False

 

 

 

' template for values

 

 

 

Dim ValuesTemplate As Telerik.WinControls.UI.GridViewTemplate = New Telerik.WinControls.UI.GridViewTemplate

 

ValuesTemplate.DataSource = dsProperties.Tables(

 

"PropertyValues")

 

ValuesTemplate.AllowAddNewRow =

 

False

 

 

ValuesTemplate.AllowDeleteRow =

False

 

 

ValuesTemplate.AllowEditRow =

False

 

 

grdProperties.MasterGridViewTemplate.ChildGridViewTemplates.Add(ValuesTemplate)

 

' configure relation between two tables

 

 

 

Dim relation As Telerik.WinControls.UI.GridViewRelation = New Telerik.WinControls.UI.GridViewRelation(grdProperties.MasterGridViewTemplate)

 

relation.ChildTemplate = ValuesTemplate

relation.RelationName =

 

"p2v"

 

 

relation.ParentColumnNames.Add(

"PropertyId")

 

relation.ChildColumnNames.Add(

 

"PropertyId")

 

grdProperties.Relations.Add(relation)

 

 

' now configure the two templates

 

 

grdProperties.MasterGridViewTemplate.Columns(

"PropertyId").IsVisible = False

 

 

grdProperties.MasterGridViewTemplate.Columns(

"PropertyName").BestFit()

 

 

 

Dim cmdColumnAdd As New GridViewCommandColumn()

 

cmdColumnAdd.UniqueName =

 

"cmdColumnAdd"

 

 

cmdColumnAdd.UseDefaultText =

True

 

 

cmdColumnAdd.DefaultText =

"Add"

 

 

cmdColumnAdd.FieldName =

"PropertyId"

 

 

cmdColumnAdd.HeaderText =

"Add"

 

 

cmdColumnAdd.BestFit()

grdProperties.MasterGridViewTemplate.Columns.Add(cmdColumnAdd)

ValuesTemplate.Columns(

"PropertyId").IsVisible = False

 

 

ValuesTemplate.Columns(

"PropertyValueId").IsVisible = False

 

 

ValuesTemplate.Columns(

"CompanyCode").IsVisible = False

 

 

ValuesTemplate.Columns(

"EffectiveFrom").BestFit()

 

ValuesTemplate.Columns(

 

"Value").BestFit()

 

 

 

Dim cmdColumnEdit As New GridViewCommandColumn

 

cmdColumnEdit.UniqueName =

 

"cmdColumnEdit"

 

 

cmdColumnEdit.UseDefaultText =

True

 

 

cmdColumnEdit.DefaultText =

"Edit"

 

 

cmdColumnEdit.FieldName =

"PropertyValueId"

 

 

cmdColumnEdit.HeaderText =

"Edit"

 

 

cmdColumnEdit.BestFit()

ValuesTemplate.Columns.Add(cmdColumnEdit)

 

 

AddHandler grdProperties.CommandCellClick, AddressOf grdProperties_CommandCellClick

 

 

 

 

 

End Sub


 

Sub

 

grdProperties_CommandCellClick(ByVal sender As Object, ByVal e As EventArgs)

 

 

 

Dim cmdCell As GridCommandCellElement

 

cmdCell =

 

TryCast(sender, GridCommandCellElement)

 

 

 

Dim tName As String = CType(cmdCell.ViewTemplate.DataSource, DataTable).TableName

 

 

 

If tName = "cntCustomProperties" Then

 

 

 

 

 

   AddCustomProperty(cmdCell.Value)

 

 

ElseIf tName = "PropertyValues" Then

 

 

 

 

 

   '-- code for the edit here

 

End If

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

End Sub

 

 

 

 

 

 

 



Private
Sub AddCustomProperty(ByVal pid As Integer)

 

 

 


Dim
nr As DataRow = dsProperties.Tables("PropertyValues").NewRow

 

nr.BeginEdit()

nr(

 

"propertyid") = pid

 

nr(

 

"companycode") = "10"
nr(
"effectivefrom") = "1900/1/1"

 

 

 

 

 

nr(

 

"value") = "some new value here"

 

 

 

 

 

nr.EndEdit()

dsProperties.Tables(

 

"PropertyValues").Rows.Add(nr)

 

dsProperties.Tables(

 

"PropertyValues").AcceptChanges()

 

' I have tried many combinations but none seems to work.
grdProperties.GridElement.Update(GridUINotifyAction.AddRow)

 

 

'grdProperties.MasterGridViewTemplate.Update(GridUINotifyAction.BatchDataChanged)

 

 

 

 

 

 

 

'grdProperties.MasterGridViewTemplate.ChildGridViewTemplates(0).Update(GridUINotifyAction.BatchDataChanged))

 

 

 

 

 

 

 

 

End Sub

 

 

 

Jack
Telerik team
 answered on 20 Jul 2010
1 answer
161 views
Hi,

I'm using Gridview Winforms in C#

I have a Grid view with 2 level hierarchy. I want a Checkbox as the first column for both Parent and Child rows.

When the Parent Checkbox is selected, all the associated child records should be checked as well.

How to achieve this ? Please suggest me at the earliest

Thanks
Mike

Jack
Telerik team
 answered on 20 Jul 2010
1 answer
93 views

Hello everyone, my question is this.  
I have a RadCorousel control in my application.

I’d like to know if it’s possible to add other controls (like GroupBox, Grid, Charts and so on..)

If it’s possible, How can I do that?

Thank you..

Boryana
Telerik team
 answered on 20 Jul 2010
3 answers
1.4K+ views
What i want is to right click on a row of a radGridView then
rise up a contextmenustip for the user to click a button and get the current row index from the right click

How can i do this?

Martin Vasilev
Telerik team
 answered on 20 Jul 2010
1 answer
101 views

Hello everyone, my question is this.  
I have a RadCorousel control in my application.

I’d like to know if it’s possible to add other controls (like GroupBox, Grid, Charts and so on..)

If it’s possible, How can I do that?

Thank you..

Boryana
Telerik team
 answered on 20 Jul 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?