User Profile & Activity

Girish G Member

Hi Bernard,



I have given all the info regarding the 'Replace Operation' that I am performing on the Web Grid.


Please go through the above info of mine Once again. if you still need any info let me know. 


One more strange thing I have noticed today is:


If I click inside anywhere of frame where I am trying to make some change, before "Save" then the Web Grid is somehow able to get focus and able to work correctly with the keyboard features where onKeydown is working. ( I know it looks strange but this is what happening I dont know why is this working fine i just need to click inside the Frame before clicking "Save":(.




Lastly, I am not working anything in PostBack as I just need to navigate rows of Grid through arrowkeys. I have written only client side scripting which is working perfectly in normal scenarios like add, delete and Modify except Replace operations :(


And Also, i'm following the same logic storing the previous key value in Hidden field and in AfterResponseProcess i'm making to select. 


Please try to guide me on this asap.

 


With Regards,

Girish G

Hi Bernard,


Thanks for your quick response.


I am using the above code to select the row above the replaced row. where I am storing the previous KeyValue of previous row and making to select that specific row in below client side function.


AfterResponseProcess: function(controlId) {

        //alert("Processing Request");

        this._grid.SetFocus();

        // DelFlag will be one if they are perfomring the replace operation.

        if (this.DelFlag == 1) {

            //Set Row Position After Delete

            if (this.ScrollPos > 0) {

                this._grid.RootTable.GetElement(WG40.BODY, WG40.HTMLDIV).scrollTop = this.ScrollPos

            }

            if (this._grid.GetSelectedObject() != null) {

                var RowIndex = this._grid.GetSelectedObject().rowIndex;


                var gSelObj = this._grid.GetSelectedObject().GetRowObject(RowIndex);

                gSelObj.Grid.ClearSelection(RowIndex);

                    

                var rowI = document.getElementById("prevEventKeyValue").value;

                if (rowI != "") {

                    this._grid.RootTable.GetRow(this._grid.RootTable.GetRowByKeyValue(rowI).RowElement.rowIndex).Select();

                    //this._grid.RootTable.SelectRow(this._grid.RootTable.GetRowByKeyValue(rowI).RowElement.rowIndex);

                }

                else

                    this._grid.RootTable.SelectRow(0);

            }

            this.DelFlag = -1;

        }

        return true;

    },


The thing is Grid will refreshs and showing the selection row to above one which was replaced but it is making keyborad options completely freezed :(


Please guide me on this, why it is happening. 

All times are GMT -5. The time now is 9:07 AM.
Previous Next