Infragistics4.Web.v14.1, Version=14.1.20141.2150
IE browser
Microsoft .NET Framework Version 4.5
We are using Skin IDs for all controls in our application. The Skin IDs set the ClientEvents-KeyDown control event to set the isDirty flag. When filtering on a WebDataGrid (or WHDG) on a column that is defined as currency or datetime, the client-side event is triggered and the page is make dirty when the user only filtered on the column. Is there a way to override the Skin ID for just the filter?
Hello Autumn,
Could you share more details? For example what do you mean by “Is there a way to override the Skin ID for just the filter?” What are you trying to achieve with this? It is of course possible to have a Skin with only Filtering enabled in it. Or is it you would like to have different Skins and change them based on some condition? I am looking forward more details from you.
This question might be specific to our application. We are using a Default.skin file that contains the following for the WebNumericEditor.
<ig:WebNumericEditor runat="server"
ClientEvents-KeyDown ="infragLiteCommonEditorKeyDown"
Height="15px"
cssclass="TextEditable"
TabIndex="1" ></ig:WebNumericEditor>
All of the WebNumericEditors in our application that do not have a Skin ID specified will use this default Skin ID. When the user selects the filter in a column defined as decimal, when they key in a number the client event for key down is executed which makes the page dirty.
Hi Autumn,
Alternatively, you can check to see if the activeCell's index is -1 (belongs to the filter row). Here is a code snippet:
function infragLiteCommonEditorKeyDown() { var grid = $find("WebDataGrid1"); var rowIDPair = grid.get_behaviors().get_activation().get_activeCell().get_idPair().rowIDPair; if (rowIDPair.index == -1) { //don't set dirty flag } //set dirty flag}
Note, to use this logic you will need to have the WebDataGrid's Activation Behavior enabled.
Please let me know if you have any questions regarding this matter.
Thanks for the suggestion but this will not work for us. The function infragLiteCommonEditorKeyDown is used for all are Infragistics controls in the entire system. I do not have access to the WebDataGrid control at this point.
The logic I've provided in my previous post obtains a reference to the WebDataGrid control using the jquery Find() method. If the control is undefined in certain instances, you can prevent the rest of my logic from firing with an if statement. You can also add additional conditions to the logic provided depending on your requirements. This will ensure no errors are thrown when the infragLiteCommonEditorKeyDown() function is called.
We have hundreds of WebDataGrids that call this common method that is in an embedded JS file. We do not have a good way of doing this.
Thank you for the update.
The approaches I've provide are what I recommend, however if you wish to find a way to obtain the owner for the editor which fired this function, you may be able to use an internal property. More specifically, you should be able to use the following logic://this returns the id of the WebDataGridsender.get_parent()._owner.get_id()
Note, this is using an internal property in our source which not typically recommended because they are subject to change at any time. Please type this and let me know if you have any questions.