Hi,
I am displaying few dates in a webdatagrid to my user. They were added as Sting type columns. Now the user want to edit the date from grid and want to be presented with a Calendar control when he clicks the this column to select the date he desired.
Is it possible at all to display this on user clicking the date columns in Datagrids?
Thanks,
Prabha.
Hello Prabha,
Could you provide sample demonstrating this issue, so I can investigate further?
Thanks Denis,
I tried and it appears on my Page, but when I change the Date using the Calendar Control, it throws the following error
Async request failed
[ArgumentException]: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.
at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)
at System.Array.CopyTo(Array array, Int32 index)
at Infragistics.Web.UI.Framework.ObjectBase.LoadPositionalProperties(Object[] values)
at Infragistics.Web.UI.Framework.ObjectBase.LoadClientProperties(Object[] props)
at Infragistics.Web.UI.Framework.ObjectBase.LoadClientState(Object[] oData)
at Infragistics.Web.UI.Framework.RunBot.HandleOnInit(HttpContext context)
at Infragistics.Web.UI.EditorControls.TextEditorRunBot.HandleOnInit(HttpContext context)
at Infragistics.Web.UI.Framework.ControlMain.OnInit(EventArgs e)
at Infragistics.Web.UI.EditorControls.WebTextEditor.OnInit(EventArgs e)
at System.Web.UI.Control.InitRecursive(Control namingContainer)
at System.Web.UI.Control.AddedControl(Control control, Int32 index)
at System.Web.UI.ControlCollection.Add(Control child)
at Infragistics.Web.UI.GridControls.EditorProviderBase.Infragistics.Web.UI.ICollectionObject.OnAddedToCollection(ObjectCollection owner)
at Infragistics.Web.UI.Framework.ObjectCollection.InternalInsert(Int32 index, ICollectionObject collectionObject)
at Infragistics.Web.UI.Framework.ViewStateJournal.LoadJournalState(ObjectCollection objectCollection, String actions)
at Infragistics.Web.UI.Framework.ObjectCollection.LoadViewState(Object savedState)
at Infragistics.Web.UI.Framework.ObjectCollection.System.Web.UI.IStateManager.LoadViewState(Object savedState)
at Infragistics.Web.UI.GridControls.WebDataGrid.LoadViewState(Object savedState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
[HttpUnhandledException]: Exception of type 'System.Web.HttpUnhandledException' was thrown.
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.default_aspx.ProcessRequest(HttpContext context) in c:\Users\pavankka\AppData\Local\Temp\Temporary ASP.NET Files\root\b51783cb\a3e13343\App_Web_uqfvdnnu.1.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Any Idea of why is this Happening?
You can set your column to be of type Date and use DatePicker as editor provider.
For more refer to following sample and article.