Telerik Forums
UI for WinForms Forum
3 answers
189 views
Hi,

I have been experiencing some problems with binding appointments to resources.

I have some "Orders" that is just a Appointment and some resources thats Cars that have the appointments attached.

Im using a SchedulerBindingSource With this code:

            SchedulerBindingDataSource schedulerBindingDataSource1 = new SchedulerBindingDataSource(); 
 
            AppointmentMappingInfo appointmentMappingInfo = new AppointmentMappingInfo(); 
            appointmentMappingInfo.Start = "Start"
            appointmentMappingInfo.End = "End"
            appointmentMappingInfo.Summary = "Summary"
            appointmentMappingInfo.Description = "Description"
            appointmentMappingInfo.Location = "Location"
            appointmentMappingInfo.UniqueId = "Id"
            appointmentMappingInfo.BackgroundId = "BackGroundID"
            appointmentMappingInfo.StatusId = "StatusCarOn"
            appointmentMappingInfo.ResourceId = "Carid"
            appointmentMappingInfo.Resources = ""
 
            SchedulerMapping idMapping = appointmentMappingInfo.FindByDataSourceProperty("Id"); 
            idMapping.ConvertToDataSource = ConvertIdToDataSource; 
            idMapping.ConvertToScheduler = ConvertIdToScheduler; 
 
            SchedulerMapping idMapping2 = appointmentMappingInfo.FindByDataSourceProperty("Carid"); 
            idMapping2.ConvertToDataSource = ConvertIdToDataSourceForCars; 
            idMapping2.ConvertToScheduler = ConvertIdToScheduler; 
 
            schedulerBindingDataSource1.EventProvider.Mapping = appointmentMappingInfo; 
            schedulerBindingDataSource1.EventProvider.DataSource = _orderExtendScheduleItems; 
 
            ResourceMappingInfo resourceMappingInfo = new ResourceMappingInfo(); 
            resourceMappingInfo.Id = "Carid"
            resourceMappingInfo.Name = "Carname"
 
            SchedulerMapping ridMapping = resourceMappingInfo.FindBySchedulerProperty("Id"); 
            ridMapping.ConvertToDataSource = ConvertIdToDataSource2; 
            ridMapping.ConvertToScheduler = ConvertIdToScheduler; 
 
            schedulerBindingDataSource1.ResourceProvider.Mapping = resourceMappingInfo; 
            schedulerBindingDataSource1.ResourceProvider.DataSource = carList; 
 
            radScheduler1.DataSource = schedulerBindingDataSource1; 

But for some reason the appointments wont get binded to the "Cars" / Resources...

Anyone know how to do this?
Dobry Zranchev
Telerik team
 answered on 04 Mar 2010
1 answer
118 views
Telerik,
I have a grid where the first column is a checkbox column.  When a checkbox is checked in any row for the first time, that checkbox shifts to the right within the column by a pixel or two.  Even if the checkbox itself isn't checked, but a mouseclick occurs within the cell, the same effect occurs.  I've experimented with multiple columns widths, thinking maybe I wasn't allowing enough room for the entire control, but nothing has worked.  Is this a known issue with a solution?

Thanks,
Jeremy
Jack
Telerik team
 answered on 04 Mar 2010
1 answer
232 views
Hi,

I need to extend RadGridView. I want to add child item in GridHeaderElement. How can I achieve this?

Thanks

My code: It add combobox rad element but it does not place at proper location and drop down is not shown.
public partial class RadGridViewEx : RadGridView 
    { 
        public RadGridViewEx():base() 
        { 
            InitializeComponent(); 
        } 
 
        protected override void CreateChildItems(RadElement parent) 
        { 
            base.CreateChildItems(parent); 
 
            GridHeaderElement header = ((Telerik.WinControls.UI.GridTableElement)(this.GridElement)).HeaderElement; 
 
            RadComboBoxElement cb = new RadComboBoxElement(); 
            RadItem item = new RadItem(); 
            item.Text = "A"
            cb.Items.Add(item); 
            item = new RadItem(); 
            item.Text = "B"
            cb.Items.Add(item); 
            item = new RadItem(); 
            item.Text = "C"
            cb.Items.Add(item); 
            item = new RadItem(); 
            item.Text = "D"
            cb.Items.Add(item); 
 
            //cb.Location = new Point(0, 25); 
            cb.Size = new Size(100, 25); 
            cb.DropDownHeight = 300
            cb.SelectedIndexChanged += new EventHandler(cb_SelectedIndexChanged); 
            header.GroupPanel.Children.Add(cb); 
           
 
        }             
 
        void cb_SelectedIndexChanged(object sender, EventArgs e) 
        { 
            RadComboBoxElement cb = sender as RadComboBoxElement; 
             
            MessageBox.Show(((RadItem)cb.SelectedItem).Text); 
        } 
         
    }     
Svett
Telerik team
 answered on 04 Mar 2010
1 answer
109 views
Hello

I am displaying child grid view in my application.

myproblem is that when i add a new row to data source of child grid view which isdata table it doesn't get refresh in child grid view.

after trying toomuch and calling your grid update method for 2- 3 time with different parametersi am able to refresh it and able to get newly added row in child rows list butthe new row is not properly visible due to height of child template.

Socan you help me in increasing the height of child template so that rows becomevisible?
Jack
Telerik team
 answered on 04 Mar 2010
3 answers
999 views

What would be the appropriate approach for displaying an image in column 1 with the value of column 2.

For example, if column 2 is a status column and when the status is "GOOD" I want image1 to be displayed but when its "BAD" I want image2 to be displayed. How would I handle this? What approach would have the best performance when there are a large number of rows? We have one grid that contains over 100,000 rows of data.

