public string Query(string gridObj) { con.Open(); var time = DateTime.Now.TimeOfDay.ToString(); SqlCommand insert = new SqlCommand("INSERT INTO StateStore (States,CurrentTime ) VALUES('" + gridObj + "','" + time + "')", con); insert.ExecuteNonQuery(); con.Close(); return time; |
$.ajax({ type: "POST", url: "Home/Query", data: { "gridObj": object}, success: function (data, status, xhr) { $('#btnSaveCustom').prop('disabled', false); var TempData = []; var obj = $('#list').ejDropDownList("instance"); if (!ej.isNullOrUndefined(obj.model.dataSource)) TempData = obj.model.dataSource; TempData.push({ DataTime: data, text: data }); $('#list').ejDropDownList("destroy"); $('#list').ejDropDownList({ dataSource: TempData })
}, error: function (xhr, status, error) { $('#btnSaveCustom').prop('disabled', false); |
public string Restate(string dropObject) { if (con.State != System.Data.ConnectionState.Open) con.Open(); SqlCommand take = new SqlCommand("SELECT States FROM StateStore WHERE CurrentTime ='" + dropObject +"'", con); SqlDataAdapter da = new SqlDataAdapter(take); DataTable dt = new DataTable(); da.Fill(dt); con.Close(); return dt.Rows[0]["States"].ToString(); $.ajax({ type: "POST", url: "Home/Restate", data: {"dropObject": value}, success: function (data) { var obj = JSON.parse(data); gridObj.model.filterSettings.filteredColumns = obj.filterCol; //Applying all filter collection to Grid gridObj.model.sortSettings.sortedColumns = obj.sortedCol; //Applying all sort collection to Grid gridObj.model.columns = obj.cols; //Assigning the state column object to grid model gridObj.model.searchSettings = obj.searchKey; gridObj.model.groupSettings.groupedColumns = obj.groupedCol;
gridObj.columns(gridObj.model.columns); }, error: function (xhr, status, error) {
|
function saveState(args) { //When the save state button is clicked var gridObj = $("#FlatGrid").ejGrid("instance"); for (var j = 0; j < gridObj.model.columns.length; j++) { gridObj.model.columns[j].width = gridObj._columnsWidthCollection[j]; //assigning the column width with the modified column width } . . . . . |
Hi Rafael,,
We regret for the inconvenience caused.
We are facing some issues while resizing columns from client side so we have logged a issue report on this. Also we have created a support incident under your account to track the status of this issue.
Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Please let us know if you require further assistance on this.
Regards,
Jayakumar Duraisamy