Question: When i search results, my data takes some time to show,So i want a progress bar should show after click on search button.It takes 5-8 second to show data.If i add below div after [div class="k-grid-content] div in inspect element then loading bar work well but not hide after data load.How can i add below code before data load and remove after load. Thanks !!

```
<div class="k-loading-mask" style="width: 100%; height: 100%; top: 0px; left: 0px;">
<span class="k-loading-text">Loading...</span>
<div class="k-loading-image"></div>
<div class="k-loading-color"></div>
</div>

```

Answer: 
If you are interested in Sql Server you can use something like this:

```
using System.Data;
using System.Data.Sql;

var instances = SqlDataSourceEnumerator.Instance.GetDataSources();
foreach (DataRow instance in instances.AsEnumerable())
{
    Console.WriteLine($"ServerName: {instance["ServerName"]}; "+
       " Instance: {instance["InstanceName"]}");
}

```

More information about the `SqlDataSourceEnumerator` class you can find on [MSDN](https://msdn.microsoft.com/en-us/library/system.data.sql.sqldatasourceenumerator(v=vs.110).aspx).

Note:
-----

This class will look into the local network for servers, if your network is large then there might be a delay in acquiring the response. Also for the empty string instance name, that should be the default instance for that SQL Server.

You can get this information using the SMO too, if you want.
Similar to the accepted answer but for those who have a SqlClient.SqlConnection already opened, you can retrieve the instance name from 

```
    Dim c As New SqlClient.SqlConnection(sConnectionString)

    '   Get the database name and server

    SourceDatabase = c.Database
    SourceServer = c.DataSource

```

Sorry for the VB ;)