I have an ultragrid on a Windows form. The grid is added at runtime (there can be up to 6 grids added to the form depending on values found in the data).
An ultracomboeditor control which is also added in code is bound to a column called 'Value' .
There may be one or more rows were the drop down list for a cell is filled with 'Staff names' If the name entered by the user is not in the drop down list an error is trapped, a msgbox is then presented and if the user responds 'Yes', a Dialogue is shown that allows the users to enter the new persons name in a 'Quick Add function'. However there are some issues that I need some help with please such as:
a) How do i refresh the Value list for the 'Value' column in the specific cell that they user is currently into include the new person?
b) How do i refresh the Value list for the 'Value' column for any other rows in the grid where the user needs to see the name of the person that was entered into the person table?
If I press the 'ESc' key twice in the first row I can get the value list to refresh when the user has entered a value for the first row but I want to do this in code and Ialso want to refresh the value list for other rowsas described below.
For example there may be two rows in the grid, one is labelled ' Enter the name of person attending session one' and another row, 'Enter the name of person attending session two'.
If the user enters a name in the 1st row that does not exist, and the dialogue is presnetred and the user enters a name how to refresh the value list for that cell and reset the selected value and how do i refresh the Value list for the 'Value' column for any other rows in the grid where the user needs to see the name of the person that was entered into the person table after the grid vaue lists were populate. Cell value lists get populated at initialisation of the row
Thank you for your help
Pressing Esc once cancel any changes to the current cell.
Pressing Esc again cancels all updates on the entire current row. So if the row is a new row, then it will be cancelling and removed.
To disable this functionality, you could handle the KeyDown event and mark it Handled for the Escape key, or you could modify the grid's KeyActionMappings and remove the action for this.
Hi
In my grid i give allowdelete = flase even after, when i press esc key the entire row gets deleted.
i added the grid rows by grdName.DisplayLayout.Bands(0).AddNew()
is any property to stop esc key deleting rows.
i use enter key map coding.
I was able to use the 'escape' key to set the value to 'blank'. However if you press escape then escape again - the row is deleted! The grid is bound to a strongly typed dataset (which does allow nulls). Thanks again for the tip. Just sent my project specification off to the client (now happy with the 10.2 Infragistics controls used in my prototype). Took a while to get the desired functionailty.
Hi,
Have you tried setting the Nullable property on the grid column to allow nulls?
Hi, just looking the validation of my dropdown 'valuelists' assigned to wingrid colums (in 10.2). not sure if things have improved. Not been happy with the IG take on 'limittolist' in any control (it should also allow blank/null). Distinction should be made between (no value) and a value which is not in the list.