Telerik Forums
UI for WinForms Forum
1 answer
258 views
I use Telerik Version=2011.3.11.1219 and try use TreeView control with TriStateMode.

Question 1: Also I want to prevent checking node due some conditions - for example, if node.ImageKey ="class_grey" (some picture from imagelist container).

Private Sub RadTreeView1_NodeCheckedChanging(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.RadTreeViewCancelEventArgs) Handles RadTreeView1.NodeCheckedChanging
  If Not e.Node.Checked AndAlso e.Node.ImageKey = "class_grey" Then
    e.Cancel = True
  End If
End Sub

If I make that tree:
 
and try to check node "Node1" - I get this situation:


But it is obviously wrong! Nodes "Node1" and "Node8" have wrong state mode ("On" instead of "Indeterminate")
It should be like that (which I got if uncheck/check node "Node9"):


How can I fix that?

Question 2: How can I change view of checkbox in TriState mode? For example, I would like to change view for "Indeterminate" mode from filled green box to red tick.
Svett
Telerik team
 answered on 21 May 2012
1 answer
138 views
Hi there -

I'm new to Entity Framework and still working my way through the gridview control.  I'm not sure where to put this question, so I figured I would start here.

I have an entity framework (EF) with a header-detail model.  When I perform the linq query with an include, I want to display the sub entities (the details) in the grid.  Would be even nicer if I group group by the details (all in one grid).

So my questions may be, how do I write/use the linq query to bring back the headers and group the details within the same grid.  Here is what I have so far:
Private Sub loadLotDetails(PO_Number As String)
    Dim query = From l In context.Lot_Header.Include("Lot_Detail")
                Where l.Lot_Number = PO_Number And l.Lot_Process_Status <> "90"
                Select l
 
    lotDetailsGridView.DataSource = query
End Sub

I appreciate any information or direction possible.

Thanks
Bob



Julian Benkov
Telerik team
 answered on 21 May 2012
4 answers
579 views
OK - So I'm still new to all this EF and Telerik stuff.  However after doing research I'm sure it's not a Telerik control issue.  In any case, I thought I would start here for help.
I have a simple Entity relationship (Lot_head and Lot_Detail)

When I execut the following code:
Private Sub btnSearchPO_Click(sender As System.Object, e As System.EventArgs) Handles btnSearchPO.Click
 
    LotDetailsDataGrid.DataSource = getLotDetails(PurchaseOrderTextBox.Text)
 
End Sub
 
Private Function getLotDetails(lotNumber As Integer) As List(Of Lot_Detail)
    Using context As New Three_Way_MatchEntities
        Dim lot = (From ld In context.Lot_Detail
        Where (ld.Lot_Number = lotNumber)
                  Select ld).ToList
 
        Return lot
    End Using
End Function

The grid populates the data correctly, however when I scroll to the end of a row, it throws the "The ObjectContext instance has been disposed and can no longer be used for operations that require a connection." exception.

Now I understand that since I am using lazing loading and using the 'Using' statement, the context has been disposed.  I'm also assuming that the datagrid must rely on having that context left open.  As many have mentioned you should keep the context open for only as long as you need it.  If that's the case, how would you write this example?

Thanks for the help!
Bob
Julian Benkov
Telerik team
 answered on 21 May 2012
2 answers
249 views

Hi there,

I am writing to you to understand if you could help me as to the following.

 

Currently I am developing an application and I am exploiting RAD WinControls in C#.

In one form I have a few text boxes with the TextBoxElement.Shape set to RoundRect.

 

I would need to do the same in a couple of dropdown lists and in one datetime picker.

Therefore I am trying to set the related properties in the same way:

e.g. ddlDropDown.DropDownListElement.Shape = new Telerik.WinControls.RoundRectShape();

 

Yet in this case the displayed items show some white angles (see attachment)

 

Would you please help me to understand how to fix that, i.e. how to delete or hide the white angles?

 

Thanks in advance for your kind collaboration

Best regards

 

Davide

Davide
Top achievements
Rank 1
 answered on 18 May 2012
1 answer
173 views
Is there any way to get the RadLabel size when it is created via runtime?

I am trying to calculate the height of a container control by summing the height properties of the controls added to the container.

When create a new object instance of a RadLabel in code such as this:

Dim p_Label as New RadLabel

 . .  the width and height properties are set to 0 and remain at zero even after setting the text property.

I was looking for some type of Resize method that could be called after setting the .Text and .Font property, but have been unable to find such a way to cause the control to recalculate its size.

A point of clarification: after adding the RadLabel to a container the height property is always 1, which is not really the case.
Stefan
Telerik team
 answered on 17 May 2012
1 answer
136 views
I see the next and previous buttons on left side of RadRotator during design-time, but not at runtime.  How do I display these buttons?
Stefan
Telerik team
 answered on 17 May 2012
12 answers
490 views
Hi Dear,

Please tell me what i did wrong?

I just drag rad calender into rad tab control and assign culture = "Arabic Saudi arabia"

I am not able to assign
I am getting below message
(Valid values are between 1318 and 1450, inclusive.
Parameter name: year
)

your immediate reply will be appreciated

Thanks & Regards,

Peter
Telerik team
 answered on 17 May 2012
1 answer
278 views

Has anyone managed to sort a listview by a date rather than having the column taken to be a string?

I can't see a date specific entry so i'm currently using

ShareMessageListView.Columns.Add(new Telerik.WinControls.UI.ListViewDetailColumn("Date"));

This may be my problem.
Ivan Todorov
Telerik team
 answered on 17 May 2012
3 answers
112 views
Is it possible under Auto Hierarchy, to make a child expanded? Don't like press +

found by myself:

            radgridview1.Rows[0].IsExpanded = true;

Vincent
Top achievements
Rank 1
 answered on 17 May 2012
5 answers
329 views
I need to show a multi-column list within a gridview cell (read-only). I've read the documentation on creating custom cells but can't figure out which element to use in my custom cell. If anyone has any sample code or could simply advise which RadElement to use, I would really appreciate it.
Richard Slade
Top achievements
Rank 2
 answered on 17 May 2012
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
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
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?