Telerik Forums
UI for WinForms Forum
6 answers
651 views

Hi
My code to change the back color of all the selected cells is working fine but It can not change the border color of all the selected cells of the grid. What I am doing wrong?

Here is my code:

private void dtgCpr_ViewCellFormatting(object sender, CellFormattingEventArgs e)
        {
            e.CellElement.DrawBorder = true;
            if (e.CellElement.IsSelected)
            {
                e.CellElement.BorderColor = Color.Red;
                e.CellElement.BackColor = Color.SeaShell;
            }
        }

Thanks

Regards

Zerka
Top achievements
Rank 1
 answered on 25 Jan 2011
8 answers
207 views
hi there

I bind the bindinglist<T> to the gridview. when the every custom object's property value change very ofen ,the corresponding cell's value can change also.But it take too much CPU(around 60%).
I have a custom object inherit from INotifyPropertyChanged.
The custom object have three properties, and every property's value change per 50ms.
I add 30 custom objects to the Bindinglist<T>,and bind the list to radGridview.

I use the 2010 q2 version.
Julian Benkov
Telerik team
 answered on 25 Jan 2011
5 answers
261 views
Hi,

I've looked at a few examples of this but they don't appear to work. I'm getting an error when actually assigning the image. The error is Exception has been thrown by the target of an invocation.

The code that I'm trying is:
Private Sub rgvItems_CellFormatting(ByVal sender As Object, ByVal e As CellFormattingEventArgs) Handles rgvItems.CellFormatting
    If TypeOf e.CellElement.ColumnInfo Is GridViewCommandColumn AndAlso Not (TypeOf e.CellElement.RowElement Is GridTableHeaderRowElement) Then
        Dim column As GridViewCommandColumn = DirectCast(e.CellElement.ColumnInfo, GridViewCommandColumn)
        If column.Name = "PLButton" Then
            Dim element As RadButtonElement = DirectCast(e.CellElement.Children(0), RadButtonElement)
            element.DisplayStyle = Telerik.WinControls.DisplayStyle.Image
            ' This is an example of course
            element.Image = ImageList.Images(0)
            'e.CellElement.StringAlignment = StringAlignment.Center
            'Me.ApplyThemeToElement(element, "ControlDefault")
        End If
    End If
End Sub
The line where it seems to fail is element.image = imagelist.images(0). The imagelist is an image list surprisingly enough and it has images in it. They are being used elsewhere to populate an image column in the grid view.

Is there anything obvious stands out?

Thanks
Richard Slade
Top achievements
Rank 2
 answered on 25 Jan 2011
3 answers
113 views
We have included a bunch of Telerik's controls to our windows based application. One of them is Gridview control. While creating a deployment package, we have added all the dlls that are required - one of them is Telerik.Wincontrols.GridView.dll. When we try to install our application on our client's machine, it gives us an error - Unable to load file or reference to Telerik.Wincontrols.Gridview.dll. The dll is physicially present on the machine.
What are we missing here?
Richard Slade
Top achievements
Rank 2
 answered on 24 Jan 2011
13 answers
284 views
Hi,
        I get a blank template without column headers when I set the viewdefinition for a child template to

ColumnGroupsViewDefinition. When I use the same template on the MasterTemplate, it works fine. The code I use is

 

GridViewTemplate

 

 

gvChildTemplate = new GridViewTemplate();

 

gvChildTemplate.DataSource = _ds.Tables[1];

CustomizeChildTemplate(gvChildTemplate);

gvChildTemplate.ViewDefinition = _colGroupsView;

radGridView1.Templates.Add(gvChildTemplate);

 

 

GridViewRelation relation = new GridViewRelation(radGridView1.MasterTemplate);

 

relation.ChildTemplate = gvChildTemplate;

relation.RelationName =

 

"MeasureName";

 

relation.ParentColumnNames.Add(

 

"MeasureName");

 

relation.ChildColumnNames.Add(

 

"MeasureName");

 

radGridView1.Relations.Add(relation);



_colGroupsView is set using a different method and I can assure you, it is not null when the viewdefinition is set


Thanks
Deepak
Richard Slade
Top achievements
Rank 2
 answered on 24 Jan 2011
6 answers
294 views
Hi,
i'm trying to create a SIMPLE CHART that shows a title, legend, XAxis.AxisLabel and a XAxis itens label.   XAxis.AxisLabel don't appear and instead a serie item name, appear only numbers. See attachments. What's wrong with the code below? Tks. Lourival.

