Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
515
format dates in rowedittemplate textbox with RowEditingClientBinding
posted

I have a WebHierarchicalDataGrid that I dynamically build the boundcolumns and the rowedittemplate. When I add the RowEditingClientBinding, if the date in the bound column is empty the grid shows nothing in the column which is correct, but when the RowEditTemplate opens, in my textbox it displays the word "null". Also if the date is in the bound column is in short date format, when the RowEditTemplate opens, the date is displayed in long format. So how do I not show nulls and long dates in my textbox in the row edit template? I need a server side example only.

 

 

var item = new RowEditingClientBinding

 

 

{

ColumnKey = dataFieldName,

ControlID = clientId,

GetValueJavaScript =

 

 

"$get('" + clientId + "').value"

,

SetValueJavaScript =

 

 

"$get('" + clientId +

"').value={value}"

};

Grid.GridView.Behaviors.EditingCore.Behaviors.RowEditTemplate.ClientBindings.Add(item);