DataGridView.DisplayedRowCount

Hi,

In my last project i want to calculate only those rows who display in grid not all.

when i am using MyGrid.RowCount or MyGrid.Rows.Count it gives me all rows..

Finally i find event DisplayedRowCount

Here is sample

public int DisplayedRowCount(
bool includePartialRow
)
Parameter : includePartialRow
true to include partial rows in the displayed row count; otherwise, false.

Int32 count = DisplayedRowCount(true);
Int32 count1 = DisplayedRowCount(false);

count return all row count
count1 return all visible row count..

read more at

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.displayedrowcount(v=VS.100).aspx

Advertisements

Application start with windows start

Code for adding the application to start with windows

Dim regKey As RegistryKey
regKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
regKey.SetValue(Application.ProductName, Application.ExecutablePath)
regKey.Close()

Code for removing the application from startup

Dim regKey As RegistryKey
regKey = Registry.CurrentUser.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
regKey.DeleteValue(Application.ProductName)
regKey.Close()

C#.net Custom Control

Hello Friends,

I am always try to develop my own custom control which help me to develop my application faster.

I find some free toolkit which allow to to create desktop application more easier and powerful with great design..

Please check this link http://www.componentfactory.com/

%d bloggers like this: