Telerik Forums
UI for WinForms Forum
1 answer
235 views

Smart Tag in Rad Grid view not visible.

When right click on the gridview and select the 'open Property Builder', error occurred as "Object Reference not set to an instance of an object".

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Jul 2017
3 answers
161 views

Hi.

I'd like to use the scheduler for a work time recording software where users can enter their worktime by creating events in the scheduler.
There is also a time clock in the office and I'd like to highlight the times when users came in or left the office, just like the ruler does.
So, is it possible to draw two rulers per day? Or is it possible to draw custom lines?
Right now, I am changing the background color of the timespan where the user is in the office, but that approach has a low performance
because I handle that in the CellFormatting event and I have to check if the current cell is in that timespan.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Jul 2017
3 answers
857 views

The grid is loaded through the Bindingsource, adding, deleting, editing is included in the grid. How to make so that in the first column there was a comboBox and at data loading in, to the combo box the data was substituted.

I did, but I do not understand correctly.

_bindingSourceSurvey = new BindingSource { DataSource = commandServer.GetDataGridSet(@"select * from GetSurvey(" + _keyAlone + ")").Tables[0] };
radGridView2.Invoke(new MethodInvoker(delegate ()
{

GridViewComboBoxColumn comboColumn = new GridViewComboBoxColumn("Phone");

comboColumn.DataSource = _bindingSpeziolist;

radGridView2.Columns[1] = comboColumn;

radGridView2.DataSource = _bindingSourceSurvey;

}));

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Jul 2017
2 answers
892 views

I have several GridViewDecimalColumn columns, and I am using this string format: {0:N3}, I want to show 3 decimals, but if the value is zero I would like to show the value as an empty string.

 

1.12 = 1.120

0.8 = 0.800

2.9 = 2.900

0.0 = " " ?

Is there a way to accomplish this?

Regards,

Alberto

Amige
Top achievements
Rank 1
Veteran
 answered on 06 Jul 2017
