jqGrid client-side searching

You should implement search for single field in a little another way: var grid = jQuery(“#Grid2″); var postdata = grid.jqGrid(‘getGridParam’,’postData’); jQuery.extend (postdata, {filters:”, searchField: ‘error_column’, searchOper: ‘eq’, searchString: ‘Test’}); grid.jqGrid(‘setGridParam’, { search: true, postData: postdata }); grid.trigger(“reloadGrid”,[{page:1}]); You can see live example here. UPDATED: You use loadonce: true and datatype: “local” together. The value loadonce: … Read more

Is it possible to check dimensions of image before uploading?

You could check them before submitting form: window.URL = window.URL || window.webkitURL; $(“form”).submit( function( e ) { var form = this; e.preventDefault(); //Stop the submit for now //Replace with your selector to find the file input in your form var fileInput = $(this).find(“input[type=file]”)[0], file = fileInput.files && fileInput.files[0]; if( file ) { var img = … Read more

How to get client date and time in ASP.NET?

I like the idea of either using the browser/system time and time zone or letting them select their time zone. In a past project I used something like this: <script language=”javascript”> function checkClientTimeZone() { // Set the client time zone var dt = new Date(); SetCookieCrumb(“ClientDateTime”, dt.toString()); var tz = -dt.getTimezoneOffset(); SetCookieCrumb(“ClientTimeZone”, tz.toString()); // Expire … Read more