Telerik Forums
UI for WinForms Forum
2 answers
128 views
I have a simple code first database that I want to load on demand within a hierarchial grid. I have everythign working except I don't know how to cast the results within the RowSourceNeed procedure.
public class Product
    {
        public int ProductId { get; set; }
        public string Name { get; set; }
 
        public int CategoryId { get; set; }
        public virtual Category Category { get; set; }
    }
 
    public class Category
    {
        private readonly ObservableListSource<Product> _products =
                new ObservableListSource<Product>();
 
        public int CategoryId { get; set; }
        public string Name { get; set; }
        public virtual ObservableListSource<Product> Products { get { return _products; } }
    }
 
    public class ProductContext : DbContext
    {
        public DbSet<Category> Categories { get; set; }
        public DbSet<Product> Products { get; set; }
 
        public ProductContext()
            : base("my conn string")
        {
            this.Configuration.AutoDetectChangesEnabled = true;
        }


I setup the child template thusly:
this.radGridView2.RowSourceNeeded += new Telerik.WinControls.UI.GridViewRowSourceNeededEventHandler(this.radGridView2_RowSourceNeeded);
 
            GridViewTemplate childTemplate = new GridViewTemplate();
            childTemplate.HierarchyDataProvider = new GridViewEventDataProvider(childTemplate);
            childTemplate.DataSource = this.productsBindingSource;
            childTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
            radGridView2.MasterTemplate.Templates.Add(childTemplate);


Then in the radGridView2_RowSourceNeeded  event when I open the row

private void radGridView2_RowSourceNeeded(object sender, GridViewRowSourceNeededEventArgs e)
{      e.ParentRow.DataBoundItem as   ??? }

I can see when I run it that e.ParentRow.DataBoundItem is a System.Data.Entity.DynamicProxies.Category_485959... type

See attached.

and that if I could just access the.Products of it then I could iterate and add the rows.

Any ideas how to access? Thanks.







Hristo
Telerik team
 answered on 18 Feb 2015
1 answer
128 views
Hello! Sorry my English, how to get selected item description value(DescriptionText ) from ListControl?
I add so
DescriptionTextListDataItem desc = new DescriptionTextListDataItem();<br>desc.Text = DotaText;
desc.Image = LoadImage(dotid.ToString());
desc.DescriptionText = family1 +
" " + name1;
desc.ForeColor = Color.Black;
usersList.Items.Add(desc);
Stefan
Telerik team
 answered on 18 Feb 2015
5 answers
131 views
My grid is set 
AutoSizeRows = true; 

I just want my rows are a minimum: 

private void GridView_CreateRow (Object sender,
Telerik.WinControls.UI.GridViewCreateRowEventArgs e)
        {
            e.RowInfo.MinHeight = TableElement.RowHeight;
        }


This works perfectly but does not work for the group. 
So I put: 

private void GridView_CreateRow (Object sender,
Telerik.WinControls.UI.GridViewCreateRowEventArgs e)
        {
            e.RowInfo.MinHeight = TableElement.RowHeight;
  
            if (e.RowInfo.Group = null)
                e.RowInfo.Group.GroupRow.MinHeight =
TableElement.RowHeight;
        }


That is the property MinHeight Group does not work as it should (equal to 
the RowInfo.MinHeight). 

How can I solve this?

Stefan
Telerik team
 answered on 18 Feb 2015
5 answers
102 views
Hi

I'm looking to use RichTextEditorRibbonBar and RichTextEditor for some simple WP functionality in our VB.NET application. 

Is there a way of specifying the default folder for File | Open from the Ribbon bar? Can't see anywhere to set it.
Also, would any solution apply to the Save/Save As dialogs. I want to force user to start in a specific folder.

Regards,

Lee.
Stefan
Telerik team
 answered on 18 Feb 2015
10 answers
567 views
Hi,

I have created one radform and set IsMDICOntainer property = true. So that it will be changed as MDI form. Its fine.
Now i am accessing one radribbon form as child form in this. When i maximized that child form window, in menu bar, 
one more control box will be appearing , so that i can see total 3 control boxes there.
I want to remove that extra control box. When i use normal radform as child form, then no issues.
This issue with only radribbonform.

Thanks in advance.



Dimitar
Telerik team
 answered on 18 Feb 2015
1 answer
161 views
I have a RadDateTimePicker control defined as follows:

datePicker.NullText = "No date...";
datePicker.NullDate = DateTime.Parse("1900-01-01");

When I set

datePicker.NullableValue = DateTime.Today;

datePicker.Value also changes to today.

However, when I set

datePicker.NullableValue = null;

or call

datePicker.SetToNullValue();

datePicker.Value is set to "0001-01-01" regardless of what my NullDate is.

Why is Value not set to NullDate when NullableValue is set to null? How do I get rid of the garbage date, in year "0001"?
Hristo
Telerik team
 answered on 17 Feb 2015
1 answer
431 views
I have a dock with multiple Document Windows.  

I want to open multiple instances of the same form on different document windows.  Each form. although the same, needs to contain different data.

Every time I open a second instance of the form on a second document window, the first instance of the form on the first document window disappears.  The second instance contains the data from the first instance, when it should be maintaining the data from the second document window.

Is there any way to get around this?  
Dimitar
Telerik team
 answered on 17 Feb 2015
8 answers
341 views
Hi,

I set my RibbonForm TitleBar theme to "Desert" but, when i run the application, it seems to be classic windows forms title bar look and feel, even though the desert theme takes place in the Visual S. Design View.

Why does my titlebar theme is overwritten by the classic Windows forms look and feel ?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 17 Feb 2015
4 answers
204 views
Hi,

I am facing problem regarding radScheduler .
ex: I have added custom Email field in appointment dialoge, now I want to show this custom email in main radScheduler window where all appointment are listed by day view , month view etc...
Below are the attached images to show you the scenario
  
Hristo
Telerik team
 answered on 17 Feb 2015
5 answers
152 views
Hi,

I would like to control the style of a point of the RangeSelector when the AssociatedControl is a ChartView.

There's an example available how to do this on a regular ChartView (at http://www.telerik.com/forums/scatter-points-with-different-color-symbol-and-size), but I can't get this to work on a ChartView in a RangeSelector.

In have tried for example to implement an event with:
RangeSelectorViewElement rangeChartElement = ((RangeSelectorViewElement)this.radRangeSelector1.RangeSelectorElement.AssociatedElement);
rangeChartElement.LabelFormatting += this.rangeChartElement_LabelFormatting;

but it isn't being called (and I made sure ShowLabels = true).

Could you please help me?

Regards,

Peter
Dimitar
Telerik team
 answered on 16 Feb 2015
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
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
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
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?