I am trying to create my custom gridview controls which inherit from radgridview.
The Code:
public partial class eRadGridView : Telerik.WinControls.UI.RadGridView
{
public eRadGridView()
{
InitializeComponent();
}
public eRadGridView(IContainer container)
{
container.Add(this);
InitializeComponent();
}
}
When I try to droll it from the toolbox, I get the attach error.
Please let me know what I am doing wrong.
How can I override the default mouse over backcolor (orange color) by code?
Thanks.
@{
var headerHtmlAttributes = new { style = "font-weight:bold" };
Html.Telerik().Grid<
WorkflowDashboardModel>()
.HtmlAttributes(
new { style = "text-align:center" })
.Name(
"WorkFlowDashBoardExp")
.Columns(columns =>
{
columns.Bound(d => d.SourceSystem)
.HeaderHtmlAttributes(headerHtmlAttributes);
columns.Bound(d => d.NewException)
.HeaderHtmlAttributes(headerHtmlAttributes);
}
i want to give a header column for the column headers as top one.
how can i do? please help.
private void grid_CellFormatting(object sender, Telerik.WinControls.UI.CellFormattingEventArgs e)
{
if (e.Column.Name == "Days")
{
MyObject obj = (MyObject)e.Row.DataBoundItem;
if (obj != null)
{
TimeSpan span = DateTime.Now.Date - obj.SomeDate.Date;
e.CellElement.Value = span.Days;
}
}
}