Re: Trapping Datagrid Error Message

From: Paul J. Lay (pjlay_at_msn.com)
Date: 01/26/05


Date: Wed, 26 Jan 2005 06:13:23 -0500

Thank you for your prompt reply which was excellent from my perspective.

Best Regards,

Paul J. Lay

""Jeffrey Tan[MSFT]"" <v-jetan@online.microsoft.com> wrote in message
news:nube0V3AFHA.768@cpmsftngxa10.phx.gbl...
> Hi Paul,
>
> Thanks for your posting!
>
> Yes, this is a frequented asked question about DataGrid databinding. In
the
> datasource datatable, if certain datacolumn's AllowDBNull property is
> false, passing null value to the datasource will result in an exception,
> and DataGrid databinding will catch this exception and display to the
> customer.
>
> Currently, there is no way to hook into the databinding process of
> DataGrid, so we should do validation at the UI level. For a start, please
> refer to:
> "5.20 How can I do cell by cell validation in a datagrid?"
> http://64.78.52.104/FAQ/WinForms/FAQ_c44c.asp#q773q
>
> But, the above cell by cell validation also has problem when we did not
> touch the need validation cell then move to another row. So, we have to
> extend the below article's code, then the user changes current cell, just
> determine if he changes to another row(or only the different cell change
in
> the same row). If the user changes the current row, just do the valition
> for the entire row validation for the original row.
>
> Hope this information makes sense to you.
> ========================================
> Thank you for your patience and cooperation. If you have any questions or
> concerns, please feel free to post it in the group. I am standing by to be
> of assistance.
>
> Best regards,
> Jeffrey Tan
> Microsoft Online Partner Support
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>



Relevant Pages

  • RE: Trapping Datagrid Error Message
    ... this is a frequented asked question about DataGrid databinding. ... so we should do validation at the UI level. ... "5.20 How can I do cell by cell validation in a datagrid?" ... If the user changes the current row, ...
    (microsoft.public.dotnet.framework.windowsforms.databinding)
  • Re: Check box error
    ... Validation that only works for directly entering data ... | to check it IF a certain other cell is blank. ...
    (microsoft.public.excel.misc)
  • Re: Yes and No
    ... Paul B wrote: ... Only I want validation that allow user to input in cell Yes or No value. ... Sorry on my bad English. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Data Validation List created from a text in a Cell
    ... clear cell A1. ... ) Is Nothing Then Exit Sub ... Whenever the cell containing the comma separated list is changed (specified ... Validation List for the designated range (stored in the ValidationRange ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Gap between Headings and Start of Output
    ... Paul: I want to make sure I solvig the right problem. ... The abbove line is moving the active cell down the worksheet. ... My original code is ... ... Const MaxDist As Integer = 279 ...
    (microsoft.public.excel.programming)