Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1460
Selection not working
posted

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>

 

Parents
  • 24671
    posted

    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

Reply Children