Telerik Forums
UI for WinForms Forum
19 answers
585 views
Nice coding! I've following question:
In my previos in Time field I make this for editing:
ResultGridView.Columns["Time"].HeaderText = "Time";
            ResultGridView.Columns["Time"].DataTypeConverter = new DateToTimeConverter();
...
private void ResultGridView_EditorRequired(object sender, EditorRequiredEventArgs e)
        {
            if (ResultGridView.CurrentColumn.Name == "Time")
            {
                e.Editor = new GridTimePickerEditor();
            }
        }
...
public class DateToTimeConverter : TypeConverter
    {
        public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
        {
            return destinationType == typeof(DateTime);
        }
 
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
        {
            TimeSpan span = (TimeSpan)value;
            DateTime dt = new DateTime(span.Ticks);
            return dt;
        }
 
        public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
        {
            return sourceType == typeof(DateTime);
        }
 
        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
        {
            DateTime dt = (DateTime)value;
            TimeSpan span = new TimeSpan(dt.Hour, dt.Minute, dt.Second);
            return span;
        }
    }
Now I can edit only hour and minute, it possible to edit seconds and milliseconds too?
Dimitar
Telerik team
 answered on 25 Aug 2015
1 answer
272 views

Can you bind a column to a specific index in a List, without using a hierarchical grid?

For example, with the following data structure:

public class Survey {
    public string Name { get; set; }
    public List<string> Answers { get; set; }
    public Survey() {
        Answers = new List<string>();
    }
}
 

The grid is bound to a data source of List<Survey>.  

I can obviously create a column with a FieldName of: "Name".

Can I create a column with a FieldName of: "Answers[0]"?

 

I looked at the documentation article Binding to Sub Objects, and I didn't notice any restrictions on this.

 

Thanks,

Eric.

Stefan
Telerik team
 answered on 24 Aug 2015
0 answers
103 views

Hi Dear

I have Radribbonbar with 3 tab  and every tab have multiple group and every group

have multiple radbuttonelement.

i want to control them dynamically i add to db permissions and read them for example like this:

menu1  true

menu2 false

how can i read and apply hide or visible in radribbon bar?

 

 

Masoud
Top achievements
Rank 1
 asked on 22 Aug 2015
2 answers
88 views

Hi,

I would like to be able to customize the printing of a hierarchical GridView.

1) The only selected rows are to be included

2) Only two columns are required in the output

 What is the best way to achieve this?

 

Greg
Top achievements
Rank 1
 answered on 19 Aug 2015
1 answer
123 views

Hi,

 

I window form, Grid contains the 4 columns. when I entered data in any columns and bymistake I clicked on Grid header,  it does remove the data which I entered in the columns.so How can i prevent the remove data even clicked on Grid header..

 

Regards,

Dilip

 

Stefan
Telerik team
 answered on 19 Aug 2015
1 answer
132 views

I have added Text to the carousel image and set the Text to be displayed as textaboveimage - and tried a number of the other options as well - and I cannot see any of the text....

 It's not long text either - often just one word.

 What am I doing wrong to cause the text not to appear above the image.

 I should also mention that the images are 128 x 128... so it's possible that the text is 'under the image' - how do I cause the text to be shown above the image?

 I also tried to set the Text Position Offset Height to 140 to see if that would work but still - no visible text.

 Can anyone help with this?

Stefan
Telerik team
 answered on 19 Aug 2015
1 answer
157 views

Hi all,

 titel says it all.

 Regards

Ralitsa
Telerik team
 answered on 19 Aug 2015
10 answers
391 views
Hi

1. I need to be able to tell from the DragEventArgs arguments in the DragDrop event of the GridView, which row the user is "dropping" on.

I tried:

dgvPlaylistRegionMedia.GetChildAtPoint(new Point(e.X, e.Y));

but it returns null the whole time.

2. Also, it would be nice to give some sort of indication to the user where he would be "dropping", for e.g. a line between row 2 and row 3 if he's "hovering" between those 2 rows, or even a line after the last row to indicate that he would be adding it after the last row if he's "hovering" past the last row.  Any ideas?

Kind regards

Ralph
Hristo
Telerik team
 answered on 19 Aug 2015
1 answer
127 views

Hi.

 I need help, to translate a working C# kode til vb. It's the code highlightet with yellow, that gives me some (all the) troubles:

        private void ReadAppointmentsFromDatabase()

        {

            uiRadSchedulerMain.Appointments.Clear();

            var appointments = new ELHedegaard.BLL.Appointment(); 

            foreach (var appointment in appointments.GetAppointmentsWithResources())

            {

                Appointment schedulerAppointment = new Appointment();

                schedulerAppointment.Summary = appointment.Summary;

                schedulerAppointment.Start = appointment.Start.Value;

                schedulerAppointment.End = appointment.End.Value;

                schedulerAppointment.Location = appointment.Location;

                schedulerAppointment.Description = appointment.Description;

                //schedulerAppointment.BackgroundId = 1;

                schedulerAppointment.StatusId = 2;

                schedulerAppointment.BackgroundId = appointment.ParentID.Value;

                foreach (var x in appointment.ResourceIds.Select(a => new EventId(a)))

                  

                {

                    schedulerAppointment.ResourceIds.Add(x);

                    System.Diagnostics.Debugger.Break();

                }

                uiRadSchedulerMain.Appointments.Add(schedulerAppointment);

               //System.Diagnostics.Debugger.Break();

          }

          }

Kindly Peer​

Stefan
Telerik team
 answered on 18 Aug 2015
3 answers
112 views

How can i generate a custom format of the data that is displayed in the gridview?

for example, i want to generate a timesheet for employees in my organization, the first line of the sheet should be the name of organization, second line should be the name of the employee and then the gridview should be binded with the database.

i also want to export data from this gridview to excel sheet. 

format image is attached bellow

can someone help me?

 

Dimitar
Telerik team
 answered on 18 Aug 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?