I have a DropDownProvider providers in my WebDataGrid that has three columns in it. When the user selects a value I want to get the data in the second column of the DropDownProvider and then put it into the next column of the WebDataGrid. Do someone have an example of how to get the second column data from the DropDownProvider?
Thank You
Steve
Hello Stephen,
You can get DropDownProvider changed value using CellEditingClientEvents EnteredEditMode and pass it as a hidden field for further processing.
I’ve attached a sample Default.aspx demonstrating this approach.
Please let me know if I can provide any further assistance.
Svetla Boykova
0827.DropDownProviderTest.zip
Hi Svetla,
Thank you for the response and the example. The DropDownProvider has a grid in it with three columns. What I need is a way to pull the value from the 3rd column of the DropDownProvider. This column is not set as the value for the DropDownProvider in the grid. Please let me know if this does not make sense to you.
Stephen Sjostrom
Thank you for the information but I receive the following error when I try to run the code.
Uncaught TypeError: sender._editorProviders.get_item is not a function at Array.wdgReviewFormDet_Editing_CellValueChanged (HR_Employee_Review_Form.aspx?RVID=Zs4QWEpzl2rFlnJKplWL6llNz0rUYUixwx8v7I1GLfveRWX3aWrvYg==:83) at VM2313 ScriptResource.axd:5 at $IG.WebDataGrid._raiseCE_0 (VM2077 ScriptResource.axd:910) at $IG.WebDataGrid._raiseSenderClientEventStart (VM2077 ScriptResource.axd:882) at Function.Type.callBaseMethod (VM2313 ScriptResource.axd:5) at $IG.WebDataGrid._raiseSenderClientEventStart (VM2166 ScriptResource.axd:2330) at $IG.WebDataGrid._raiseSenderClientEvent (VM2077 ScriptResource.axd:872) at $IG.EditingCore.__raiseClientEvent (VM2141 ScriptResource.axd:193) at $IG.EditingCore._cellValueChanged (VM2193 ScriptResource.axd:789) at Array.<anonymous> (VM2313 ScriptResource.axd:5)
Thank you
Check if sender._editorProviders returns an editors collection and set the correct editor index using get_item(index) method.
Sincerely,
I console logged the sender._editorProvider and received the following. I'm not sure what I need to do to get this to work. Can you point me in the right direction?
Here everything looks fine so you should be able to use:
sender._editorProviders.get_item(0)._editor
to get the drop down editor.
You can also try to get the editor in this way:
sender._editorProviders._items[0]._editor
it is working now using sender._editorProvider._items[0]._editor but I receive the follow console error.
ScriptResource.axd?d=eCg3GgR_3yAJEbE2bVgd4TC09yYOAmXbCC95a44e9BEcgLUDIraMyAqbcPKBAVj8fU4k1L9d6ZxTaAtygzcRR0uT9nzt7l3cr-QvdrE4QQhlvVtaPoS5GwNYyQ8gAQeG_XSxHWRcuyeoNIxynw_KMBRhdkcW_22YTsCXLj6gnjE1&t=ffffffff87bbe9c7:5 Uncaught RangeError: Maximum call stack size exceeded at Function.Sys.Serialization.JavaScriptSerializer.deserialize (ScriptResource.axd?d=eCg3GgR_3yAJEbE2bVgd4TC09yYOAmXbCC95a44e9BEcgLUDIraMyAqbcPKBAVj8fU4k1L9d6ZxTaAtygzcRR0uT9nzt7l3cr-QvdrE4QQhlvVtaPoS5GwNYyQ8gAQeG_XSxHWRcuyeoNIxynw_KMBRhdkcW_22YTsCXLj6gnjE1&t=ffffffff87bbe9c7:5) at $IG.GridCell.get_value (VM12294 ScriptResource.axd:4570) at $IG.UpdateRowAction.addUpdateCell (VM12321 ScriptResource.axd:2303) at $IG.EditingCore._cellValueChanged (VM12321 ScriptResource.axd:761) at Array.<anonymous> (ScriptResource.axd?d=eCg3GgR_3yAJEbE2bVgd4TC09yYOAmXbCC95a44e9BEcgLUDIraMyAqbcPKBAVj8fU4k1L9d6ZxTaAtygzcRR0uT9nzt7l3cr-QvdrE4QQhlvVtaPoS5GwNYyQ8gAQeG_XSxHWRcuyeoNIxynw_KMBRhdkcW_22YTsCXLj6gnjE1&t=ffffffff87bbe9c7:5) at $IG.GridUtility._fireEvent (VM12269 ScriptResource.axd:1848) at $IG.GridCell.set_value (VM12294 ScriptResource.axd:4653) at Array.wdgReviewFormDet_Editing_CellValueChanged (HR_Employee_Review_Form.aspx?RVID=Zs4QWEpzl2rFlnJKplWL6llNz0rUYUixwx8v7I1GLfveRWX3aWrvYg==:89) at ScriptResource.axd?d=eCg3GgR_3yAJEbE2bVgd4TC09yYOAmXbCC95a44e9BEcgLUDIraMyAqbcPKBAVj8fU4k1L9d6ZxTaAtygzcRR0uT9nzt7l3cr-QvdrE4QQhlvVtaPoS5GwNYyQ8gAQeG_XSxHWRcuyeoNIxynw_KMBRhdkcW_22YTsCXLj6gnjE1&t=ffffffff87bbe9c7:5 at $IG.WebDataGrid._raiseCE_0 (VM12205 ScriptResource.axd:910)
The error is thrown from this line of Javascript eventArgs.get_cell().get_row().get_cell(8).set_value(selectedInnerText);
Is there a fix for this?
It is hard to say what is the problem here looking at the stack trace only.
I would suggest you to inspect the individual results from the methods used in this line.
The best way for us to assist you is if you provide a small isolated sample that we can run and use for debugging locally.