jQWidgets Forums
Forum Replies Created
-
Author
-
June 2, 2016 at 7:24 am in reply to: getrowdatabyid returns 'undefined' after refreshing source getrowdatabyid returns 'undefined' after refreshing source #84833
Wow. You are so clear with your explanation, Dimitar! I wish all responses to questions were this clear. THANK YOU!
This doesn’t do what I want.
setcellvalue changes the cell value. I don’t want to change the cell value.
I want to change the rendered text of the cell. And I want to do so after the grid has already been rendered, through some other functions that is triggered later on.
June 1, 2016 at 5:04 pm in reply to: getrowdatabyid returns 'undefined' after refreshing source getrowdatabyid returns 'undefined' after refreshing source #84814Thanks, Dimitar.
I know that I can reference the grid’s original source from another function (outside the grid’s script block) by doing this:
var source = $(‘#jqxgrid_AvalCS’).jqxGrid(‘source’);
But how do I reference the original jqxDataAdapter?
June 1, 2016 at 1:33 am in reply to: getrowdatabyid returns 'undefined' after refreshing source getrowdatabyid returns 'undefined' after refreshing source #84778I found the quick fix: by also re-entery the id of the source (source.id = Whatever).
This is a bit inconsistent though: that the control assumes that the field definition hasn’t changed, and yet requires the user to re-enter the id upon reload.
May 29, 2016 at 5:23 pm in reply to: Tooltip autoHide Not Working as Expected Tooltip autoHide Not Working as Expected #84726Peter, I am just following YOUR advice on how to create the tooltip for the cells (http://www.jqwidgets.com/community/topic/grid-tooltip/). If this is not the correct approach, then perhaps the thread should be updated and commented as such.
I have looked through the site for weeks. There are many examples of creating tooltips for the column, for simply using the cell value as the tooltip content, but I am not able to find an example that shows the following:
1. Create a tool tip that shows different content (NOT just the cell value) for each and every cell.
2. Being able to not only set the initial content of the tooltip during grid creation/rendering, but to change it AFTER the grid is rendered, by some other function that is outside the $(document).ready(function () {}) block where the grid is created.Thanks.
Please ignore. Stupid questions. I justed got the rowdata and updated it.
May 23, 2016 at 5:56 pm in reply to: Tooltip autoHide Not Working as Expected Tooltip autoHide Not Working as Expected #84562Thanks, Peter. I basically was following an example from one of the demo on how to integrate the tooltip with the grid. In that demo, the line:
$(“#jqxGrid_StdInCS”).jqxTooltip({ content: tooltipContent });
was placed inside the cellhover function. Is this what you meant by me re-creating the tooltip? Is there a way to just update the tooltip content when I move the mouse from cell to cell without re-creating the tooltip, and can you point me to a demo on how that can be achieved?
May 23, 2016 at 5:51 pm in reply to: Refresh Grid Data Not Working Refresh Grid Data Not Working #84561Thanks Peter. As I mentioned in my first post, I didn’t want to redefine my source.
I am replacing the old data with a new set of data. So, all I want to do is to change the “localdata” property within the “source” from dataset-a to dataset-b, and then rebinds the grid. But I could not find any demonstration/instruction on how to do so.
If you would be so kind as to provide a few lines of code on how to do that, I would really appreciate it.
May 23, 2016 at 5:33 pm in reply to: editor.dropDownList placeHolder issue editor.dropDownList placeHolder issue #84560Thanks, Peter. That was helpful.
May 22, 2016 at 6:13 pm in reply to: Tooltip autoHide Not Working as Expected Tooltip autoHide Not Working as Expected #84522Further information: The code above typically works for a little while. It stops working if I move the mouse from one row to the next, usually stops working by about the 6th row. At that point, if I move the mouse off the grid entirely, and then move the mouse back onto the grid, then it works again – for a while. I am using IE-11. . .
May 22, 2016 at 6:37 am in reply to: Refresh Grid Data Not Working Refresh Grid Data Not Working #84515Okay, I figured it out: Instead of binding the dataAdapter directly to the data, I have to find it to the source. The changed codes that work are:
function CSList_Selection_Changed(theVal) { $.get("GenStdCSData", { CSRID: $('#HFCSRID').val(), AcaYr: $('#HFAcaYr').val() }, function(dataFromServer) { var err = dataFromServer.errMsg; var StdNotInCSList = dataFromServer.StdNotInCSList; var StdInCSList = dataFromServer.StdInCSList; //Loading hardcoded data just to demonstrate grid issue. var data = [{"StdRID":38,"StdAppRID":103,"AcaYr_Applied":"2015","AcaTerm_Applied":"Fall","LName":"Aggia","FName":"Mart","OnCampusProgramName":"","Taken_Course_Before":"No","Previous_FinalMark":null,"Previous_FinalGrade":null,"Previous_CSCompStatus":null},{"StdRID":203,"StdAppRID":665,"AcaYr_Applied":"2015","AcaTerm_Applied":"Fall","LName":"Paul","FName":"Adrienne","OnCampusProgramName":"","Taken_Course_Before":"No","Previous_FinalMark":null,"Previous_FinalGrade":null,"Previous_CSCompStatus":null}]; var source = { dataType: "json", dataFields: [ { name: 'StdCSRID', type: 'int' }, { name: 'StdRID', type: 'int' }, { name: 'StdAppRID', type: 'int' }, { name: 'SessionRID', type: 'int' }, { name: 'LName', type: 'string' }, { name: 'FName', type: 'string' }, { name: 'MidTermMark', type: 'string' }, { name: 'FinalMark', type: 'string' }, { name: 'FinalGrade', type: 'string' }, { name: 'Notes', type: 'string' }, { name: 'StdCourseSessCompStatus', type: 'string' }, ], id: 'StdCSRID', localdata: data }; $("#jqxGrid_StdNotInCS").jqxGrid('clear'); //Grid clears as expected. var dataAdapter = new $.jqx.dataAdapter(souce); <strong>//bind to source instead</strong> $("#jqxGrid_StdNotInCS").jqxGrid({ source: dataAdapter }); $('#jqxGrid_StdNotInCS').jqxGrid('refresh'); //The above two lines generates no error, but grid is NOT loaded with the new data. }) .done(function() { }) .fail(function(xhr, textStatus, errorThrown) { alert(xhr.responseText); }); }
But here is my question: Since the source has NOT changed from when the grid was initially loaded. why do I have do re-define it all over again? Is there a way to just update the data in the original source, instead of having to re-create the source variable?
Thanks!
Sorry. Please ignore. Figured it out based on this thread. . . (http://www.jqwidgets.com/community/topic/separator-inside-source-based-jqmenu/#post-62736)
Thanks Peter:
It didn’t work though. I have the following code:
$('#jqxEditor_DocCtnt').jqxEditor({ tools: "bold italic underline | format font size | color background | left center right | outdent indent | ul ol" });
Yet, the hyperlink, image button still show up in the toolbar. I am using IE 11. . .
OKay. Found out the issue: I had the combobox disabled in the view, and the control is therefore not passed to the controller. Is that by design? Is that no way to disable the control in the view, and still have the value accessible by the controller?
Thanks.
Hi Peter:
I read over that intro page. I can’t see anywhere that setting the “name” attribute was mentioned. The example itself only uses id, and I saw no postback example included.
At any rate, I did add the name attribute to the div tag for the dropdownlist. But during postback, Request.Form still does NOT contain that particular key. It contains only keys of the other controls.
<div id="jqxCombo_OffCampusInst" name="jqxCombo_OffCampusInst">
controller:
string OffCampusOrgID = Request.Form[“jqxCombo_OffCampusInst”].ToString(); generates error: Object reference not set to an instance of an object. -
AuthorPosts