2 answers
168 views
Is it possible to set a PageTitle when using the GridViewPdfExport, similar to when using ExportToPdf (see http://docs.telerik.com/devtools/winforms/gridview/exporting-data/export-to-pdf#page-title)? I can't find a similar property. I'm using the CellPaint and CellFormatting events of the GridViewPdfExport to render Charts in my Grid during export, so I can't just switch export methods. I would like to be able to put a title on the page or grid in the PDF. And unfortunately the GridView does not yet support a title or caption, either. (See https://feedback.telerik.com/Project/154/Feedback/Details/112101-add-radgridview-add-caption.)
Jon
Top achievements
Rank 1
 answered on 05 Jul 2017
1 answer
361 views

Hi,

I am trying to show on a grid a list of files where each file can expand to show the employees in that file (Each file contains multiple employees.  It's an one-many relationship).  My code looks like this so far but I only get a plus sign showing next to each file record on the grid but it won't expand to show the employees.  Please advise how I can correct this?  Thanks.

 

GridViewTemplate template = new GridViewTemplate();

template.Columns.Add(new GridViewTextBoxColumn("File_no"));

template.Columns.Add(new GridViewTextBoxColumn("File_Type"));

template.Columns.Add(new GridViewTextBoxColumn("Date_Received"));

template.Columns.Add(new GridViewTextBoxColumn("Date_Closed"));

template.Columns.Add(new GridViewTextBoxColumn("Title"));

template.Columns.Add(new GridViewTextBoxColumn("Status_Name"));

template.Columns.Add(new GridViewTextBoxColumn("Year"));

template.Columns.Add(new GridViewTextBoxColumn("Category_Name"));

template.Columns.Add(new GridViewTextBoxColumn("SubCategory_Name"));

template.Columns.Add(new GridViewTextBoxColumn("ERC_Name"));

template.Columns.Add(new GridViewTextBoxColumn("UnionName"));

template.Columns.Add(new GridViewTextBoxColumn("Union_Rep"));

template.Columns.Add(new GridViewTextBoxColumn("Business_Area_Name"));

template.Columns.Add(new GridViewTextBoxColumn("Resolution_Code"));

GridViewTemplate Childtemplate = new GridViewTemplate();

Childtemplate.Columns.Add(new GridViewTextBoxColumn("File_no"));

Childtemplate.Columns.Add(new GridViewTextBoxColumn("Employee_no"));

Childtemplate.Columns.Add(new GridViewTextBoxColumn("First_name"));

Childtemplate.Columns.Add(new GridViewTextBoxColumn("Last_name"));

Childtemplate.Columns.Add(new GridViewTextBoxColumn("Work_location"));

Childtemplate.Columns.Add(new GridViewTextBoxColumn("position"));

this.FileGrid.MasterTemplate.Templates.Add(template);

 

template.Templates.Add(Childtemplate);

GridViewRelation relation = new GridViewRelation(template);

relation.ChildTemplate = Childtemplate;

relation.RelationName = "FileEmployees";

relation.ParentColumnNames.Add("File_no");

relation.ChildColumnNames.Add("File_no");

 

FileGrid.Relations.Add(relation);

FileBusiness _fb = new FileBusiness();

_filelist = _fb.FindFile(null, null, null, null, null, null, null, null, null, null, null);  //this returns a list of files

var _orderedList = _filelist.OrderByDescending(x => x.File_no).ToList();

FileEmployeeView _ev = new FileEmployeeView();

this.FileGrid.DataSource = _orderedList;

 

template.DataSource = _orderedList;

Childtemplate.DataSource = _fb.GetAllFileEmployees(); //this returns all employees record and cooresponding file_id

this.FileGrid.Columns["ProcessStatus"].IsVisible = false;

this.FileGrid.Columns["ProcessStatusMessage"].IsVisible = false;

this.FileGrid.Columns["UpdatedBy"].IsVisible = false;

this.FileGrid.Columns["LastUpdated"].IsVisible = false;

this.FileGrid.Columns["CreatedOn"].IsVisible = false;

this.FileGrid.Columns["CreatedBy"].IsVisible = false;

this.FileGrid.Columns["isactive"].IsVisible = false;

this.FileGrid.Columns["Isdeleted"].IsVisible = false;

this.FileGrid.Columns["Code"].IsVisible = false;

this.FileGrid.Columns["ID"].IsVisible = false;

this.FileGrid.Columns["File_no"].HeaderText = "File #";

this.FileGrid.Columns["File_Type"].HeaderText = "File Type";

this.FileGrid.Columns["Date_Received"].HeaderText = "Date Received";

this.FileGrid.Columns["Date_Closed"].HeaderText = "Date Closed";

this.FileGrid.Columns["Title"].HeaderText = "Title";

this.FileGrid.Columns["Status_Name"].HeaderText = "Status Name";

this.FileGrid.Columns["Year"].HeaderText = "Year";

this.FileGrid.Columns["Category_Name"].HeaderText = "Category Name";

this.FileGrid.Columns["SubCategory_Name"].HeaderText = "Sub-Category Name";

this.FileGrid.Columns["ERC_Name"].HeaderText = "ERC";

this.FileGrid.Columns["UnionName"].HeaderText = "Union Name";

this.FileGrid.Columns["Union_Rep"].HeaderText = "Union Rep";

this.FileGrid.Columns["Business_Area_Name"].HeaderText = "Business Area Name";

this.FileGrid.Columns["Resolution_Code"].HeaderText = "Resolution Code";

 

Hristo
Telerik team
 answered on 05 Jul 2017
2 answers
246 views

Hi,

I'm using "RadControls for WinForms Q3 2011 SP1" internal build "2011.3.11.1219". I would like to show the description on appointment list. I was added the description on appointment buy it not appear on list. It always showing "Location" instead of "Description". I try to change the "AppointmentTitleFormat" but there has no way to show the description. I am testing it on Demo Radschedule\Group. How can i show the description at appointment?

Here is demo sample code from telerik.

 

protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
             
            DateTime baseDate = DateTime.Today;
            DateTime[] start = new DateTime[] { baseDate.AddHours(14.0), baseDate.AddDays(1.0).AddHours(9.0), baseDate.AddDays(2.0).AddHours(13.0) };
            DateTime[] end = new DateTime[] { baseDate.AddHours(16.0), baseDate.AddDays(1.0).AddHours(15.0), baseDate.AddDays(2.0).AddHours(17.0) };
            string[] summaries = new string[] { "Mr. Brown", "Mr. White", "Mrs. Green" };
            string[] descriptions = new string[] { "desc1", "desc 2", "desc3" }; // this is i added
            string[] locations = new string[] { "City", "Out of town", "Service Center" };
            AppointmentBackground[] backgrounds = new AppointmentBackground[] { AppointmentBackground.Business, AppointmentBackground.MustAttend, AppointmentBackground.Personal };
 
            this.radSchedulerDemo.Appointments.BeginUpdate();
            //radSchedulerDemo.AppointmentTitleFormat = "{0} to {1}<br>, {2} ({3}) {4} {5}";
 
            Appointment appointment = null;
             
 
            appointment = new Appointment(baseDate.AddHours(11.0), baseDate.AddHours(12.0), "summary", "description", "Garage");
            appointment.RecurrenceRule = new DailyRecurrenceRule(baseDate.AddHours(11.0), 2);
            this.radSchedulerDemo.Appointments.Add(appointment);
            this.radSchedulerDemo.Appointments.EndUpdate();
                  
            Color[] colors = new Color[]{Color.LightBlue, Color.LightGreen, Color.LightYellow,
                Color.Red, Color.Orange, Color.Pink, Color.Purple, Color.Peru, Color.PowderBlue};
 
            string[] names = new string[]{"Alan Smith", "Anne Dodsworth",
                "Boyan Mastoni", "Richard Duncan", "Maria Shnaider"};
 
            for (int i = 0; i < names.Length; i++)
            {
                Resource resource = new Resource();
                resource.Id = new EventId(i);
                resource.Name = names[i];
                resource.Color = colors[i];
  
                resource.Image = this.imageList1.Images[i];
                this.radSchedulerDemo.Resources.Add(resource);
            }
 
            this.radSchedulerDemo.GetDayView().ResourcesPerView = 2;
            this.radSchedulerDemo.GroupType = GroupType.Resource;
            SchedulerDayViewGroupedByResourceElement headerElement = this.radSchedulerDemo.SchedulerElement.ViewElement as SchedulerDayViewGroupedByResourceElement;
            headerElement.ResourceHeaderHeight = 135;
 
            for (int i = 0; i < summaries.Length; i++)
            {
                appointment = new Appointment(start[i], end[i], summaries[i],
                    descriptions[i], locations[i]);
                appointment.ResourceId = this.radSchedulerDemo.Resources[0].Id;
                appointment.BackgroundId = (int)backgrounds[i];
                this.radSchedulerDemo.Appointments.Add(appointment);
            }
 
            SchedulerDayViewGroupedByResourceElement dayView = this.radSchedulerDemo.SchedulerElement.ViewElement as SchedulerDayViewGroupedByResourceElement;
            dayView.ScrollToWorkHours();
 
            this.radSchedulerDemo.ActiveViewChanged += new EventHandler<SchedulerViewChangedEventArgs>(radSchedulerDemo_ActiveViewChanged);
            this.radSchedulerDemo.PropertyChanged += new PropertyChangedEventHandler(radSchedulerDemo_PropertyChanged);
            this.radSchedulerDemo.MouseDown += new MouseEventHandler(radSchedulerDemo_MouseDown);
 
            this.radSchedulerDemo.SchedulerElement.SetResourceHeaderAngleTransform(SchedulerViewType.Timeline, 0);
 
            this.radSchedulerNavigator1.AssociatedScheduler = this.radSchedulerDemo;
        }

 

Regards,

ALEX
Top achievements
Rank 1
 answered on 04 Jul 2017
4 answers
1.0K+ views

Hi,

 

How can i set focus  or select the first row  always of filtered grid? I already used gvGenericBrands.Rows[0].IsSelected = true;
                gvGenericBrands.Rows[0].IsCurrent = true; .

 

Please see attached image. Thanks in advance.

 

Dimitar
Telerik team
 answered on 04 Jul 2017
3 answers
222 views

I would like to be able to capture key events from a floating window.

Nothing I've tried seems to fire the OnKeyDown events associated with either the RadForm, FloatingParent or DockWindow.  I wired them up a variety of ways including in DockStateChanged.  Are the key events even intended to work for a floating window?

I'm using version 2017.2.613.40 of UI for WinForms.

I'm creating a new DockWindow with my user control which appears in the tabbed region in the middle of the RadDock.  I then float that window by dragging the tab.  Because the user may have several open floating windows, I want the global shortcut keys to function such as Ctrl+S to save everything even if they are in a floating window.  

Events DO fire from my control that is hosted in the floating window.  However, when one drags the floating window and the focus is on the window, key events don't fire.  

What's the proper way to wire of a floating window to capture key events?

 

Steve
Top achievements
Rank 1
 answered on 03 Jul 2017
2 answers
296 views

I'm using 2017.2.613.40 of UI for WinForms

I have a control hosted in a RadDock floating window.  When changes are made to my control I update the title bar of the host window with an asterisk:

"test"

becomes

"test*"

See attachments.

However, the problem is that the change is not immediately visible.  I have to drag the window before the title will repaint.

I'm using the following code to update the title bar after I acquire the HostWindow.

hostWindow.Text = value;
hostWindow.Invalidate(false);
hostWindow.Update();
hostWindow.Refresh();

But none of these method calls forces the title to repaint.  The text value is clearly getting set properly because as soon as I manually trigger a repaint by dragging the window, the new title value appears.

 

Steve
Top achievements
Rank 1
 answered on 03 Jul 2017
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
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
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?