Telerik Forums
UI for WinForms Forum
0 answers
110 views
' Comunicação com a Camada BLL 
 
        Dim obj As New EspecialidadesBLL 
 
        especialidadesDataGridView.DataSource = obj.Listagem() 
 
 
 
        ' Atualizando os objetos TextBox 
 
        idesp.Text = especialidadesDataGridView(0, especialidadesDataGridView.CurrentRow.Index).Value.ToString() 
 
        TextBox16.Text = especialidadesDataGridView(1, especialidadesDataGridView.CurrentRow.Index).Value.ToString() 
 
        TextBox6.Text = especialidadesDataGridView(2, especialidadesDataGridView.CurrentRow.Index).Value.ToString() 


hi all

now i'm using telerik winform Q3 2009

in this code above, i dont have any error when using datagridview, but when i want to use radgridview i get this error:


Error 1:    Class 'Telerik.WinControls.UI.RadGridView' cannot be indexed because it has no default property. 

 Error 2:    'Index' is not a member of 'Telerik.WinControls.UI.GridViewRowInfo'.   

how can i solve this error????????????


rizu mussa
Top achievements
Rank 1
 asked on 04 Feb 2010
5 answers
588 views
Hey folks,

I figure if there is any way to hide repeated cell values in my grid. I attached a screenshot and want to hide the redundant information in the first 3 columns. I am wondering if there might be an intelligent way of doing with the grid control.

Has anybody of you guys a cool idea to me?

I attached a screenshot which shows my actual grid and a grid which looks like it should be.
At this moment I do not have any idea except of iterating thorugh the rows. Additonally the difficulty is that this is a hierachy grid which is bound to the childtemplate by the first thre rows. So the best way should be formatting the cells with the fore color white, right?

Any thought?! ;)

Thanks in advance.

Best

Svett
Telerik team
 answered on 04 Feb 2010
1 answer
1.1K+ views
Hi,

I have hierarchical RadGridView where MasterGridViewTemplate.AutoExpandGroups is set to False. Code for binding is like this.
PatientGridView.DataSource = currentPatientList
GridGroupByExpression patientExpression = new GridGroupByExpression(); 
patientExpression.Expression = "FullName as FullName format \"{1}\" Group By OrderID"; 
PatientGridView.MasterGridViewTemplate.GroupByExpressions.Add(patientExpression); 

After binding I want to programatically expand some groups by certain condition. I have tried with following code but it doesn't work:

            foreach (GridViewRowInfo row in PatientGridView.Rows) { 
                if (someCondition == true) { 
                    row.IsExpanded = true
                    row.IsSelected = true
                    PatientGridView.GridNavigator.SelectRow(row); 
                } 
            } 


Can you advise how to programmatically expand specific group in RadGridView where all groups are collapsed by default?

Regards,
Tomislav
Nikolay
Telerik team
 answered on 04 Feb 2010
5 answers
348 views
hi
iam trying to add some rows in code
the firsr row is added alone then ina loop all other rows are added
but the grid acts in very stupid way that its added the firts row and adds all other row on top of it
i have chnaged the way the new row added to buttom and also tried the top but nothing works
can u plz help couse iam very unhappy using this grid and if some more problems appears i will throw it away
Nick
Telerik team
 answered on 04 Feb 2010
4 answers
199 views
I've migrated a winform project to the 2009.3.9.1203 version of your controls and I have several issues:

- I can't open a form in VS designer, it says:
 System.InvalidCastException: Unable to cast object of type 'Telerik.Charting.Styles.Unit' to type 'Telerik.Charting.Styles.Unit'.
The error occurs with these lines:

chartMarginsTitle1.Bottom = ((Telerik.Charting.Styles.

Unit)(resources.GetObject("chartMarginsTitle1.Bottom")));

 


- my RadGrids lose their Size property, their width takes big big values, and I need to reset them manually....
Nick
Telerik team
 answered on 04 Feb 2010
1 answer
160 views
Hi All,
          I have check boxes in the gridview for each row. When i checked a particular row's checkbox the enrire row should be selected. It is working but when i checked another checkbox, the previous checked row is not selecting. Only current row is selected. I need to select all the rows which i have checked.

