Telerik Forums
UI for WinForms Forum
2 answers
88 views
I have 2 grids that I bind to when selecting a vendor from the drop down and click the search button(griderror.jpg shows before I click search). Before they get their data I add a command column to each grid, works with no problems. When I click the search button they both get their data with no problems and everything looks good(GridError2.jpg shows that the data properly populated). When I click the button in the command column of the first grid it does exactly what it is suppose to. If I click the command column in the 2nd grid it errors out with the original - Object reference is not set to an instance of an object. If I do not load the first grid, but just the 2nd grid it does not error out.

Private Sub rgvDocumentsPO_CommandCellClick(sender As Object, e As System.EventArgs) Handles rgvDocumentsPO.CommandCellClick
 
    Dim VendorID As Integer = ddlDocumentsVendor.SelectedValue
 
    Dim documentid As Integer = rgvDocumentsPO.CurrentRow.Cells("Document ID").Value
 
    If DataLayer.UnconfirmDocument(documentid) = True Then
 
        LoadDocuments(VendorID)
 
    Else
 
        RadMessageBox.Show("You can not unconfirm this document.")
 
    End If
 
End Sub
 
Private Sub rgvDocumentsDrawings_CommandCellClick(sender As Object, e As System.EventArgs) Handles rgvDocumentsDrawings.CommandCellClick
 
    Dim VendorID As Integer = ddlDocumentsVendor.SelectedValue
 
    'It errors out on this next line, but not the same line in the above Sub
    Dim documentid As Integer = rgvDocumentsDrawings.CurrentRow.Cells("Document ID").Value
 
    If DataLayer.UnconfirmDocument(documentid) = True Then
 
        LoadDocuments(VendorID)
 
    Else
 
        RadMessageBox.Show("You can not unconfirm this document.")
 
    End If
 
End Sub

This is the function that loads the grids

Public Sub LoadDocuments(ByVal VendorID As Integer)
 
    Try
 
        Dim CommandColumn As New GridViewCommandColumn
        CommandColumn.Name = "Unconfirm"
        CommandColumn.HeaderText = ""
        CommandColumn.DefaultText = "Unconfirm"
        CommandColumn.UseDefaultText = True
        CommandColumn.TextAlignment = ContentAlignment.MiddleCenter
 
        If rgvDocumentsDrawings.RowCount = 0 Then
 
            rgvDocumentsDrawings.Columns.Add(CommandColumn)
 
        End If
 
        If rgvDocumentsPO.RowCount = 0 Then
 
            rgvDocumentsPO.Columns.Add(CommandColumn)
 
        End If
 
    Catch ex As Exception
 
    End Try
 
    rgvDocumentsPO.DataSource = DataLayer.GetActiveDocumentsByDocTypeAndVendor(2, VendorID)
    rgvDocumentsDrawings.DataSource = DataLayer.GetActiveDocumentsByDocTypeAndVendor(3, VendorID)
 
    rgvDocumentsPO.Columns("Document ID").IsVisible = False
    rgvDocumentsDrawings.Columns("Document ID").IsVisible = False
 
    rgvDocumentsPO.Columns("Unconfirm").Width = 100
    rgvDocumentsDrawings.Columns("Unconfirm").Width = 100
 
    rgvDocumentsPO.BestFitColumns()
    rgvDocumentsDrawings.BestFitColumns()
 
End Sub
 
Any ideas on why this might be firing an error?

Thanks,
Chuck
KawaUser
Top achievements
Rank 2
 answered on 19 Dec 2011
2 answers
229 views
Good day to all

 I have an Public Area Dispaly System that usually pulls data from an access database. Now I need to make a new database which of course needs a new front-end. I know sql and tables quite well but am have never greatly worked with front-ends in access.

So since I know radtools for asp.net ajax I was wondering if it could make sense to programm the front-end with winforms.

Having never worked with WinForms it took me a good 2 hours yesterday to come figure out simple stuff.

I made a simple application with a RadMenu and when an menu item is clicked a new form gets shown. I published it to my server to check what happens if I try to install it on my windows tablet at home
- I did not have SQL Express 3.5 which was installed fast and automatically
- I got an error about TelerikContorls needed in GAC

So here come a bunch of questions

- Would it be simple to keep the whole thing in access (its not a very complicated database. Imagine a simple address database with a second table for countries)
- If WinForms would be an alertnative. Whats the best DB to be used to get the simplest installer process, user requirements if nothing is installed
- Can I use TelerikRad Tools for an application that I give away. Can I kind of embed the radControls (in web it would be a simple matter of bin folder)

Sorry for these very very basic questions.

Markus
Markus
Top achievements
Rank 2
 answered on 19 Dec 2011
1 answer
102 views
Hello, i am not sure where to put this topic but here it goes.
 in one of your recent videos i saw something about a beta feature of pedf viewing in winforms.
I wonder if is it possible in winforms.
I know you have that tool for silverlight, but if there is anyway i can make it in winforms i would apreciate your help as i urgently need it in my application.
Best regards,

Rui SIlva
Stefan
Telerik team
 answered on 19 Dec 2011
1 answer
53 views
We have an application which uses a lot of Telerik Controls, everything works fine when we run the application stand-alone.

But one of the featuers is to run the application inside a GIS (Geographic Information Systems) app and interact.

But some of the telerik controls does not work inside theese programs (Mapinfo & ArcGIS) sometimes, they are not shown. Sometimes they are shown with a white box and a red cross. And sometimes our application crash when a telerik controls i activated.

