Telerik Forums
UI for WinForms Forum
4 answers
160 views
Hi all,
I have problem with Grid View. I want to group/merge 2 rows or more than two.

Example:

Profile

Test

Sample

Prepared Sample

Container

Blood Group

Blood Group

Serum

Plain Tube

Rh Type

CBCESR

Hb

RBC

PCV

MCV

MCH

MCHC


How to make it ? Please help me.

Thanks & Regards.
Nick
Telerik team
 answered on 17 Apr 2009
1 answer
92 views
Hi

After upgrading my project to 2009Q1, my winform with RadGridView cannot be loaded.  The exception is

System.NullReferenceException was unhandled
  Message="Object reference not set to an instance of an object."
  Source="Telerik.WinControls.GridView"
  StackTrace:
       at Telerik.WinControls.UI.GridDataCellElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.GridHeaderCellElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.LightVisualElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.GridTableHeaderRowElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.LightVisualElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.UI.GridTableBodyElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.UI.GridTableElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.RootRadElement.MeasureOverride(SizeF availableSize)
       at Telerik.WinControls.RootRadElement.MeasureCore(SizeF availableSize)
       at Telerik.WinControls.RadElement.Measure(SizeF availableSize)
       at Telerik.WinControls.ComponentLayoutElementTree.GetPreferredSize(Size sizeConstraints)
       at Telerik.WinControls.RadControl.GetPreferredSize(Size proposedSize)
       at System.Windows.Forms.Layout.TableLayout.InflateColumns(ContainerInfo containerInfo, Size proposedConstraints, Boolean measureOnly)
       at System.Windows.Forms.Layout.TableLayout.ApplyStyles(ContainerInfo containerInfo, Size proposedConstraints, Boolean measureOnly)
       at System.Windows.Forms.Layout.TableLayout.LayoutCore(IArrangedElement container, LayoutEventArgs args)
       at System.Windows.Forms.Layout.LayoutEngine.Layout(Object container, LayoutEventArgs layoutEventArgs)
       at System.Windows.Forms.Control.OnLayout(LayoutEventArgs levent)
       at System.Windows.Forms.ScrollableControl.OnLayout(LayoutEventArgs levent)
       at System.Windows.Forms.TableLayoutPanel.OnLayout(LayoutEventArgs levent)
       at System.Windows.Forms.Control.PerformLayout(LayoutEventArgs args)
       at System.Windows.Forms.Control.PerformLayout()
       at PopularIT.MOSES.POS.UI.frmInvList.InitializeComponent() in C:\Projects\MOSES.POS\MOSES.POS\UI\frmInvList.Designer.cs:line 610
       at PopularIT.MOSES.POS.UI.frmInvList..ctor() in C:\Projects\MOSES.POS\MOSES.POS\UI\frmInvList.cs:line 21
       at PopularIT.MOSES.POS.UI.frmMain.btnInvList_Click(Object sender, EventArgs e) in C:\Projects\MOSES.POS\MOSES.POS\UI\frmMain.cs:line 126
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at PopularIT.MOSES.POS.Program.Main() in C:\Projects\MOSES.POS\MOSES.POS\Program.cs:line 82
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

It worked before upgrade.  What is wrong?
Edwin 
Nick
Telerik team
 answered on 17 Apr 2009
1 answer
225 views
Hi,

I've got a gridview with a 3level hierarchy.

When loading the view with :

first level: 300 elements
second level: 10 elements
third level: 5 elements

the load goes fast.

But if I'm trying the following load:

first level: 2100 elements
second level: 10 elements
third level: 5 elements

the load goes slow...

I think I had to wait for 10 - 15 minutes before everything was loaded.

Is this due to bad programming or something else?

my code:

var sortedByLft = from c in network 
                  where (c.Rgt - c.Lft) == 1 
                  orderby c.Name ascending 
                  select c; 
 
