Telerik Forums
UI for WinForms Forum
2 answers
716 views
I am attempting to add an image to the gridview command column programmatically depending on certain conditions. I can add an image through the property builder for all the rows, but how do I do this with code?
Mark
Top achievements
Rank 1
 answered on 01 Dec 2015
1 answer
332 views

Hi,

Is it possible to add a floating window to RadDock without docking the form as first step. I am using the following code:

      Dim h As HostWindow = RadDock.DockControl(New MyForm(), DockPosition.Fill, DockType.Document)

      h.DefaultFloatingSize = New Size(800, 600)
      h.DockState = DockState.Floating

      h.Select()

The problem is, that this causes a lot of flickering and rearranging of the existing docked windows.

When added with Dockposition.Fill the new window will get focus. When floated the window in focus when the operation started may be hidden behind another window. Selecting the original window causes flickering between windows.

/Brian 

 

 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 01 Dec 2015
4 answers
128 views

Hello

How Can I change culture of GanttView?

Thanks in advance

Hristo
Telerik team
 answered on 01 Dec 2015
2 answers
734 views

Hi Folks,

I have an Async Task which uses a LINQ query to fetch rows of data.

public async Task<List<POMastObject>> FetchPOMastsAsync()
        {
            try
            {
                using (var db = new DBContext())
                {
                    return await (from p in db.POMasts.AsNoTracking()
                            join pr in db.Profiles.AsNoTracking() on p.ProfileID equals pr.ID
                            join c in db.CurrencyTypes.AsNoTracking() on p.CurrencyTypeID equals c.ID
                            join w in db.WHMasts.AsNoTracking() on p.WarehouseID equals w.ID
                            join t in db.TermCodeTypes.AsNoTracking() on p.TermCodeTypeID equals t.ID
                            join s in db.POMastStatusTypes.AsNoTracking() on p.StatusID equals s.ID

                            //Ensure that these are dynamic
                            where (_viewfetch.VendMastID == -1 || p.VendorID == _viewfetch.VendMastID) &&
                            (_viewfetch.POMastStatusID == -1 || p.StatusID == _viewfetch.POMastStatusID)

                            orderby p.ID

                            //Put the query results into the bespoke object
                            select new POMastObject
                            {
                                ID = p.ID,
                                OrderNo = p.OrderNo,
                                RaisedDate = p.RaisedDate,
                                RaisedBy = pr.Name,
                                Currency = c.Description,
                                Warehouse = w.Description,
                                Terms = t.Description,
                                LastEditedBy = p.LastEditedBy,
                                LastEditedDate = p.LastEditedDate,
                                Status = s.Name
                            }).ToListAsync();
                }
            }

Which is consumed on the form as follows:

private async void GetSearchResultVendorAsync()
        {
            try
            {              
                radGridViewResult.DataSource = await _poasync.FetchPOMastsAsync();
                radGroupBoxResult.FooterText = "Search Results (" + radGridViewResult.RowCount.ToString() + " Records)";
            }
            catch (Exception ex)
            {
                GlobalErrorHandler.CallingRoutine = MethodBase.GetCurrentMethod().Name;
                GlobalErrorHandler.CallingModule = typeof(frmSearchPO).ToString();
                GlobalErrorHandler.Exception = ex.Message.ToString();
                GlobalErrorHandler.HandleError();
            }
        }

I am trying to have a radWaitngBar wrapped around this to StartWaiting and StopWaiting but so far have been unable to get it to work

I tried the following:

private async void radButtonSearch_Click(object sender, EventArgs e)
        {
            try
            {
                InitMemberVars();
                radWaitingBar1.StartWaiting();

                await Task.Run(() =>
                {
                    GetSearchResultVendorAsync();
                });
                radWaitingBar1.StopWaiting();
            }

Which starts the animation but then falls over with a System.NullReferenceeException in Telerik,WinControls.dll

If I don't use radWaitingBar the grid is populated correctly, and you are still able to drag the radForm around the screen whilst the async data fetch is running.

Any ideas folks?

Thanks

Martin.

Hristo
Telerik team
 answered on 01 Dec 2015
1 answer
82 views

Hi,

Using the GroupElementFormatting event, I would like to format the values based on knowledge of the original data column. 

So  how does one get the PropertyGroupDescription when knowing the PivotGroupElement?

/Brian 

 

   

 

 

Hristo
Telerik team
 answered on 01 Dec 2015
3 answers
132 views

I have an application that on the main form (MainForm.cs) it is not honoring the following:

FormElement.TitleBar.MaximizeButton.Enabled = false;
FormElement.TitleBar.MaximizeButton.Visibility = ElementVisibility.Collapsed;

It does honor it not being enabled, but hiding altogether is not working.

If I edit the form properties in the Proerties Window, I can see it collapse. Running the application for the first time seems to undo this, but there is no code that explicitly sets its visibility back to ElementVisibility.Visible.

I have other forms with in the app that have it disabled without issue.

Help

Dimitar
Telerik team
 answered on 01 Dec 2015
5 answers
134 views

Hi!

 

Which action can I check after the users clicked on: " * Click here to add new row " and filled the collums, please?

 

The first collum is readonly because its a ID, but the others must be filled to execute the action.

 

I can't find the solution.

 

Thank you!

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Nov 2015
3 answers
901 views

iam trying to upload some file on a server and i did it async it works just fine but i want to show the progress of the uploading on progress bar that i embed in a listview using this thread

i update the progress bar value on event progresschanged that i create for uploading this is the code am using

UploaderService ser = new UploaderService();
radListView1.Items.Add("1", "Test Video", "", "", 0, "");
ser.Authenticate("username", "password");
Uploader up = new Uploader(ser, @"C:\Users\public\Downloads\Video\E");
up.ProgressChanged += ((ss, rr) =>
{
    var PercentComplete = (rr.Progress * 100.0f) / up.Size;
    radListView1.Items[0][4] = Convert.ToInt32(PercentComplete);
});
i tried the updatelayout methode and Application.DoEvents() also the refresh, and to let you know its on the  radform thread and i make it work only on runtime by clicking on the headercell and its update the progress bar

 also i found a workaround but theres any other way withou making a loop while

while (true)
{
    var PercentComplete = (up.Progress * 100.0f) / up.Size;
    radListView1.Items[0][4] = Convert.ToInt32(PercentComplete);
    radListView1.RootElement.UpdateLayout();
    radListView1.Refresh();
    if (PercentComplete == 100)
    {
        break;
    }
}

Hristo
Telerik team
 answered on 30 Nov 2015
0 answers
346 views

How can I change left border width and color with the following code:

public class MyBorderPrimitiveSElement : RadElement { protected override void CreateChildElements() { BorderPrimitive borderPrimitive = new BorderPrimitive(); borderPrimitive.Class = "MyBorderPrimtiveClass"; borderPrimitive.BoxStyle = BorderBoxStyle.SingleBorder; borderPrimitive.Width = 3; borderPrimitive.ForeColor = Color.Red; borderPrimitive.GradientStyle = GradientStyles.Solid; this.Children.Add(borderPrimitive); base.CreateChildElements(); } }

Mohsen
Top achievements
Rank 1
 asked on 29 Nov 2015
2 answers
279 views

Hello,

Can we add icon to right-click context menus' left side? If yes, how?

Kind regards,

Mehmet.

SarperSozen
Top achievements
Rank 1
 answered on 27 Nov 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
AI Coding Assistant
+? 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?