Thanks for the help.

 

Bryan

Jack
Telerik team
 answered on 04 Mar 2010
4 answers
168 views
How can I change the format of the header text, e.g. to italics, depending on whether grouping is allowed? Is the header row processed by the CellFormatting event? From the examples I've seen, since the type of row is not checked, I assume only data rows go there. I tried the code below in the form load event, but Italic is a read-only property, so I can't change it. I'm also counting on the fact there that the columns and cells are in exactly the same order, which may not be the case.

 


Dim
i As Integer

 

 

For i = 0 To Me.TblUsersRadGridView.ColumnCount - 1

 

 

If Me.TblUsersRadGridView.Columns(i).AllowGroup Then

 

 

Me.TblUsersRadGridView.MasterGridViewInfo.TableHeaderRow.Cells(i).CellElement.Font.Italic = True

 

 

End If

 

 

Next

 

Martin Vasilev
Telerik team
 answered on 04 Mar 2010
2 answers
161 views
I have a combo box of part numbers on a form and I want to pass the selected value of the item to a query to build a radgridview.  In ASP.NET this was easy as you just passed in the paramaters.  How would I go about this in WinForms?

Below is the Query that runs and I pass in Part Number and Facility and in ASP.NET it works wonderful.  Would I need to setup an OleDbConnection connection?  Like in http://www.telerik.com/help/winforms/grid_binding-to-datareader.html this example?  How do I pass in the paramaters each time a new PN is selected from the ComboBox.

WITH BOMCTE    
AS   
(    
  SELECT *    
  FROM MBM    
  WHERE BPROD = @PN  
  UNION ALL   
  SELECT MBM.*    
  FROM MBM    
    JOIN BOMCTE    
      ON MBM.BPROD = BOMCTE.BCHLD and MBM.BMBOMM = BOMCTE.BMBOMM  
          
)    
SELECT DISTINCT cast(BCHLD as varchar(100))as ChildID, cast(BPROD as varchar(100))as ParentID, BSEQ as Sequence, IABC as 'ABC Code', ICOND as 'Condition Code', IDESC, IDSCE as '2nd Desc', ICITYP as Type, ICLAS as Team  FROM BOMCTE  
INNER JOIN IIM on BCHLD = IPROD  
INNER JOIN CIC on BCHLD = ICPROD  
UNION ALL 
SELECT DISTINCT cast(ICPROD as varchar(100))as ChildID, cast(NULL as varchar(100))as ParentID, 0 as Sequence, IABC as 'ABC Code', ICOND as 'Condition Code', IDESC, IDSCE as '2nd Desc', ICITYP as Type, ICLAS as Team   
FROM CIC  
INNER JOIN IIM on ICPROD = IPROD  
WHERE ICFAC = @FAC and ICPROD = @PN Order by Sequence 
Julian Benkov
Telerik team
 answered on 03 Mar 2010
2 answers
334 views
I want to be able to highlight all rows that have a null value in a certain column. However when i try to use the following object its not working on null values.

Im calling this on the load of my form, or should i be calling this on the rowformatting event?

Private

 

Sub SetConditions()

 

 

Dim obj As New ConditionalFormattingObject("MyCondition", ConditionTypes.Equal, System.DBNull.Value.ToString, "", True)

 

obj.CellForeColor = Color.Red

obj.RowBackColor = Color.Yellow

 

Me.RadGridView_SessionData.Columns("Assignment").ConditionalFormattingObjectList.Add(obj)

 

 

End Sub

Any ideas!

 

Martin Vasilev
Telerik team
 answered on 03 Mar 2010
4 answers
178 views
Hi,

I'm using Q3 of 2009 libraries and I'm trying to hide the AllDay area to force all appointments to show up on the hour rows. I'm doing the following in the form constructor:

SchedulerDayView dayView = radScheduler1.GetDayView(); 
dayView.ShowRuler = false
dayView.ShowAllDayArea = false
dayView.DayCount = 1; 
dayView.AppointmentTitleFormat = "{2}"
dayView.WorkTime = new TimeInterval(TimeSpan.Zero, TimeSpan.Zero); 

All properties work fine, except for the ShowAllDayArea. The area still shows up in the dayview. Is there another property I'm missing? Thanks.

P.S. Also, is it normal for the style settings on views to reset every time the view is changed? Say I set up my day view as above and then switch to Week View. When I come back to DayView, all my settings have to be done again.
Dobry Zranchev
Telerik team
 answered on 03 Mar 2010
2 answers
244 views

Buttons added to the Ribbon bar in design time and dynamically seems to have the different behavior on mouse hoover. Meanwhile when I move mouse over buttons added in design time they are highlighted, dynamically added button are not highlighted. How can I set up this behavior thru program code?

Here is my method for adding buttons to the button group:

private void AddItemToButtonGroup(RadRibbonBarGroup group, String ItemName, String ItemText, String ItemDescription)

                        {

                                   RadButtonElement item = new RadButtonElement();

                                   item.DisplayStyle = DisplayStyle.ImageAndText;

                                   item.TextImageRelation = TextImageRelation.ImageBeforeText;

                                   item.ImageAlignment = ContentAlignment.MiddleCenter;

                                   item.Name = ItemName;

                                   item.Text = ItemText;

                                   item.ShowBorder = true;

                                   item.TextWrap = true;

                                   item.Margin = new Padding(1);

                                   item.TextAlignment = ContentAlignment.MiddleCenter;

                                   item.ToolTipText = ItemDescription;

                                   item.MaxSize = new Size(80, 80);

                                   item.Click += new EventHandler(Item_Click);

                                   group.Items.Add(item);

                        }

petr
Top achievements
Rank 1
 answered on 03 Mar 2010
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?