JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Data Grid Not getting selectedRows in rowClick() event

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #101194

    Hi,
    we are using selection = {enabled: true, allowRowHeaderSelection: true,}. Now when we select a row, it trigers rowClick() event, In this event we are executing selectedRows = this.getSelection(), but we are not getting current selectedRow detail as it is showing previous selected row detail.
    for example if i am selecting any row first time it will return null and if i am selecting row 2nd time it will give me previous selected row detail.
    In JQXGrid as soon we select row then in rowClick() event we can get current selectedRow detail by method getselectedrowindex().
    Thank you for your help and looking forward to your early reply.
    Thank you
    Nikhil Jain

    #101197
    admin
    Keymaster

    Hi Nikhil Jain,
    The DataGrid ‘change’ event should be used as it is the event raised after the selection is changed.
    Example: https://www.htmlelements.com/demos/grid/selection-mode-events/
    Best regards,
    Peter Stoev
    Smart UI Team
    https://www.htmlelements.com/

    #101198

    Hi,
    Thanks For your response Peter.
    This change event will trigger on cell edit and grid refresh also. it will lead to fire unecessary event. Is there any way to get selectedRows details itself in rowClick() event, as we get in JQXGrid.
    Thank you for your help and looking forward to your early reply.
    Thank you
    Nikhil Jain

    #101199
    admin
    Keymaster

    Hi Nikhil Jain,
    The ‘change’ event which is raised by the Grid is only raised when selection changes and will have event.detail object. This can be used for detection whether the event is raised by the Grid or by some internal HTML element which is used as an editor for example.
    Best regards,
    Peter Stoev
    Smart UI Team
    https://www.htmlelements.com/

    #101211

    Hi,
    any plan to make available getselection() method working in rowclick()/cellclick() events like in JQXGrid in your any next releases.
    Thank you for your help and looking forward to your early reply.
    Thank you
    Nikhil Jain

    #101212
    admin
    Keymaster

    Hi Nikhil Jain,
    We will consider. We suggest you to use the ‘change’ event which is the special event for selection.
    Best regards,
    Peter Stoev
    Smart UI Team
    https://www.htmlelements.com/

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.