Telerik Forums
UI for WinForms Forum
3 answers
504 views
Hello

I have looked through the forums and I haven't found an answer that works yet so I thought I would just ask. I am trying to make the first row of my radgridview object have a blue background color in c#.  This is some of the code

foreach (var ResultLine in myFiles)
                    {
                        string[] Contents = System.IO.File.ReadAllLines(ResultLine.FullName.ToString());
                        if (headercount == 0)
                        {
                            string HeaderRow = Contents[0];
                            string[] HeaderRowSplit = HeaderRow.Split(new char[] { ',' });
                            for (int i = 0; i < rgvAlarmLog.ColumnCount; i++)
                            {
                                rgvAlarmLog.Rows[rowCount].Cells[i].Value = HeaderRowSplit[i];
                                rgvAlarmLog.Rows[rowCount].Cells[i].Style.BackColor = System.Drawing.Color.Blue;
                            }
                            rowCount++;
                            headercount = 1;



If I change backcolor1 or 2 or 3 then I see color change in the highlighted row when selected. I do not want that though. I  want the background color to be blue all the time. How can I do this with code?
Richard Slade
Top achievements
Rank 2
 answered on 20 Apr 2012
1 answer
241 views
Hello

I have my data added like this way Added for items and two groups and assigned as below.
this.radListView1.Groups.Add(new ListViewDataItemGroup("First Group"));
this.radListView1.Groups.Add(new ListViewDataItemGroup("Second Group"));
 
this.radListView1.Items[0].Group = this.radListView1.Groups[0];
this.radListView1.Items[1].Group = this.radListView1.Groups[0];
this.radListView1.Items[2].Group = this.radListView1.Groups[1];
this.radListView1.Items[3].Group = this.radListView1.Groups[1];
If I wanted to select the first Group "First Group" and on basis for that i wanted to show message or call any other event...
How can i do that ?
Stefan
Telerik team
 answered on 20 Apr 2012
3 answers
577 views
Hi,

Background:

I am populate a grid on certain criteria which user selects within a form. When user press the Load Data button, the data is getting loaded into the RadGridView along with a SummaryRow on the top of the grid.

I have a clear data button which currently clears the grid by setting the DataSource property to null.

Issue:

When user hit the Clear Data button alothough it clears out all the data but leaves that Summary row on the top, which is an issue.

My question is - Is there a way to remove the GridViewSummaryRowItem or any way I can refresh the whole grid which removes the SummaryRow.

Thanks.
Regards
Mohammad
Stefan
Telerik team
 answered on 20 Apr 2012
2 answers
102 views
I have created a custom appointment edit form.  I have created my own fields as well as disabling inherited fields that I did not need.  For the fields that I did not need, I moved them to an empty part of the form, set the Visible property to False and erased anything in the text property.

However, I did this with the chkAllDay CheckBox.  Set the Visible property to false and erased the text in the Text Property.  The form designer reflects these changes - no text shows up next to the CheckBox.   Anytime that I run my program and use the form this CheckBox is visible on the form, and the original text is displayed.

I have a simple fix for this.  In the MouseMove Event handling I use the following code:
If (chkAllDay.Visible = True) Then
            chkAllDay.Visible = False
        End If


This will make the control not visible as desired anytime the user moves the mouse.

I just wanted to point out a possible bug - or if someone could show me what I'm doing wrong.

Thanks!
Ivan Todorov
Telerik team
 answered on 20 Apr 2012
1 answer
117 views

Hi,
I am having an issue to save data to database.

I used code below to bind data from database and save information into database as needed.

but Resource field, it did not save the information at all. for example, user books new appointment and choose resource: Laptop and clicks save, but when user come back, resouce field went to None.

Please help and kindly regard.

'load event...
Me.SchedulerDataDataSet1 = New SchedulerDataDataSet()
Dim appointmentsAdapter As New AppointmentsTableAdapter()
appointmentsAdapter.Fill(Me.SchedulerDataDataSet1.Appointments)
Dim resourcesAdapter As New ResourcesTableAdapter()
resourcesAdapter.Fill(Me.SchedulerDataDataSet1.Resources)
Dim appointmentsResourcesAdapter As New AppointmentsResourcesTableAdapter()
appointmentsResourcesAdapter.Fill(Me.SchedulerDataDataSet1.AppointmentsResources)
Dim dataSource As New SchedulerBindingDataSource()
Dim appointmentMappingInfo As New AppointmentMappingInfo()
appointmentMappingInfo.Start = "Start"
appointmentMappingInfo.End = "End"
appointmentMappingInfo.Summary = "Summary"
appointmentMappingInfo.Description = "Description"
appointmentMappingInfo.Location = "Location"
appointmentMappingInfo.BackgroundId = "BackgroundID"
appointmentMappingInfo.StatusId = "StatusID"
appointmentMappingInfo.Resources = "Appointments_AppointmentsResources"
appointmentMappingInfo.ResourceId = "ResourceID"
appointmentMappingInfo.RecurrenceRule = "RecurrenceRule"

dataSource.EventProvider.Mapping = appointmentMappingInfo
dataSource.EventProvider.DataSource = Me.SchedulerDataDataSet1.Appointments

Dim resourceMappingInfo As New ResourceMappingInfo()
resourceMappingInfo.Id = "ID"
resourceMappingInfo.Name = "Name"

dataSource.ResourceProvider.Mapping = resourceMappingInfo
dataSource.ResourceProvider.DataSource = Me.SchedulerDataDataSet1.Resources

Me.RadScheduler1.DataSource = dataSource

'Save data...
Dim appointmentsAdapter As New AppointmentsTableAdapter()
appointmentsAdapter.Update(Me.SchedulerDataDataSet1.Appointments)

Dim appointmentsResourcesAdapter As New AppointmentsResourcesTableAdapter()
appointmentsResourcesAdapter.Update(Me.SchedulerDataDataSet1.AppointmentsResources)

Ivan Todorov
Telerik team
 answered on 20 Apr 2012
1 answer
125 views
hi,
I use RadRibBonBar, and RadElementTree as its elements, when I minimize the form that RadRibBonBar used in, the text of that elements disappear...
How can I  solve this problem
thanks
Stefan
Telerik team
 answered on 20 Apr 2012
1 answer
573 views
Sirs:
I have a WinForm onto which I'm dropping quite a few text boxes and one radDropDownList. All the text boxes (not Telerik) are 20 px tall, and the DropDownList is 18 px tall. I have to use the default theme.

Is there a simple way to set the height of the control? (Not the dropped down height, the height when closed)
You'd think that CONTROLNAME.HEIGHT = 20 would work, but it doesn't

I tried increasing the font size, that worked but looked dumb. <smiles>


Richard Slade
Top achievements
Rank 2
 answered on 19 Apr 2012
3 answers
498 views
Hi all.
I have a WindowsForm Aplication with a RadGridView(RadGridView3) added into mainForm.
I have a class "Class1" with a shared function:

Imports

 

Telerik.WinControls.UI

 

Public

Class Class1

Public Shared Function gridul_3() As RadGridView

Dim cerinte0 As New GridViewCheckBoxColumn()

Dim cerinte1 As New GridViewCheckBoxColumn()

Dim cerinte20 As New GridViewCheckBoxColumn()

Dim cerinte3 As New GridViewCheckBoxColumn()

Dim cerinte4 As New GridViewCheckBoxColumn()

Dim _teme As New GridViewTextBoxColumn()

Dim aptitudini As New GridViewCommandColumn()

Dim nivel0 As New GridViewCheckBoxColumn()

Dim nivel_0 As New GridViewCheckBoxColumn()

Dim nivel1 As New GridViewCheckBoxColumn()

Dim nivel20 As New GridViewCheckBoxColumn()

Dim nivel3 As New GridViewCheckBoxColumn()

Dim nivel4 As New GridViewCheckBoxColumn()

Dim observatii As New GridViewTextBoxColumn()

Dim columnGroupsView As ColumnGroupsViewDefinition

mainForm.RadGridView3.Columns.Clear()

mainForm.RadGridView3.AutoSize =

False

mainForm.RadGridView3.BackColor = System.Drawing.

Color.White

mainForm.RadGridView3.Dock = System.Windows.Forms.DockStyle.Fill

mainForm.RadGridView3.ForeColor = System.Drawing.Color.Black

mainForm.RadGridView3.MasterTemplate.AllowAddNewRow = True  

mainForm.RadGridView3.MasterTemplate.AllowRowReorder =

False

mainForm.RadGridView3.MasterTemplate.AutoExpandGroups =

True

 mainForm.RadGridView3.AutoGenerateColumns = False

 mainForm.RadGridView3.AllowAddNewRow = True

 mainForm.RadGridView3.AllowEditRow = True

 mainForm.RadGridView3.AllowRowResize = False

'add columns name

cerinte0.FieldName = "Nu_stie"

cerinte0.HeaderText =

"0"

 cerinte0.Width = 28

 

cerinte0.IsAutoGenerated =

True

cerinte1.FieldName =

"Stie_cu_ajutor"

 cerinte1.HeaderText = "1"

 cerinte1.Width = 28

 

cerinte1.IsAutoGenerated =

True

 cerinte20.FieldName = "Stie_singur"

 cerinte20.HeaderText = "2"

 cerinte20.Width = 28

 

cerinte20.IsAutoGenerated =

True

 cerinte3.FieldName = "Invata_si_pe_altii"

cerinte3.HeaderText =

"3"

 cerinte3.Width = 28

 

cerinte3.IsAutoGenerated =

True

 

cerinte4.FieldName =

"Expert"

 cerinte4.HeaderText = "4"
cerinte4.Width = 28

 

cerinte4.IsAutoGenerated =

True

 

_teme.FieldName =

"Teme_parcurse"

 _teme.HeaderText = "Asteptari "

 _teme.Width = 260

 

_teme.IsAutoGenerated =

True

 

aptitudini.Name =

"cauta_aptitudini"

 

aptitudini.HeaderText =

"*"

 aptitudini.FieldName = "*"

 aptitudini.Width = 18

 

aptitudini.IsAutoGenerated =

True

 

nivel_0.FieldName =

"N_Nu_stie"

 nivel_0.HeaderText = "0"

 nivel_0.Width = 28

 

nivel_0.IsAutoGenerated =

True

 

nivel1.FieldName =

"N_Stie_cu_ajutor"

 nivel1.HeaderText = "1"

 nivel1.Width = 28

 

nivel1.IsAutoGenerated =

True

 

nivel20.FieldName =

"N_Stie_singur"

 nivel20.HeaderText = "2"

nivel20.Width = 28

nivel20.IsAutoGenerated =

True

 

nivel3.FieldName =

"N_Invata_si_pe_altii"

 nivel3.HeaderText = "3"

 nivel3.Width = 28

 

nivel3.IsAutoGenerated =

True

 

nivel4.FieldName =

"N_Expert"

 

nivel4.HeaderText =

"4"  

nivel4.Width = 28

nivel4.IsAutoGenerated =

True

observatii.FieldName =

"Observatii"

observatii.HeaderText =

"Observatii"

observatii.Width = 124

observatii.IsAutoGenerated =

True

'add column into grid

With mainForm.RadGridView3.MasterTemplate

 .Columns.Add(cerinte0)

.Columns.Add(cerinte1)

.Columns.Add(cerinte20)

.Columns.Add(cerinte3)

.Columns.Add(cerinte4)

.Columns.Add(_teme)

.Columns.Add(aptitudini)

.Columns.Add(nivel_0)

.Columns.Add(nivel1)

.Columns.Add(nivel20)

.Columns.Add(nivel3)

.Columns.Add(nivel4)

.Columns.Add(observatii)

End With

' define groups

columnGroupsView =

New ColumnGroupsViewDefinition()

 columnGroupsView.ColumnGroups.Add(New GridViewColumnGroup("Cerinte post si alte cerinte"))

 columnGroupsView.ColumnGroups.Add(New GridViewColumnGroup("Asteptarile superiorului de la" & vbCrLf & " comportamentul subalternului"))

 columnGroupsView.ColumnGroups.Add(New GridViewColumnGroup("A"))

columnGroupsView.ColumnGroups.Add(New GridViewColumnGroup("Nivel angajat"))

 columnGroupsView.ColumnGroups.Add(New GridViewColumnGroup("Specificare observatii"))

 'add the subgroup and the columns into the first group

columnGroupsView.ColumnGroups(0).Rows.Add(New GridViewColumnGroupRow())

 columnGroupsView.ColumnGroups(0).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("Nu_stie"))

columnGroupsView.ColumnGroups(0).Rows.Add(New GridViewColumnGroupRow())

columnGroupsView.ColumnGroups(0).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("Stie_cu_ajutor"))

 columnGroupsView.ColumnGroups(0).Rows.Add(New GridViewColumnGroupRow())  

