or
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Windows.Forms;
using
RadDockMemoryTest.ViewModel;
namespace
RadDockMemoryTest.View
{
public
partial
class
Form1 : Form
{
private
MainViewModel viewModel;
/// <summary>
/// View Model object
/// </summary>
public
MainViewModel ViewModel
{
get
{
if
(viewModel ==
null
)
{
ViewModel =
new
MainViewModel();
}
return
viewModel;
}
set
{ viewModel = value; }
}
/// <summary>
/// Form default constructor
/// </summary>
public
Form1()
{
InitializeComponent();
}
/// <summary>
/// Form load event handler
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private
void
Form1_Load(
object
sender, EventArgs e)
{
setupControlBindings();
}
/// <summary>
/// Setup window's control bindings
/// </summary>
private
void
setupControlBindings()
{
radDock1.DockWindows[
"toolWindow1"
].DataBindings.Add(
"DockState"
, ViewModel,
"ToolWindow1DockState"
,
true
, DataSourceUpdateMode.Never);
}
}
}
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
using
Telerik.WinControls.UI.Docking;
namespace
RadDockMemoryTest.ViewModel
{
public
class
MainViewModel : ViewModelBase
{
private
DockState toolWindow1DockState;
/// <summary>
/// Controls toolWindow1's dock state
/// </summary>
public
DockState ToolWindow1DockState
{
get
{
return
toolWindow1DockState; }
set
{
toolWindow1DockState = value;
OnPropertyChanged(
"ToolWindow1DockState"
);
}
}
}
}
Hi
I would like to build an application like the Integration Business cards example Could you tell me how to construct or add a gallery to a form?
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;
radGrid.Rows[1].Cells[1].Style.BackColor = System.Drawing.Color.Red;
radGrid.Rows[1].Cells[1].Style.ForeColor = System.Drawing.Color.Red;