or
public void ItemsRequest(object sender, ItemsRequestEventArgs e){ IList<SqlGeometry> geometryList = new List<SqlGeometry>(); LocationRect currentRegion = new LocationRect(e.UpperLeft, e.LowerRight); string sql = string.Format("SELECT the_geom FROM Locations WHERE the_geom.STIntersects(geometry::STGeomFromText('POLYGON(({0} {1}, {2} {3}, {4} {5}, {6} {7}, {0} {1}))', 0)) = 1 ", currentRegion.Southwest.Longitude, currentRegion.Southwest.Latitude, currentRegion.Northwest.Longitude, currentRegion.Northwest.Latitude, currentRegion.Northeast.Longitude, currentRegion.Northeast.Latitude, currentRegion.Southeast.Longitude, currentRegion.Southeast.Latitude); using (SqlConnection sqlConnection = new SqlConnection(connectionString)) { sqlConnection.Open(); using (SqlCommand sqlCommand = new SqlCommand(geographicalBoundsSQL, sqlConnection)) { using (SqlDataReader reader = sqlCommand.ExecuteReader()) { while (reader.Read()) { SqlGeometry sqlGeometry = (SqlGeometry)reader["the_geom"]; geometryList.Add(sqlGeometry); } } } }
<telerik:RadButton Command="telerik:RadDataFormCommands.AddNew" CommandTarget="{Binding ElementName=df}"ToolTip="Copy" CommandParameter="copy">
<telerik:RadButton.Content>
<Image Source="Images/Copy.png"/>
</telerik:RadButton.Content>
</telerik:RadButton>