I tried in this way,

            

 

private void GridView_MouseUp(object sender, MouseEventArgs e)

 

{

    for

(int i = 0; i < GridView.Rows.Count; i++)

 

    {
        if (GridView.Rows[i].Cells["chk"].Selected == true) //CellElement.RowInfo.IsSelected)

 

    {

 

        //GridView.Rows[i].Cells["chk"].RowInfo.IsSelected = true; 
        GridView.Rows[i].Cells["chk"].CellElement.RowElement.IsSelected = true;

 

    }

 

    else //if (Convert.ToBoolean(GridView.Rows[i].Cells["chk"].RowInfo.IsSelected))

 

    {

 

 

        //GridView.Rows[i].Cells["chk"].RowInfo.IsSelected = false;

 

        GridView.Rows[i].Cells[

"chk"].CellElement.RowElement.IsSelected = false;

 

    }

}                   

i tried with mousedown and mouse click also. It is not working.
note: The checkbox column is added to grid programatically.



       

Jack
Telerik team
 answered on 04 Feb 2010
1 answer
138 views
I have a dialog box with a number of checkboxes.  All have text that is entered and visible in design mode but at runtime half of them do not display the text.  Any thoughts?

TIA
Dobry Zranchev
Telerik team
 answered on 04 Feb 2010
1 answer
110 views
Hi,

I am using a tree view with parent child nodes, and have out the tab order of treeview , however it doesnt work.

I want tab should put focus on the treeview and i should be able to move through nodes using tab itself.

Thanks for help in advacne

Anuj
Victor
Telerik team
 answered on 04 Feb 2010
1 answer
183 views
I'm getting an exception in a RadForm based class with the following call stack:

The operation completed successfully
   at System.Drawing.BufferedGraphicsContext.CreateCompatibleDIB(IntPtr hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
   at System.Drawing.BufferedGraphicsContext.CreateBuffer(IntPtr src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)
   at System.Drawing.BufferedGraphicsContext.AllocBuffer(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
   at System.Drawing.BufferedGraphicsContext.AllocBufferInTempManager(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
   at System.Drawing.BufferedGraphicsContext.Allocate(IntPtr targetDC, Rectangle targetRectangle)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at Telerik.WinControls.UI.RadFormControlBase.WndProc(Message& m)
   at BPCommon.BPForm.WndProc(Message& m)
   at BPMonitorWall.BackgroundWnd.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

BackgroundWnd is a very simple window that just shows a solid background color.  It is based on RadForm.  Unfortunately, I can't provide a simple code sample to make this happen.  It can occur after many hours of operation doing lots of different things.  I found the following discussion on this type of error:

http://nomagichere.blogspot.com/2008/03/systemcomponentmodelwin32exception-is.html

However, I don't know if it's applicable.  I couldn't find a call to CreateGraphics in your source code in the RadForm project.  I don't call CreateGraphics in my code either.  Have you seen this issue before or have any idea what could cause it (or fix it)?



Deyan
Telerik team
 answered on 04 Feb 2010
3 answers
185 views
I am building an MDI application, in which i want to add tabs specific to the active mdi window to the ribbonbar.
I got this working by capturing the window's activated event. When a window is activated it removes the tabs associated with the previous active window, and adds new tabs which are associated with the new window. After the new tab(s) are added I activate one by using the tab.IsSelected property.

This works, however for some reason the title of the tab isn't highlighted if i switch between MDI windows.
For example, I open a window which lists orders for example. The associated tab gets added, selected, and is properly highlighted. If I then click on an order, it opens a detail window. The detail window gets activated, so the tab associated with the "order list" window gets removed, and a new tab gets added. Again, the tab is properly added, selected and highlighted. If i now select the "order list" window again, the "order detail" tab gets removed, the "order list" tab is added, and gets selected. However, for some reason it doesn't highlight the tab title.

Any ideas what might be causing this peculiar behaviour? As far as i know i'm not capturing "lost focus" events which might cause problems.
Nikolay
Telerik team
 answered on 04 Feb 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)
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?