We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to check weather the row is empty or not?

Hi 
By providing row number are we able to find wether the Row is Empty or Not ?

grid.Model[rowIndex, columnIndex]  ???

Regards


1 Reply

KB Kanimozhi Bharathi Syncfusion Team May 29, 2015 06:07 PM UTC

Hi Basavaraj,

Thank you for contacting Syncfusion Suppport

We have analyzed your query. You can get the current cell is empty or not by checking if the current cell value of grid is empty or not like the below snippet,

CODE SNIPPET:

var row = grid.CurrentCell.RowIndex;

var col = grid.CurrentCell.ColumnIndex;

 if (grid.Model[row,col].CellValue == string.Empty)

       MessageBox.Show("empty");


To check the whole row is empty or not, we need to check the every cell value in the current row by using for loop. We have also prepared a sample based on your requirement. Please find the attached sample below.

Sample: http://www.syncfusion.com/downloads/support/forum/119243/ze/WpfApplication81520447709

Please let us know if you have any queries.

Thanks

Kanimozhi B


Loader.
Up arrow icon