Telerik Forums
UI for WinForms Forum
1 answer
93 views
tried to post it in Reporting forum, but unsuccessfully, doesn't show 

Hi,

here is the code for background printing.

        void ReportToDefault(Report report)
        {
            if (report == null) return;

            System.Drawing.Printing.PrintController standardPrintController =
                                    new System.Drawing.Printing.StandardPrintController();
            Telerik.Reporting.Processing.ReportProcessor reportProcessor
                                                = new Telerik.Reporting.Processing.ReportProcessor();
            reportProcessor.PrintController = standardPrintController;
            try
            {
                reportProcessor.PrintReport(report, Properties.Settings.Default.defaultPrinter);
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }

The question is:

If the high intensive printing is needed, then what is the best practice to use the code? 
Is it better to instantiate the controller and processor only once, on the App start up, and then just pass arguments to PrintReport? 
What if it's using im multithreading mode, when Docs come ech time while the processor maybe is still busy in printing?
Thanks you!
Роберт
Top achievements
Rank 1
 answered on 10 Dec 2014
10 answers
349 views
Hi...

I've added a radtheme manager to my form loading themes from a file, but when i redistrubute my application, the path gets "hardcoded" to the project with my original folder path. Is there a way to reference to a project file or folder?

thanks
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Dec 2014
3 answers
255 views
How do I pass RadScheduler_CellFormatting Telerik.WinControls.UI.SchedulerCellEventArgs in radSchedulerNavigator_NavigateForwardsClick?

  private void radSchedulerNavigator1_NavigateBackwardsClick(object sender, EventArgs e)
        {
           
            this.radCalendar1.FocusedDate = this.radScheduler1.ActiveView.StartDate;

            string  time_Nback1  = "";
            string time_Nback2 = "";

            if (radScheduler1.ActiveViewType == SchedulerViewType.Day)
            {
                SchedulerDayView dayView_ck = this.radScheduler1.GetDayView();
                time_Nback1 = dayView_ck.StartDate.ToString("yyyyMMdd");
                time_Nback2 = dayView_ck.EndDate.ToString("yyyyMMdd");
            }
            else if (radScheduler1.ActiveViewType == SchedulerViewType.Week)
            {
                SchedulerWeekView weekView_ck = this.radScheduler1.GetWeekView();
                time_Nback1 = weekView_ck.StartDate.ToString("yyyyMMdd");
                time_Nback2 = weekView_ck.EndDate.ToString("yyyyMMdd");
            }
            else if (radScheduler1.ActiveViewType == SchedulerViewType.Month)
            {
                SchedulerMonthView monthView_ck = this.radScheduler1.GetMonthView();
                time_Nback1 = monthView_ck.StartDate.ToString("yyyyMMdd");
                time_Nback2 = monthView_ck.EndDate.ToString("yyyyMMdd");
            }

            boundradschedulerview("001", time_Nback1, time_Nback2);
            dtHoilday = boundAppointmentObj.listDoctorOffTime("001", time_Nback1, time_Nback2);
            radScheduler1_CellFormatting(sender, (Telerik.WinControls.UI.SchedulerCellEventArgs) e);
        }

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Dec 2014
1 answer
1.2K+ views
How I can loop through all row of my grid and detect only row with checkbox column checked ?
Hristo
Telerik team
 answered on 10 Dec 2014
2 answers
148 views
some of buttons disabled and another buttons are enabled depending on condition 
the problem is , if you sort the radgridview by clicking the header of data column these enabled buttons will be disabled and disabled buttons somtimes will be enabled , i tried ViewCellFormatting event but have the same problem.
You can see the attached screenshot before and after sorting ..
 private void grvDepartment_CellFormatting(object sender, CellFormattingEventArgs e)
        {            
            if (e.RowIndex > -1) // not header
            {
                var cellElement = e.CellElement;
                int departmentId = Convert.ToInt32(e.Row.Cells["DepartmentId"].Value);                
                ICollection<UserProfile> usersProfiles =
                     (from u in _outEntities.UserProfile.Local where u.DepartmentId == departmentId select u).ToList();

                if (usersProfiles.Count > 0)
                {
                    #region MyRegion
                    if (cellElement.ColumnInfo.Name == "DepartmentName")
                        cellElement.Enabled = false;
                    else if (cellElement.ColumnInfo.Name == "DepartmentAcronum")
                        cellElement.Enabled = false;
                    else cellElement.Enabled = true; 
                    #endregion

                    var cell = cellElement as GridCommandCellElement;
                    if (cell != null)
                    {
                        #region MyRegion
                        if (cell.ColumnInfo.Name == "colUpdate")
                            cell.Enabled = false;
                        //cell.Visibility = ElementVisibility.Hidden;
                        else if (cell.ColumnInfo.Name == "colDelete")
                            //cell.Visibility = ElementVisibility.Hidden; 
                            cell.Enabled = false;
                        else cell.Enabled = true;
                        //cell.Visibility = ElementVisibility.Visible;
                        #endregion
                    }
                }
            }            
        }



Omar
Top achievements
Rank 2
 answered on 10 Dec 2014
8 answers
304 views
Hi,

I encounter the problem like in subject. You can simply reproduce it by:
1) create simple project with RadGridView
2) Set model as ObjectDataSource
3) fill it like this:
  •  public Form1()
            {
                InitializeComponent();

                List<Model> model = GenerateModel();
                this.radGridView1.DataSource = model;
            }
  • private List<Model> GenerateModel()
            {
                List<Model> model = new List<Model>();

                // 1)    EVERYTHING WORKS FINE
                //for (int i = 0; i < 100000; i++)
                //{
                //    Model m = new Model() { Text = i.ToString(), Number = i, Text2 = i.ToString() };
                //    model.Add(m);
                //}

                // 2)    SLOW DOWN
                for (int i = 0; i < 100000; i++)
                {
                    Model m = new Model() { Text = i.ToString(), Number = i, Text2 = "1" };
                    model.Add(m);
                }

                return model;
            }
  • public class Model
        {
            public string Text { get; set; }
            public int Number { get; set; }
            public string Text2 { get; set; }
        }

