Skip to content

Replies

0
Michael Xu
Michael Xu answered on Jan 22, 2013 11:58 PM

I used the maxLength option in the text editor to set the limit of the maximum number of the characters that can entered in the cell. thanks.

0
Michael Xu
Michael Xu answered on Dec 13, 2012 8:30 PM

Hi Martin,

I would like to add button to every alternate column in the row. I saw this post that you suggest to use column template. As I know that one can achieve the same with rowTemplate. I am just wondering what is the best practice and what are the difference between the two. Thanks.

0
Michael Xu
Michael Xu answered on Dec 6, 2012 6:45 PM

I had tried with the datetype = "date" and datatype = "datetime" with different format but it is still not working. Using datatype: "datetime" and format: "date", the result becomes "2006-05-29T00:00:00". Using datatype: "date" and format: "MM/dd/yyyy", the result becomes "NaN/NaN/NaN". The original datatype in the database is datetime, and I check the data is correctly serialized to JSON with "2006-05-29T00:00:00". I just need to format it to display the date only. I think it should be possible. Please help.

0
Michael Xu
Michael Xu answered on May 1, 2012 6:54 PM

I saw your answer. I tried and it works. Then I tried to move the same logic to Javascript to do client side row hiding because I do not want to have postback to the server. However, it does not work. My code snippet is below. Could you be so kind to let me know why the following does not work? Thanks.

 

var templateGrid = $find(m_templateGridId);
var rowsLength = templateGrid.get_rows().get_length();

 
                 for (var i = 0; i < rowsLength; i++) {
 
                     var currentRow = templateGrid.get_rows().get_row(i);
                     currentRow.CssClass = "hiderow";
                   }

The style looks like this.

.hideRow {
	visibilityhidden;
	displaynone;
}