Hello all,
I have a form which has 7 grids, one grid per weekday.
For each grid I dynamically create a datatable because the column layout can change.
I use a HeaderTemplate because I need to merge headers, an ItemTemplate and an EditTemplate.
The form is displayed correctly, however I’d like all rows to be directly in EditMode, which I set in the PreRender event.
When I then trigger the Rebind event, it takes endlessly (up to 40 seconds) until the form is displayed. If I disable the EditMode, it’s displayed right away. (See attached pictures)
Any help would be appreciated.
Ulrich
Hi,
I have created a custom GridColumnEditor that extends GridTextColumnEditor. My custom editor holds a composite control (consisting of a textbox and some other controls) that is used for editing the value. The composite controls shows up with the correct value when I press the edit button, but I have problems extracting the new value when I press the save button, I always get the old value.
I use the following for extracting the new value: (EditItem.Value (which is the textbox value) always has the old value)
List<UIPhaseItem> items = new List<UIPhaseItem>();
foreach
(GridColumn column
in
e.Item.OwnerTableView.RenderColumns)
{
if
(column
is
IGridEditableColumn)
{
IGridEditableColumn editableCol = (column
as
IGridEditableColumn);
if
(editableCol.IsEditable)
{
IGridColumnEditor editor = editManager.GetColumnEditor(editableCol);
if
(editor
is
CustomColumnEditor)
{
items.Add(((CustomColumnEditor)editor).EditItem);
}
}
}
}
Any ideas?
Below is my custom column editor.
public
class
CustomColumnEditor : GridTextBoxColumnEditor
{
Public UIPhaseItem EditItem {
get
;
set
;}
public
CustomColumnEditor(UIPhaseItem item,
long
id)
{
this
.EditItem = item;
this
.EditItem.Enabled =
true
;
this
.EditItem.Visible =
true
;
this
.EditItem.ID = id.ToString();
}
protected
override
void
AddControlsToContainer()
{
this
.ContainerControl.Controls.Add(EditItem);
}
protected
override
void
LoadControlsFromContainer()
{
this
.EditItem = (UIPhaseItem)
this
.ContainerControl.Controls[0];
}
}