Telerik Forums
UI for WinForms Forum
3 answers
252 views
Hello,

I am trying to divide the column header of some columns in two with the HtmlViewDefinition of the RadGridView. My table is not so complex for the moment but I just can't make it work....

I attached an Excel file screenshot to this message so you can have a look to what I want to do and below is the code I wrote so far:

radGridViewSaleReport.DataSource = myList; //binding list
 
 
HtmlViewDefinition view = new HtmlViewDefinition();
 
view.RowTemplate.Rows.Add(new RowDefinition());
view.RowTemplate.Rows.Add(new RowDefinition());
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Customer Name"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Unit"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Unit Type"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Unit Area"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Price/Sq.M."));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Selling Price"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Initial booking"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Booking"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Signing Contract"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Contract signed"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Transfer"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Sale"));
view.RowTemplate.Rows[0].Cells.Add(new CellDefinition("Comment"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Amount"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Date"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Amount"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Date"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Amount"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Date"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Amount"));
view.RowTemplate.Rows[1].Cells.Add(new CellDefinition("Date"));
 
view.RowTemplate.Rows[0].Cells[0].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[1].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[2].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[3].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[4].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[5].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[9].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[11].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[12].RowSpan = 2;
view.RowTemplate.Rows[0].Cells[6].ColSpan = 2;
view.RowTemplate.Rows[0].Cells[7].ColSpan = 2;
view.RowTemplate.Rows[0].Cells[8].ColSpan = 2;
view.RowTemplate.Rows[0].Cells[10].ColSpan = 2;
 
radGridViewSaleReport.Update();
this.radGridViewSaleReport.ViewDefinition = view;
this.radGridViewSaleReport.TableElement.CellSpacing = -1;
this.radGridViewSaleReport.TableElement.RowSpacing = -1;

I have a binding list full of data in it which I give to the radgridview and then I define the view and apply the view to the radgridview after updating it.

With this code, the radgridview look like the screenshot radgridview result.

Any idea how to display the data correctly into the radgridview?

Thanks,
LB
Jack
Telerik team
 answered on 20 Jan 2012
1 answer
149 views
Hello,
I downloaded Telerik Q2 2011 Demos and Telerik reporting Q2 2011 Demos , and I created a C# winform project (about 30 Radforms including Radcontrols and 10 telerik reports).
Due to some reasons, I decided to uninstall both telerik and telerik reporting.
the problem is how can i change or convert my projectcontrols and forms from Radcontrols and Radforms to the standard Microsoft controls, without rebuilding it from scratch using the standard Microsoft controls and styles provided by Visual Studio.

If there's a manual way to do it I am okay with it, I am sure it would be better than writing everything from scratch.

Thanks in advanced 

Jack
Telerik team
 answered on 20 Jan 2012
9 answers
1.6K+ views
Hi,

I want to set the style of a grid cell at runtime. I am passing the radgridview control as a reference to a helper class and based on some values i am setting the background color of a cell as follows, but it does not work.

radGrid.Rows[1].Cells[1].Style.BackColor = System.Drawing.Color.Red;

Whereas setting the ForeColor the same way works.

radGrid.Rows[1].Cells[1].Style.ForeColor = System.Drawing.Color.Red;


Please advice.
thanks
Nikolay
Telerik team
 answered on 20 Jan 2012
7 answers
182 views
Hi there,

I have just upgraded my project to Q3 2011 controls and I'm having a problem with theme rendering.
I'm probably missing something really obvious, but I've tried as much as I can to fix it and nothing is helping.
Here's the situation:

Winform project (vs.net 2010/.net 4.0)
Upgraded to Q3 controls (still have the Q2 tools installed), ran the Telerik upgrade wizard inside Visual Studio - everything finished fine, ALL Telerik references are pointing to 2011.3.11.1116 versions of the .dll's.
There are no compilation errors or warnings at all in my project.

The problem is that the themes don't render correctly at run time - almost like the themes are missing or something. I've added the TelerikMetroBlueTheme control to my radform, set the theme properties for the form and the controls to that Theme, but at runtime, there's no close/min/max buttons on the form and the other controls on the form aren't rendering correctly.

Attached is a screenshot of what the designtime and runtime rendering looks like. The runtime is obviously not rendering correctly.

If I create a brand new project and add a theme and a form, then it renders correctly - just not for my existing project for some reason. Is Telerik hanging on to something somewhere, or could you point me in the right direction of where to look. Not had this issue before.
Nikolay
Telerik team
 answered on 20 Jan 2012
1 answer
109 views
Hi,
I was just wondering if it was possible to reduce the size of Telerik dll...

I even don't know if I have access to SourceCode but I guess I have.

If I have, knowing I only use:
RibbonBar control and its childs
RadLabel
RadTextBox
RadListView
RadDropDown
RadButton
Theme

Would it be possible to clean the dll of all others non dependant controls to have a lighter assembly?
Nikolay
Telerik team
 answered on 19 Jan 2012
3 answers
93 views
Hi
i am using chart control with legends.
is RighttoLeft property available for chart control.
when i set RightToLeft, the legend should be displayed at left side.

please find the attached screen shot for my requirement. i need to move atleast legend

Thanks
hema

Evgenia
Telerik team
 answered on 19 Jan 2012
1 answer
109 views
Hi! I had use the method of ViewDefinition. Where i can make column group.
The problem after the Grid show all my data its only read only... i can't do editing on particular row cell like normal.
Normally if i want particular columns is readonly then it won't able to edit. But with viewdefinition i didn't set any readonly via code.
May i know how can i do editing? Im using VB.NET 2010.
i code it like: http://www.telerik.com/help/winforms/gridview-viewdefinitions-column-groups-view.html

Hope to get the reply soon.

Thank you!

Regards
Johnny.
Johnny
Top achievements
Rank 2
 answered on 18 Jan 2012
1 answer
74 views

I have a chart that shows percent.  I would like the Y axis to show 0 through 100 if the maximum value in the series is less than 100.  If the maximum value is greater than 100 then I would like the chart to automaticaly scale the Y axis.

I thought that I could use Telerik.Charting.ChartSeriesCollection.GetMaxYValue() method, however it is not working as I expect.  The value it returns is Infinity, not the maximum value. This is how I am trying to achomplish.

if(chart.Series.GetMaxYValue() <= 100)
{
     chart.PlotArea.YAxis.MaxValue = 100;
     chart.PlotArea.YAxis.Appearance.TextAppearance.TextProperties.Color = Color.Black;
}
else
 {
     chart.PlotArea.YAxis.AutoScale = true;
     chart.PlotArea.YAxis.Appearance.TextAppearance.TextProperties.Color = Color.Red;
}

However when the maximum value is less than 100, I never get inside the IF startment, it always bounces to the ELSE.

To diagnose, I put the following line of code in so I can se the value returned by GetMaxYValue().

var x = chart.Series.GetMaxYValue();

Inside the debugger I can see the value of x is Infinity.

Any thoughts on what I'm doing wrong?  Is there a better way to achomplish this?

Thanks,

Chris

Yavor
Telerik team
 answered on 18 Jan 2012
1 answer
111 views
Hi, 

Is it possible to do a one to one relationship on a gridview to show the data hierarchically? If this is, would it be possible to let me know how please.

Thanks

Ivan Petrov
Telerik team
 answered on 18 Jan 2012
3 answers
243 views
Hi,

        I want to show new row at the top of gridview.How can I do ?

With Regards,
Aung Zaw Thant
Stefan
Telerik team
 answered on 18 Jan 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
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?