var checkNetwork = new List<Network>(); 
//display the unique items in the gridview 
foreach (var item in sortedByLft) 
{     
    Application.DoEvents(); 
    //check if item is already added 
    var check = checkNetwork.Find(p => p.Adserver_id == item.Adserver_id); 
    if (check != nullcontinue
    checkNetwork.Add(item); 
    Application.DoEvents(); 
 
    rgvAdlPositions.MasterGridViewTemplate.Rows.Add(new object[] { item.Adserver_id, item.Name }); 
    var template = rgvAdlPositions.MasterGridViewTemplate.ChildGridViewTemplates[0]; 
    foreach(var position in item.Positions) 
    { 
        Application.DoEvents(); 
        //get the method as string 
        var method = Enums.GetMethod(position.Method); 
        //add to row 
        template.Rows.Add(new object[] 
                              { 
                                  item.Adserver_id, position.PosId, 
                                  ownFunctions.ConcatStrings(new List<string
                                                                          { 
                                                                              position.Name, 
                                                                              position.Width.ToString(), 
                                                                              "x"
                                                                              position.Height.ToString() 
                                                                          }), 
                                  method 
                              }); 
        var templateAd = template.ChildGridViewTemplates[0]; 
        foreach(var adPos in position.adserverPositions) 
        { 
            //add adserved position to row 
            templateAd.Rows.Add(new object[] { item.Adserver_id, position.PosId, adPos.name }); 
        } 
    } 

Is it possible that the lines 12 and 28 are the bad ones?
the first one is checking if I have unique elements and the second one is calling a static function to concatenate a list of strings.

Thanks a lot in advanced


Julian Benkov
Telerik team
 answered on 17 Apr 2009
5 answers
152 views
Hello sir,
              In my project  i am using a Microsoft Web browser and i want to use RadScrollbar instead of default one. I don't know how to use RadScrollbar instead of default one. Do you have any resource for my reference .
Mike
Telerik team
 answered on 17 Apr 2009
2 answers
666 views
I've got an interesting situation that I'm having a bit of trouble with and I was hoping someone could help me out.

I'm using a GridView to display a Key->Value pair, where the data type can vary between Integers, Strings, Currency, and DateTime.

I am catching the CellFormatting event in GridView and am able to properly draw the controls for each data type without much trouble, but I need a way to stop text from being typed into certain cells...

I know it can be done with a GridViewMaskBoxColumn, but as I've said - I have many different types of data, so that doesn't apply here.

My first intention was to use a RadSpinElement, which seemed to work at first, however when the data changes and it redraws itself, the text/number area of the element moves about 5 pixels to the left and is very annoying.  I've tried setting several layout and sizing options for the element, but can't seem to get it to draw correctly..

My second choice was to use a Masked Text Box element, but apparently the Masking feature that I need is in the Control, and not the element, so that won't work either..

Does anyone have any suggestions?

Thanks.
Julian Benkov
Telerik team
 answered on 17 Apr 2009
2 answers
158 views
Hi there,
I added a RDDB (trial version) to my form with text (allignment: middle centre) and an image (icon, textimagerelation: overlay). All well. But the icon is placed (by default) completely to the left (on the edge) of the buttom. Not nice. So I tweeked it a little (Edit UI Elements). Set the ImagePrimitive location to 20,0. Ah, great, exactly the position of the icon I want on the button! Tthat is, in design view. When I run the form, the icon is back to its old position, at the edge of the button.  
How to resolve?

Regards,
Peter.

Nikolay
Telerik team
 answered on 17 Apr 2009
1 answer
151 views
Hi, I just upgraded my project to the latest 2009 Q1 release of RadControls for WinForms.  But I am running into some issues with some of the controls, maybe because it is not backwards compatible.  I am not able to find out where the information is to make the current control comply with the latest release, if someone can point me to the right direction that would greatly appreciated.

Thanks in advance.
Mike
Telerik team
 answered on 17 Apr 2009
1 answer
50 views
I would like to cut and paste a chunk from one tab to another. Is this possible.
Peter
Telerik team
 answered on 17 Apr 2009
7 answers
344 views
for WinForms, - does that exist?

Regards, Jill-Connie Lorentsen
Ves
Telerik team
 answered on 17 Apr 2009
1 answer
137 views
I have an application that uses floating dockpanels.

I have noticed that there seems to be a maximum width equal to the screen resolution width even when
I have not set any maximum or minimum values for the size of the dockpanel window.

I assume this is a built in behavior ? I have tested at multiple resolutions and get the same result.
Is there a way to override this behavior ?
Julian Benkov
Telerik team
 answered on 17 Apr 2009
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?