columnGroupsView.ColumnGroups(0).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("Stie_singur"))  

columnGroupsView.ColumnGroups(0).Rows.Add(New GridViewColumnGroupRow())  

columnGroupsView.ColumnGroups(0).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("Invata_si_pe_altii"))  

columnGroupsView.ColumnGroups(0).Rows.Add(

New GridViewColumnGroupRow())

columnGroupsView.ColumnGroups(0).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("Expert"))

'add the subgroup and the columns into the second group

columnGroupsView.ColumnGroups(1).Rows.Add(

New GridViewColumnGroupRow())

columnGroupsView.ColumnGroups(1).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("Teme_parcurse"))

columnGroupsView.ColumnGroups(2).Rows.Add(New GridViewColumnGroupRow())  

columnGroupsView.ColumnGroups(2).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("cauta_aptitudini"))

columnGroupsView.ColumnGroups(3).Rows.Add(

New GridViewColumnGroupRow())  

columnGroupsView.ColumnGroups(3).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("N_Nu_stie"))

columnGroupsView.ColumnGroups(3).Rows.Add(New GridViewColumnGroupRow())

 columnGroupsView.ColumnGroups(3).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("N_Stie_cu_ajutor"))

 columnGroupsView.ColumnGroups(3).Rows.Add(New GridViewColumnGroupRow())

 columnGroupsView.ColumnGroups(3).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("N_Stie_singur"))

 columnGroupsView.ColumnGroups(3).Rows.Add(New GridViewColumnGroupRow())

 columnGroupsView.ColumnGroups(3).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("N_Invata_si_pe_altii"))

