I can't seem to get row selection working right. Has anyone else had issues with this?
The following code loads the data, and in IE9 I see the hover effect on rows, but clicking on them does nothing. I added Sorting, and after I sort a column, then selection works perfectly - just not unless it's sorted. A similar effect happens in Chrome, where if I click on any row, the first row becomes selected but no other row can be selected - if I sort, then row selection works.
function LoadGrid(pi_idx) {
PageMethods.LoadResponses(_EventID, _SurveyID, eval('_QuestionID_' + pi_idx), LoadDataSuccess, ActionFail);
}
function LoadDataSuccess(response) {
var myReturnPackage = Sys.Serialization.JavaScriptSerializer.deserialize(response);
var grid = $("#grid_" + curIdx).igGrid({
autoGenerateColumns: false,
columns: [
{ headerText: "OrderID", key: "OrderID", dataType: "string", hidden: true, width: "0" },
{ headerText: "AttendeeName", key: "AttendeeName", dataType: "string", width: "100" },
{ headerText: "ResponseEssay", key: "ResponseEssay", dataType: "string", width: "460" }
],
width: '600px', height: '200px',
dataSource: myReturnPackage.Data.Responses,
features: [
{ name: 'Sorting', type: 'local', columnSettings: [] },
{ name: 'Selection', mode: 'row', multipleSelection: false, activation: true, rowSelectionChanged: selectionHandler }
]
});
if (myReturnPackage.Data.AnswerType == 'MULTIPLE_CHOICE') {
CalculateRating(myReturnPackage.Data, curIdx);
The following code is in a repeater:
<a href="#" class="ActionLink" onclick="BLOCKED SCRIPTShowField('<%# DataBinder.Eval(Container, "ItemIndex", "")%>');return false;">Show/Hide Responses</a>
<div id="Div_<%# DataBinder.Eval(Container, "ItemIndex", "")%>" style="display:none;">
<table id="grid_<%# DataBinder.Eval(Container, "ItemIndex", "")%>"></table><br />
</div>
Hi,
We have a number of samples which demonstrate row selection, for example:
http://localhost:31869/samplesbrowser/grid/row-selection
Could you let me know if using similar code as shown in the samples, works fine for you? So that i can see if it's a problem with the scenario itself, or the version of the CSS/JavaScripts you have.
It's hard for me to say what the issue is looking at the pasted code, because I would need to see the code running in the context of your full application.
If the above doesn't help i suggest to contact Development Support and they will investigate your sample code in detail.
Thanks,
Angel
The issue is that selection fails or experiences one of the issues I mentioned previously if there is a hidden column.
The issue is repeatable using the RowSelection.html sample if you hide the Product ID column by changing it as such:
works: { headerText: "Product ID", key: "ProductID", dataType: "number" },
fails: { headerText: "Product ID", key: "ProductID", dataType: "number", hidden:"true" },
Selection will start to work after changing the page or sorting (after adding sorting to the sample).
Is there any update on the SR ? Waiting to update some of our grids until this is solved and setting the column is unfortunately not an option right now.
For the time being you may try to set the width: "1px". The id column is nearly invisible.
{ headerText: "OrderID", key: "OrderID", dataType: "string", width: "1" },
Hello,
The next SR is going to be on 15th of December.
Thanks.
Is there an ETA on that service release? Just checking since I need to make some architectural decisions.
You are right, there was a bug reported about this (for your reference, the internal work item number is 91080), but the fix didn't make it into the RTM. You can expect in in the first service release.
Thank you,