Is there any knowledge about this issue?
Jack
Telerik team
 answered on 19 Dec 2011
1 answer
81 views
I have a RadChart and have used the documentation here :http://www.telerik.com/help/winforms/chart-building-radcharts-creating-radchart-programmatically-more-complex-example.html to create what I need. However, the RadChart does not display the data, leaving only a large red X in its place. This is the constructor for my form:

public ReportPreview(CalculationResults results)
        {
            InitializeComponent();
 
            ReportChart.ChartTitle.TextBlock.Text = @"Report";
 
            ReportChart.Series.Clear();
 
            var chartSeriesA = new ChartSeries {Type = ChartSeriesType.Bezier, Name = @"Elevation"};
            chartSeriesA.Appearance.LineSeriesAppearance.Color = Color.DarkBlue;
 
            chartSeriesA.Appearance.PointMark.Dimensions.Width = 5;
            chartSeriesA.Appearance.PointMark.Dimensions.Height = 5;
            chartSeriesA.Appearance.PointMark.FillStyle.MainColor = Color.Black;
            chartSeriesA.Appearance.PointMark.Visible = true;
 
            var chartSeriesB = new ChartSeries {Type = ChartSeriesType.Bezier, Name = @"Predicted Elevation"};
            chartSeriesB.Appearance.LineSeriesAppearance.Color = Color.DarkBlue;
 
            chartSeriesB.Appearance.PointMark.Dimensions.Width = 5;
            chartSeriesB.Appearance.PointMark.Dimensions.Height = 5;
            chartSeriesB.Appearance.PointMark.FillStyle.MainColor = Color.Black;
            chartSeriesB.Appearance.PointMark.Visible = true;
 
            for (int i = 0; i < results.CurveFittingDataList.Count; i++)
            {
                chartSeriesA.AddItem(new ChartSeriesItem((double)results.CurveFittingDataList[i].AngularLoc, (double)results.CurveFittingDataList[i].Elevation));
                chartSeriesB.AddItem(new ChartSeriesItem((double)results.CurveFittingDataList[i].AngularLoc, (double)results.CurveFittingDataList[i].PredictedElevation));
            }
 
            ReportChart.Series.Add(chartSeriesA);
            ReportChart.Series.Add(chartSeriesB);
 
            ReportChart.PlotArea.XAxis.AxisLabel.TextBlock.Text = @"Location Angle";
            ReportChart.PlotArea.YAxis.AxisLabel.TextBlock.Text = @"Elevation";
 
            ReportChart.Update();
        }

No exception is thrown, no errors and the data is constructed properly. I have no idea on what to do next.
Nikolay
Telerik team
 answered on 19 Dec 2011
9 answers
754 views
How do you detect what data item a user clicks on with the mouse.
For example a user clicks on a certain piece of a pie chart or a specific bar on a barchart.  Another possible feature would be to detect the X position in a line chart while the mouse hovers over it so you could display the Y value.

John Schneider
Ales
Top achievements
Rank 1
 answered on 17 Dec 2011
1 answer
161 views
Hi Telerik

I want to replace the image displayed when ShowCloseButton is active on a document tabstripitem while maintaining its hover and pressed image behaviour.

I create the dodument window at run time and I can get the image to change to a static image using the following line

            document.TabStripItem.CloseButton.Image = Resources.GreenTickNormal22;

where "document" is typeof(DocumentWindow)

I also have added the following lines to get the image to change but these lines don't seem to be working

            document.TabStripItem.CloseButton.ImageHovered = Resources.GreenTickHover22;;
            document.TabStripItem.CloseButton.ImageClicked = Resources.GreenTickClick22;

Am I missing and event somewhere which needs to be raised?

Regards
Ian Carson
Stefan
Telerik team
 answered on 16 Dec 2011
2 answers
114 views
Hi,

I have rad grid as per my requirement I need to show the details in one to many relations. As per my finding I found that it will possible on tab wise(Side by side)

http://www.telerik.com/help/winforms/gridview-hirarchical-grid-hierarchy-of-one-to-many-relations.html.


But my requirement is one to many relations is one followed by another not side by side.


Please let us know what we need to do to get this to work.


THANKS!
Jack
Telerik team
 answered on 16 Dec 2011
1 answer
129 views
Hello,

Using a RadGridView to make operation on a datatable/dataset,

If I create or edit a record, and the click on another line, or event some times on another cell from the same line/record,

I get an exception in 'Program.cs' (the starter class generated by Visual Studio containing Main() method)
on line  Application.Run(new MyForm());
It say 'NoNullAllowedException crosser a native/manager boundary.'/'Column ... does not allow null.'

It seems that this exception can not be caught so my app crashes.
It doesn't seem to be firing the cell end edit event.

I understand this come from the dataset validation.

If the user strictly can not click out of the row while all data are not filled and valid, I think that's too restrictive.

How could I catch or manager this exception in a more user friendly way ? If possible.


Thank you for help,

Thomas
Julian Benkov
Telerik team
 answered on 16 Dec 2011
5 answers
157 views
I have the problem that, when i use the SelectedObject method from the propertygrid then will be the grid initialized again.
and the current view from the grid will be set to the default view.  for example (all open properties will be closed)

the WindowsForm PropertyGrid do this not!
how can i change this behavior?

BR
Sebastian
Ivan Petrov
Telerik team
 answered on 15 Dec 2011
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
ProgressBar
CheckedDropDownList
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
VirtualKeyboard
NavigationView
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?