How can I add default value to RAD gridview.Which is the equivalent event for InitializeLayout in infragistics.
I need to modify the below code to silverlight in view model.Is there any DefaultValue property ?
protected void grdProjectIterations_InitializeLayout(object sender, LayoutEventArgs e)
{
IEnumerator<Iteration> iterEnum = getalliteration.GetEnumerator();
int i = 0;
//Finding the current row
while (i < getalliteration.Count)
{
++i;
iterEnum.MoveNext();
}
Iteration iter = iterEnum.Current;
//Finding the duration of the project
if (SessionHelper<Project>.GetObjectFromSessionBag(SessionConstants.Project).ProjectId != 0)
{
Project projectWithDuration = CollectionUtil.getProjectForId(SessionHelper<Project>.GetObjectFromSessionBag(SessionConstants.Project).ProjectId);
//Method to create iteration with default values
_presenter = new ProjectIterationsViewPresenter(this);
Iteration newIteration = _presenter.CreateNewIteration(projectWithDuration, iter);
_iterationNo = newIteration.IterationNumber;
e.Layout.Bands[0].Columns.FromKey("IterationNumber").DefaultValue = _iterationNo;
e.Layout.Bands[0].Columns.FromKey("EndDate").DefaultValue = newIteration.EndDate;
e.Layout.Bands[0].Columns.FromKey("StartDate").DefaultValue = newIteration.StartDate;
e.Layout.Bands[0].Columns.FromKey("NoOfWorkingDays").DefaultValue = newIteration.NoOfWorkingDays;
hdIterationDuration.Value = newIteration.NoOfWorkingDays.ToString();
hdActualItDuration.Value = projectWithDuration.IterationsDuration.ToString();
}
e.Layout.Bands[0].Columns.FromKey("IterationMainGoal").Header.Caption = "Iteration Goal" + "<span style='color:Red;'>*</span>";
e.Layout.Bands[0].Columns.FromKey("EndDate").Header.Caption = "End Date" + "<span style='color:Red;'>*</span>";
e.Layout.Bands[0].Columns.FromKey("IterationStatusID").Header.Caption = "Status" + "<span style='color:Red;'>*</span>";
}
Regards,
Sulagna