columnGroupsView.ColumnGroups(3).Rows.Add(New GridViewColumnGroupRow())

columnGroupsView.ColumnGroups(3).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("N_Expert"))

columnGroupsView.ColumnGroups(4).Rows.Add(

New GridViewColumnGroupRow())

columnGroupsView.ColumnGroups(4).Rows(0).Columns.Add(mainForm.RadGridView3.Columns("Observatii"))

group definition
mainForm.RadGridView3.ViewDefinition = columnGroupsView

Return mainForm.RadGridView3

End Function
End Class

This function returns me the  mainForm.RadGridView3.


In the Load method ai call the mentioned function and I obtain the Radgridview3 with custon header columns.

Private

Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Class1.gridul_3()

End Sub

 

My question is how can I meke an height adjustment for grid header because i can't see all the column header text? 
I need to give an increased height for  each ColumnGroups added.

Thanks!
 

Ivan Petrov
Telerik team
 answered on 19 Apr 2012
1 answer
121 views
I was wondering if i can expand the series legend box and have more information in it like the attached picture. I would like to have legend look like what it has for "top 5 spending" is it possible?
Peshito
Telerik team
 answered on 19 Apr 2012
10 answers
364 views
Hello, I am trying to install Winforms Q2 2011 on a Win7 64bit machine with VS2008 and VS2010. The installation hangs after copying the files leaving a status bar empty. I have tried to reboot, uninstall, re-install, repair, clean registry etc, but it always hangs at the same location, and the product cannot be installed. I was sucessfull in installing Q2 Reporting and Q2 WPF and Q2 Silverlight.

Thanks
Petar
Telerik team
 answered on 19 Apr 2012
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
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?