I have a GridView with a GridViewDateTimeColumn, and I have managed to figure out how to display no text in the editor when the cell value is null, however I need to also allow the user the option of setting the value to null if a value exists.
When the pop up editor appears, i cannot see a way to customize the popup or the text editor to allow this to happen.
private void gvLibrary_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
GridTimePickerEditor editor = e.ActiveEditor as GridTimePickerEditor;
if (editor != null)
{
RadTimePickerElement editorElement = editor.EditorElement as RadTimePickerElement;
editorElement.Format = "HH:mm:ss";
editorElement.NullText = "";
editorElement.NullValue = 0;
if (e.Value != null)
{
editorElement.Value = e.Value;
}
else
{
((TextBox)(editorElement.MaskedEditBox.TextBoxItem.TextBoxControl)).Text = "";
}
}
}
Can you provide me with the necessary elements to allow the user to delete values in the text box or from the pop-up and a way to ensure that the editor's null value is passed to the grid cell?
Thank you,
Vania
When the pop up editor appears, i cannot see a way to customize the popup or the text editor to allow this to happen.
private void gvLibrary_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
GridTimePickerEditor editor = e.ActiveEditor as GridTimePickerEditor;
if (editor != null)
{
RadTimePickerElement editorElement = editor.EditorElement as RadTimePickerElement;
editorElement.Format = "HH:mm:ss";
editorElement.NullText = "";
editorElement.NullValue = 0;
if (e.Value != null)
{
editorElement.Value = e.Value;
}
else
{
((TextBox)(editorElement.MaskedEditBox.TextBoxItem.TextBoxControl)).Text = "";
}
}
}
Can you provide me with the necessary elements to allow the user to delete values in the text box or from the pop-up and a way to ensure that the editor's null value is passed to the grid cell?
Thank you,
Vania