Telerik Forums
UI for WinForms Forum
2 answers
720 views
Hi all, 

i want to make a ProgressDialog.

User clicks on button "Delete", then ProgressDialog opens and Progress should be shown.

This is my code for the dialog class:

Public Class ProgressDialog
 
    Public Property MessstelleItems As New List(Of tblMessstelleVerzeichnisNeue)
    Public Property ZahlerItems As New List(Of tblZahler)
    Public Property MessstellenPage As MessstellenPage
    Public Property ZahlerPage As ZahlerPage
 
    Private _ctx As EnergieManagementDataContext
 
    Public Sub New(ByVal ctx As EnergieManagementDataContext)
 
        ' This call is required by the designer.
        InitializeComponent()
        _ctx = ctx
        ' Add any initialization after the InitializeComponent() call.
 
    End Sub
 
    Protected Overrides Sub OnShown(ByVal e As EventArgs)
        MyBase.OnShown(e)
        DoWork()
    End Sub
 
    Private Sub DoWork()
        RadProgressBar.Minimum = 0
 
        If MessstelleItems.Count > 0 Then
            RadProgressBar.Maximum = MessstelleItems.Count
            For Each item In MessstelleItems
 
                Dim index = MessstelleItems.IndexOf(item) + 1
                ProgressRadLabel.Text = "Lösche Messstelle " + index.ToString() + " von " + MessstelleItems.Count.ToString()
                RadProgressBar.Value1 = MessstelleItems.IndexOf(item) + 1
                Me.Refresh()
 
                Dim tmp As New List(Of tblMessstelleVerzeichnisNeue)
                tmp.Add(item)
                MessstellenPage.CurrentMeasuringPoints = (From p In _ctx.tblMessstelleVerzeichnisNeues.ToList() Join r In tmp On p.MessstelleVerzeichnisID Equals r.MessstelleVerzeichnisID Select p).Distinct().ToList()
                MessstellenPage.DeleteCurrentMeasuringPoints()
 
            Next
 
        Else
 
        End If
    End Sub
 
End Class
The deletion progress works fine. Only the Progressbar isnt displayed.

ProgressDialog is started as a modal Dialog:

Using dataContext = New EnergieManagementDataContext
    Dim dlo As New DataLoadOptions()
    dlo.LoadWith(Of tblMessstelleVerzeichnisVersion)(Function(r) r.tblMessstelleVerzeichnisZeiches)
    dlo.LoadWith(Of tblMessstelleVerzeichnisVersion)(Function(r) r.tblMessstelleVerzeichnisMessbereiches)
    dlo.LoadWith(Of tblMessstelleVerzeichnisVersion)(Function(r) r.tblMessstelleVerzeichnisStorungsbereiches)
    dlo.LoadWith(Of tblMessstelleVerzeichnisVersion)(Function(r) r.tblMessstelleVerzeichnisVersionZahlerKanals)
    dlo.LoadWith(Of tblMessstelleVerzeichnisVersion)(Function(r) r.tblMessstelleVerzeichnisVersionVerantwortliches)
    dlo.LoadWith(Of tblMessstelleVerzeichnisVersion)(Function(r) r.tblMessstelleVerzeichnisAreal)
    dlo.LoadWith(Of tblMessstelleVerzeichnisVersion)(Function(r) r.tblDokumentes)
    dlo.LoadWith(Of tblMessstelleVerzeichnisVersionZahlerKanal)(Function(r) r.tblZahlerKanal)
    dlo.LoadWith(Of tblZahlerKanal)(Function(r) r.tblZahlerVersion)
    dataContext.LoadOptions = dlo
 
    Dim progress As New ProgressDialog(dataContext)
 
    items = RadGridViewMessstellen.SelectedRows.Select(Function(c) CType(c.Tag, tblMessstelleVerzeichnisNeue)).ToList()
 
    progress.MessstellenPage = Me
    progress.MessstelleItems = items
    progress.ShowDialog()
 
End Using

No need to check DialogResult, just for blocking thread stepping out of the using block.

Any suggestions why the ProgressBar isnt updated when function runs. 
When work is completed the RadProgressBar shows the full Progress.

thx
Dimitar
Telerik team
 answered on 19 Feb 2015
3 answers
143 views
Hi,

Is there a way to get the filename of the currently opened document when the Open dialog is used from the ApplicationMenu button group? I want to display current filename in the form caption.

Also, is there anyway to force RichTextEditor to ONLY use docx files (ideally looking to remove the other buttons from the Application menu).

Regards,

Lee.
Dimitar
Telerik team
 answered on 19 Feb 2015
4 answers
378 views
Hello all, i was wondering if anybody could help me figure out how to take the current week view in the scheduler and create a pdf that's in a landscape/horizontal view of it?

Thanks all,

Phil
Hristo
Telerik team
 answered on 19 Feb 2015
1 answer
130 views
When i have about a number of item int the property grid that generate a school bar. If you scroll the scroll bar up and down, the contents of the property grid goes all wonky where the content just start to bounce and the scroll gets all mess up. It gets to the point where the property grid contents moves all the way to the top and leaves an bunch of empty space in the bottom. I have attached a screenshot of it. I need a solution for this, because i have a product that needs to ship.

Thanks,
Jerome.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Feb 2015
1 answer
139 views
Hi,

I'm using the timelineview with Timescales.Hours. I would like to set the view so that the first hour displayed in the left side would be the one that has the first appointment of the day.

How can I achieve this in the code (vb.net)?

a) I know that I can set the start date, but can I set the start hour somehow? If I know, for example, that the first appointment is at 14:15, can I set the start hour to 14:00?

b) Or can I scroll to the first appointment of the day, so that the first appointment would be displayed in the left side of the view?

I'm using Telerik UI for Winforms Q3 2014 SP1


Br,
Pirjo
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Feb 2015
2 answers
119 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
116 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
123 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
96 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
545 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
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
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
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
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?