When you uncoment version one ( and of course comment version 2 ) everything works fine = selecting rows / cells works perfect.
But when you comment version 1 and uncoment second ( like in above example ) after set sorting on third column ( Text2 ) selecting rows / cells slows down. When you clear sorting on third column behavior back to normal. Sorting by another columns ( first or second ) doesn't couse such behavior.
So in my opinion it is happend when many cells in sorted columns contain the same value.
I think that because when fill only half of rows with the same value and rest with different it spead up.

Does someone has any solution for this
Thanks in advance
Ivan Todorov
Telerik team
 answered on 09 Dec 2014
7 answers
188 views
Dear All,

I'm facing a problem in using RadContextMenu, my form contains three charts and i want to assign the same menu for all of them so i used The RadContextMenu property to assign the menu, but my problem is when the user pick any choice from the menu, how can i know on which chart did the user click ?? the sender contains rad menu control not the chart control.

Thank you
Peter
Telerik team
 answered on 08 Dec 2014
3 answers
333 views
I have been trying very hard to mimmic the bubble bar component but it fails for me each time. I also downloaded the samples that were uploaded by the telerik team but that fails for me as well, with the latest build of Telerik Components and Vs 2010. Also the samples provided with the telerik installer were of no help either. 

@Telerik Team : if you could post a sample just like you did earlier targetting the latest release of Telerik controls and Vs 2010 , it would be nice and sweet. 

Thanks  and Regards
Gagan Janjua
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Dec 2014
2 answers
124 views
Hi,

I can't find an soloution for my problem. I already searched and tried many hours, but without success.
Well, I hope somebody can help me with my problem.

How it is possible via code to set a focus on RadGridViews Filter TextBox Column? 

For better understanding, I have attached a screenshot. 

I want to set a focus on this Filter TextBox via code.

I am using the Telerik Controls in Version v. 2014.1.402.40

Thank you!

Pierre
Pierre
Top achievements
Rank 1
 answered on 08 Dec 2014
2 answers
404 views
Is it possible to have the search row (in the GridView) also perform its search on hidden columns? If not, this would be a great feature in my opinion. When a substring matches a value in a hidden column, the entire row could be selected. Having the entire row selected (in lieu of selecting the separate values in each cell) would also be another great option to have.

Thanks for any insight you have.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Dec 2014
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
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
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
NavigationView
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
SplashScreen
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?