RadChart1.Series.Clear()
RadChart1.ChartTitle.TextBlock.Text = "My Chart"
Dim chartSeries As ChartSeries = RadChart1.CreateSeries("2009", System.Drawing.Color.RoyalBlue, System.Drawing.Color.LightSteelBlue, ChartSeriesType.Bar)
chartSeries.AddItem(120, "")
chartSeries.AddItem(140, "")
chartSeries.AddItem(35, "")
chartSeries.AddItem(120, "")
chartSeries.AddItem(140, "", System.Drawing.Color.Red)
chartSeries.AddItem(35, "")
chartSeries.AddItem(120, "")
chartSeries.AddItem(140, "")
RadChart1.Series.Add(chartSeries)
chartSeries.Appearance.LabelAppearance.Visible = False
Dim chartSeries2 As ChartSeries = RadChart1.CreateSeries("2010", System.Drawing.Color.DarkBlue, System.Drawing.Color.LightBlue, ChartSeriesType.Bar)
chartSeries2.AddItem(120, "")
chartSeries2.AddItem(140, "")
chartSeries2.AddItem(35, "")
chartSeries2.AddItem(120, "")
chartSeries2.AddItem(140, "")
chartSeries2.AddItem(35, "")
chartSeries2.AddItem(120, "")
chartSeries2.AddItem(140, "")
RadChart1.Series.Add(chartSeries)
chartSeries2.Appearance.LabelAppearance.Visible = False
RadChart1.PlotArea.XAxis.AxisLabel.TextBlock.Text = "Months"
RadChart1.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.Red
RadChart1.PlotArea.XAxis.AddRange(1, 8, 1)
RadChart1.PlotArea.XAxis(0).TextBlock.Text = "Jan"
RadChart1.PlotArea.XAxis(1).TextBlock.Text = "Fev"
RadChart1.PlotArea.XAxis(2).TextBlock.Text = "Mar"
RadChart1.PlotArea.XAxis(3).TextBlock.Text = "Abr"
RadChart1.PlotArea.XAxis(4).TextBlock.Text = "Mai"
RadChart1.PlotArea.XAxis(5).TextBlock.Text = "Jun"
RadChart1.PlotArea.XAxis(6).TextBlock.Text = "Jul"
RadChart1.PlotArea.XAxis(7).TextBlock.Text = "Ago"
RadChart1.DataBind()

Ves
Telerik team
 answered on 24 Jan 2011
5 answers
161 views
Just a note to everyone out there. We just upgraded to Q1 2010 and suddenly the drop-down calendar on all GridViewDateTimeColumn columns in our RadGridViews started showing a "footer" (displays the current date/time and has "Clear" and "Now" buttons). None of the other similar controls (RadDateTimePicker, etc.) are doing this. This made the UI inconsistent, so I came up with code to hide the "footer" for GridViewDateTime columns:

 

    Private Sub rgvGrid_CellEditorInitialized(ByVal sender As Object, _  
                                              ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) _  
                                              Handles rgvGrid.CellEditorInitialized  
 
        If TypeOf rgvNotes.CurrentColumn Is GridViewDataColumn Then  
 
            Select Case DirectCast(rgvNotes.CurrentColumn, GridViewDataColumn).UniqueName  
 
                Case "SomeColumnName"  
 
                    Dim activeEditor As RadDateTimeEditor = TryCast(rgvNotes.ActiveEditor, RadDateTimeEditor)  
 
                    If activeEditor IsNot Nothing Then  
 
                        Dim editorElement As RadDateTimeEditorElement _ 
                            = TryCast(activeEditor.EditorElement, RadDateTimeEditorElement)  
 
                        If editorElement IsNot Nothing Then  
 
                            Dim dateTimePickerCalendar As RadDateTimePickerCalendar _ 
                                = TryCast(editorElement.GetCurrentBehavior(), RadDateTimePickerCalendar)  
 
                            If dateTimePickerCalendar IsNot Nothing Then  
 
                                dateTimePickerCalendar.Calendar.ShowFooter = False 
 
                            End If  
 
                        End If  
 
                    End If  
 
            End Select  
 
        End If  
 
    End Sub
 
Nikolay
Telerik team
 answered on 24 Jan 2011
0 answers
82 views
I solved it .
Besa
Top achievements
Rank 1
 asked on 24 Jan 2011
1 answer
255 views
Hi,
i am using PageView view mode "Strip" and it has 5 tabs in it,
I want to show the 3rd tab on my button click.
meraj
Top achievements
Rank 1
 answered on 23 Jan 2011
5 answers
214 views
Hi..
   We are using RadGridMultiColumnCombo Column in the gridview...
We have hundreds of rows in the dropdown, we want to filter them ....
 For this I have set the AutoCompleteMode To AppendSuggest And set DropDownStyle to DropDown
still i m not able to filter the records...

I want it to filter in such a way that, when i click some number it should give me all records starting with that number..
Richard Slade
Top achievements
Rank 2
 answered on 22 Jan 2011
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
Iron
Iron
Sergii
Top achievements
Rank 1
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
Iron
Iron
Sergii
Top achievements
Rank 1
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?