Checking Datagridview row validity

crystal reports , vb.net 2008 , mysql Gujrānwāla, Pakistan
  • 8 years ago

    Hi

    I want to check on datagridview leave event if it contains any invalid rows. If so than the disable button should be disabled. Do anyone have any ideas about this,please share. Thanks any way.

    Shahbaz Maqsood

  • 8 years ago

    If u are checking if it contains invalid rows in web application then it is better to fire *DataGrid RowDataBound *Event rather than Leave Event..

    It is better to fire this event...bcz it get called immediately after u assign datasource to datagrid... In these u check it...

    if (e.Row.RowType == DataControlRowType.DataRow) { //check u r conditions here...u can do it..u need do for loop here.. bcz it will loop as many times as the data in grid.It will help u check every row in datagrid. }

    Thanks & Regards Viral Gandhi

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Debuggers don't remove bugs. They only show them in slow motion.”