This is a migrated thread and some comments may be shown as answers.

WPF RadGridView row/cell double click

7 Answers 3264 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 02 Dec 2009, 12:02 AM
I want to be able to find a RowDoubleClick or CellDoubleClick event in RadGridView.  For some reason I can't (and I'm probably just being a goob).  If I had something like CellDoubleClick in the Winforms version (http://www.telerik.com/community/forums/winforms/gridview/row-double-click.aspx) that would do exactly what I want to do.  I can't find a comparable event in the WPF version.  Am I doing something wrong?

7 Answers, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 04 Dec 2009, 08:59 AM
Hi Dean,

Here is how to detect double clicks in WPF:

using System.Windows;
using Telerik.Windows.Controls;
using Telerik.Windows.Data;
using System.Windows.Input;
using Telerik.Windows.Controls.GridView;
 
namespace TicketID_263358_DoubleClick
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
 
            this.playersGrid.ItemsSource = Club.GetPlayers();
            this.playersGrid.MouseDoubleClick +=  this.OnPlayersGridMouseDoubleClick;
        }
 
        void OnPlayersGridMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            FrameworkElement originalSender = e.OriginalSource as FrameworkElement;
            if (originalSender != null)
            {
                var cell = originalSender.ParentOfType<GridViewCell>();
                if (cell != null)
                {
                    MessageBox.Show("The double-clicked cell is " + cell.Value);
                }
 
                var row = originalSender.ParentOfType<GridViewRow>();
                if (row != null)
                {
                    MessageBox.Show("The double-clicked row is " + ((Player)row.DataContext).Name);
                }
            }
        }
    }
}

I have attached a sample project with the source code above. I hope it helps.

Kind regards,
Ross
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Dean
Top achievements
Rank 1
answered on 04 Dec 2009, 06:58 PM
Great.  That answers my question.  I just wasn't sure if there was an event already that wrapped some of this for us.

Cheers,

-Dean
0
Mike Picco
Top achievements
Rank 1
answered on 22 Oct 2011, 11:04 AM
Does this not work anymore?  I am getting errors for FrameworkElement and <GridViewRow>
I want to be able to fire an event when a row is clicked.
0
Maya
Telerik team
answered on 24 Oct 2011, 07:39 AM
Hi Mike Picco,

I have updated the sample project attached previously with our current official release and everything works properly. You can find it attached here. Do you experience any problems with it ?
Nevertheless, if you want to fire an event on double clicking on a row, you can handle RowActivated event of the grid directly. 

Greetings,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Vikash
Top achievements
Rank 1
answered on 25 Apr 2012, 12:55 PM
Hello Telerik Team,

how can we get row in code behind  of radgridview control?
0
Hassan
Top achievements
Rank 1
answered on 16 Apr 2014, 07:29 AM
Hi,

I got an issue with RadGridView, when I touch on any row button it gives me golden circle, please find the link below where I explained and attached few snap shots.

http://www.telerik.com/forums/wpf-radgridview-row-button-touch-issue---gets-golden-circle-when-touching-any-button-from-gridview-row#nyDA2kDp00WQykUkva3d7A

Thanks,

Regards,

Hassan
0
Hassan
Top achievements
Rank 1
answered on 17 Apr 2014, 12:10 AM
Hi,

To replicate the golden circle issue (telerik version 2014.1.224.45) please get the file names and code as follows:

1. Application.xaml

<Application x:Class="Application"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="Home.xaml">
    <Application.Resources>
        <ControlTemplate x:Key="MyRoundButtonOnMainMenu" TargetType="{x:Type Button}">
            <Grid>
                <Ellipse x:Name="MyEllipse" Fill="White" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="6" VerticalAlignment="Top" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
                <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
            </Grid>
            <ControlTemplate.Triggers>
                <!--<Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Fill" Value="Orange" TargetName="MyEllipse"/>
                </Trigger>-->
                <Trigger Property="IsPressed" Value="True">
                    <Setter Property="Fill" Value="LightGreen" TargetName="MyEllipse"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="MyRoundButton" TargetType="{x:Type Button}">
            <Grid>
                <Ellipse x:Name="MyEllipse" Fill="White" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="6" VerticalAlignment="Top" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
                <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
            </Grid>
            <ControlTemplate.Triggers>
                <!--<Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Fill" Value="Orange" TargetName="MyEllipse"/>
                </Trigger>-->
                <Trigger Property="IsPressed" Value="True">
                    <Setter Property="Fill" Value="LightGreen" TargetName="MyEllipse"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="MyRoundButton1" TargetType="{x:Type Button}">
            <Grid>
                <Ellipse x:Name="MyEllipse" Fill="Transparent" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="2" VerticalAlignment="Top" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
                <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
            </Grid>
            <ControlTemplate.Triggers>
                <!--<Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Fill" Value="Orange" TargetName="MyEllipse"/>
                </Trigger>-->
                <Trigger Property="IsPressed" Value="True">
                    <Setter Property="Fill" Value="LightGreen" TargetName="MyEllipse"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="MyRoundButton2" TargetType="{x:Type Button}">
            <Grid>
                <Ellipse x:Name="MyEllipse" Fill="Transparent" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="4" VerticalAlignment="Top" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"/>
                <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center"/>
            </Grid>
            <ControlTemplate.Triggers>
                <!--<Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Fill" Value="Orange" TargetName="MyEllipse"/>
                </Trigger>-->
                <Trigger Property="IsPressed" Value="True">
                    <Setter Property="Fill" Value="LightGreen" TargetName="MyEllipse"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>

        <ControlTemplate x:Key="MyRoundedCornerButton" TargetType="{x:Type Button}">
            <Border
                Name="MyBorder"
                Background="Transparent"
                BorderBrush="Black"
                BorderThickness="3"
                CornerRadius="15">
                <ContentPresenter
                    HorizontalAlignment="Center"
                    Margin="{TemplateBinding Padding}"
                    VerticalAlignment="Center"
                    Content="{TemplateBinding Content}"
                    TextBlock.Foreground="Black"/>
            </Border>
            <ControlTemplate.Triggers>
                <!--<Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Background" Value="Orange" TargetName="MyBorder"/>
                </Trigger>-->
                <Trigger Property="IsPressed" Value="True">
                    <Setter Property="Background" Value="LightGreen" TargetName="MyBorder"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        
        <Style TargetType="{x:Type ScrollBar}">
            <!--<Setter Property="Stylus.IsFlicksEnabled" Value="True" />-->
            <Style.Triggers>
                <Trigger Property="Orientation" Value="Horizontal">
                    <Setter Property="Height" Value="40" />
                    <Setter Property="MinHeight" Value="40" />
                </Trigger>
                <Trigger Property="Orientation" Value="Vertical">
                    <Setter Property="Width" Value="40" />
                    <Setter Property="MinWidth" Value="40" />
                </Trigger>
            </Style.Triggers>
        </Style>
    </Application.Resources>
</Application>


2. Class named JobAllObject.vb

Imports System.Collections.ObjectModel
Imports System.IO
Imports System.Data

Public Class JobAllObject
    Public Property JobID() As Integer
        Get
            Return m_JobID
        End Get
        Set(value As Integer)
            m_JobID = value
        End Set
    End Property
    Private m_JobID As Integer
    Public Property PropertyJobID() As Integer
        Get
            Return m_PropertyJobID
        End Get
        Set(value As Integer)
            m_PropertyJobID = value
        End Set
    End Property
    Private m_PropertyJobID As Integer
    Public Property Modified() As Date
        Get
            Return m_Modified
        End Get
        Set(value As Date)
            m_Modified = value
        End Set
    End Property
    Private m_Modified As Date
    Public Property AppointmentDate() As Date?
        Get
            Return m_AppointmentDate
        End Get
        Set(value As Date?)
            m_AppointmentDate = value
        End Set
    End Property
    Private m_AppointmentDate As Date?
    Public Property AppointmentTime() As String
        Get
            Return m_AppointmentTime
        End Get
        Set(value As String)
            m_AppointmentTime = value
        End Set
    End Property
    Private m_AppointmentTime As String
    Public Property Location() As String
        Get
            Return m_Location
        End Get
        Set(value As String)
            m_Location = value
        End Set
    End Property
    Private m_Location As String
    Public Property SellerNames() As String
        Get
            Return m_SellerNames
        End Get
        Set(value As String)
            m_SellerNames = value
        End Set
    End Property
    Private m_SellerNames As String
    Public Property SyncUpVisibility() As String
        Get
            Return m_SyncUpVisibility
        End Get
        Set(value As String)
            m_SyncUpVisibility = value
        End Set
    End Property
    Private m_SyncUpVisibility As String
    Public Property DeleteVisibility() As String
        Get
            Return m_DeleteVisibility
        End Get
        Set(value As String)
            m_DeleteVisibility = value
        End Set
    End Property
    Private m_DeleteVisibility As String
    Public Property ImportVisibility() As String
        Get
            Return m_ImportVisibility
        End Get
        Set(value As String)
            m_ImportVisibility = value
        End Set
    End Property
    Private m_ImportVisibility As String
    Public Property ImportCompleteVisibility() As String
        Get
            Return m_ImportCompleteVisibility
        End Get
        Set(value As String)
            m_ImportCompleteVisibility = value
        End Set
    End Property
    Private m_ImportCompleteVisibility As String
    Public Property BGRowColor() As String
        Get
            Return m_BGRowColor
        End Get
        Set(value As String)
            m_BGRowColor = value
        End Set
    End Property
    Private m_BGRowColor As String
    Public Property DeleteAndImportVisibility() As String
        Get
            Return m_DeleteAndImportVisibility
        End Get
        Set(value As String)
            m_DeleteAndImportVisibility = value
        End Set
    End Property
    Private m_DeleteAndImportVisibility As String
    Public Property NavigationVisibility() As String
        Get
            Return m_NavigationVisibility
        End Get
        Set(value As String)
            m_NavigationVisibility = value
        End Set
    End Property
    Private m_NavigationVisibility As String
    Public Property JobStatus() As String
        Get
            Return m_JobStatus
        End Get
        Set(value As String)
            m_JobStatus = value
        End Set
    End Property
    Private m_JobStatus As String
    Public Property ReapitID() As String
        Get
            Return m_ReapitID
        End Get
        Set(value As String)
            m_ReapitID = value
        End Set
    End Property
    Private m_ReapitID As String
    Public Property JobStatusVisibility() As String
        Get
            Return m_JobStatusVisibility
        End Get
        Set(value As String)
            m_JobStatusVisibility = value
        End Set
    End Property
    Private m_JobStatusVisibility As String

    Public Shared Function Load(ByVal PropertyJobIDTo As Integer, ByVal SearchText As String, ByVal SearchDateFrom As Date?, ByVal SearchDateTo As Date?) As ObservableCollection(Of JobAllObject)
        Dim _result As New ObservableCollection(Of JobAllObject)()

        Dim hasAnyLocalJob As Boolean = False ''This variable would be used to check if there is any local job

        Dim _dtProperty As New DataTable()
        _dtProperty.Columns.Add(New DataColumn("PropertyJobID", GetType(Integer)))
        _dtProperty.Columns.Add(New DataColumn("JobID", GetType(Integer)))
        _dtProperty.Columns.Add(New DataColumn("Address1", GetType(String)))
        _dtProperty.Columns.Add(New DataColumn("Address2", GetType(String)))
        _dtProperty.Columns.Add(New DataColumn("Address3", GetType(String)))
        _dtProperty.Columns.Add(New DataColumn("AddressTownCity", GetType(String)))
        _dtProperty.Columns.Add(New DataColumn("AddressCounty", GetType(String)))
        _dtProperty.Columns.Add(New DataColumn("AddressPostCode", GetType(String)))
        _dtProperty.Columns.Add(New DataColumn("ReapitID", GetType(String)))
        _dtProperty.Columns.Add(New DataColumn("Modified", GetType(Date)))
        _dtProperty.Columns.Add(New DataColumn("JobStatus", GetType(String)))

        Dim _drProperty As DataRow = _dtProperty.NewRow
        _drProperty("PropertyJobID") = 1
        _drProperty("JobID") = 1
        _drProperty("Address1") = "1 Morris Road"
        _drProperty("Address2") = ""
        _drProperty("Address3") = ""
        _drProperty("AddressTownCity") = ""
        _drProperty("AddressCounty") = ""
        _drProperty("AddressPostCode") = ""
        _drProperty("ReapitID") = "1"
        _drProperty("Modified") = Date.Now
        _drProperty("JobStatus") = "Complete"
        _dtProperty.Rows.Add(_drProperty)

        For Each r In _dtProperty.Rows
            Dim _job As New JobAllObject

            Dim _fullAddress As String = r("Address1").ToString

            _job.JobID = r("JobID")
            _job.PropertyJobID = r("PropertyJobID")
            _job.Modified = Format(r("Modified"), cDateFormat)
            _job.Location = _fullAddress

            _job.SellerNames = ""
            If Not IsDBNull(r("JobStatus")) Then
                If r("JobStatus").ToString().Trim().Length > 0 Then _job.JobStatus = r("JobStatus") Else _job.JobStatus = "<No Job Status>"
            Else
                _job.JobStatus = "<No Job Status>"
            End If

            If r("PropertyJobID") > 0 Then
                _job.ReapitID = "Reapit No: " & r("ReapitID")
            Else
                _job.ReapitID = ""
            End If


            _job.JobStatusVisibility = "Collapsed"
            If r("PropertyJobID") > 0 Then
                If (_job.JobStatus.ToLower() = "completed") Or (_job.JobStatus.ToLower() = "sold externally") Or (_job.JobStatus.ToLower() = "withdrawn") Then
                    _job.SyncUpVisibility = "Visible" '' System.Windows.Visibility.Visible
                Else
                    _job.SyncUpVisibility = "Hidden" '' System.Windows.Visibility.Hidden  
                End If

                _job.DeleteVisibility = "Collapsed"
                _job.ImportCompleteVisibility = "Collapsed"
                _job.JobStatusVisibility = "Visible"
                If PropertyJobIDTo = 0 Then
                    If hasAnyLocalJob Then
                        ''When Import has not been clicked
                        _job.ImportVisibility = "Visible"
                        ''_job.RefreshGridVisibility = "Collapsed"
                        _job.DeleteAndImportVisibility = "Visible"
                    Else
                        ''When Import has been clicked
                        _job.ImportVisibility = "Collapsed"
                        ''_job.RefreshGridVisibility = "Visible"
                        _job.DeleteAndImportVisibility = "Hidden"
                    End If
                Else
                    ''When Import has been clicked
                    _job.ImportVisibility = "Collapsed"
                    ''_job.RefreshGridVisibility = "Visible"
                    _job.DeleteAndImportVisibility = "Hidden"
                End If

                If PropertyJobIDTo = 0 Then
                    _job.BGRowColor = "Black"
                    _job.NavigationVisibility = "Visible"
                Else
                    _job.BGRowColor = "LightGreen"
                    _job.NavigationVisibility = "Hidden"
                End If
            Else
                _job.JobStatus = ""

                _job.SyncUpVisibility = "Hidden" '' System.Windows.Visibility.Hidden                
                _job.BGRowColor = "Red"

                If PropertyJobIDTo = 0 Then
                    _job.DeleteVisibility = "Visible"
                    _job.ImportVisibility = "Collapsed"
                    _job.ImportCompleteVisibility = "Collapsed"
                    ''_job.RefreshGridVisibility = "Collapsed"
                    _job.DeleteAndImportVisibility = "Visible"
                    _job.NavigationVisibility = "Visible"
                Else
                    _job.DeleteVisibility = "Collapsed"
                    _job.ImportVisibility = "Collapsed"
                    _job.ImportCompleteVisibility = "Collapsed"
                    ''_job.RefreshGridVisibility = "Collapsed"
                    _job.DeleteAndImportVisibility = "Hidden"
                    _job.NavigationVisibility = "Hidden"
                End If
            End If

            _result.Add(_job)
        Next

        Return _result
    End Function
End Class


3. Module named Global.vb

Module [Global]
    Public Const cDateFormat As String = "dd MMM yyyy"
    Public Const cDateFormatLong As String = "dd MMM yyyy hh:mm:ss tt"
End Module


4. Home.xaml

<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:Chromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
    xmlns:System="clr-namespace:System;assembly=mscorlib" x:Class="Home"    
    Title="Home" Height="768" Width="1366" WindowState="Maximized" SizeChanged="Window_SizeChanged_1" MinHeight="768" MinWidth="1366" FontFamily="Segoe UI" WindowStyle="None">

    <Window.Resources>
        <Style x:Key="GridViewCellStyle1" TargetType="{x:Type telerik:GridViewCell}">
            <!--<Setter Property="Background" Value="#dbe5f1" />-->
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="Padding" Value="10" />
            <Setter Property="Margin" Value="5,5,5,5" />
            <Setter Property="FontSize" Value="20"></Setter>
        </Style>

        <Style x:Key="RadToggleButtonStyle1" TargetType="telerik:RadToggleButton">
            <Setter Property="Background" Value="#17375d"></Setter>
            <Setter Property="Foreground" Value="White"></Setter>
            <Setter Property="FontSize" Value="14px"></Setter>
        </Style>

        <Style TargetType="PasswordBox">
            <Setter Property="BorderThickness" Value="1"></Setter>
            <Setter Property="BorderBrush" Value="Gray"></Setter>
            <Setter Property="Background" Value="Transparent"></Setter>
        </Style>

        <Style TargetType="TextBox">
            <Setter Property="BorderThickness" Value="1"></Setter>
            <Setter Property="BorderBrush" Value="Gray"></Setter>
            <Setter Property="Background" Value="Transparent"></Setter>
        </Style>

        <Style TargetType="{x:Type telerik:GridViewRow}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="Foreground" Value="black"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
            <Setter Property="Focusable" Value="False">
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsSelected" Value="True">
                    <Setter Property="Background" Value="Transparent"/>
                    <Setter Property="Foreground" Value="black"/>
                </Trigger>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Opacity" Value="1"/>
                    <Setter Property="Background" Value="Transparent"/>
                    <Setter Property="BorderBrush" Value="Transparent"></Setter>
                    <Setter Property="Foreground" Value="black"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style TargetType="{x:Type telerik:GridViewCell}">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderBrush" Value="Transparent"></Setter>
            <Setter Property="Foreground" Value="black"/>
            <Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>

            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Opacity" Value="1"/>
                    <Setter Property="Background" Value="Transparent"/>
                    <Setter Property="Foreground" Value="black"/>
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="dtpForStartDate" TargetType="telerik:RadDatePicker">
            <Setter Property="DateTimeWatermarkTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBlock Text="Start Date" Opacity="1" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="dtpForEndDate" TargetType="telerik:RadDatePicker">
            <Setter Property="DateTimeWatermarkTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <TextBlock Text="End Date" Opacity="1" />
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>

    <Grid Background="White">
        <Grid x:Name="LayoutRoot2">
            <Grid Grid.Column="1">
                <Grid HorizontalAlignment="Left">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" MinWidth="230" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>

                    <TextBox Name="txtName" HorizontalAlignment="Left" Margin="10,27,0,656" Text="" Width="188" Height="35" IsEnabled="False" Visibility="Hidden" />
                    <PasswordBox Name="txtPassword" HorizontalAlignment="Left" Margin="10,71,0,616" Password="" Width="188" Height="35" IsEnabled="False" Visibility="Hidden" />

                </Grid>

                <Grid HorizontalAlignment="Left" VerticalAlignment="top" Margin="0,30,0,10">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>

                    <StackPanel Height="AUTO" Grid.Row="1" Margin="10,0" HorizontalAlignment="Left" VerticalAlignment="Top">
                        <Image Name="imgBrand" Source="pack://application:,,,/WpfRadGridView;component/Images/AddBlack.png"  Width="200" Height="AUTO"></Image>
                    </StackPanel>
                    <StackPanel Height="10" Grid.Row="2" Margin="0,0">

                    </StackPanel>
                    <StackPanel Orientation="Horizontal"  Height="40" Grid.Row="3" Margin="10,0">
                        <TextBox Name="txtSerach" HorizontalAlignment="Left" Width="150" Height="25"></TextBox>
                        <telerik:Label></telerik:Label>
                        <Button Name="btnSearch" BorderBrush="Black" Width="30" Height="30" HorizontalAlignment="Left" VerticalAlignment="Center" Template="{StaticResource MyRoundButton1}" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Name="imgSearch" Source="pack://application:,,,/WpfRadGridView;component/Images/Search.png" Width="30" Height="30"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                    <StackPanel Height="40" Grid.Row="4" Margin="10,0">
                        <telerik:RadDatePicker Name="dtpFrom" Height="35" telerik:StyleManager.Theme="Windows8Touch" Style="{StaticResource dtpForStartDate}"></telerik:RadDatePicker>
                    </StackPanel>
                    <StackPanel Height="40" Grid.Row="5" Margin="10,0">
                        <telerik:RadDatePicker Name="dtpTo" Height="35" telerik:StyleManager.Theme="Windows8Touch" Style="{StaticResource dtpForEndDate}"></telerik:RadDatePicker>
                    </StackPanel>
                </Grid>

                <Grid HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="60,0,0,10">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>

                    <StackPanel Height="120" Margin="0,0">
                        <Button Name="btnNewPropertyJob" ToolTip="Click to add new job" BorderBrush="Black" Width="70" Height="70" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Source="pack://application:,,,/WpfRadGridView;component/Images/AddBlack.png" Width="50" Height="50"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>

                    <StackPanel Height="80" Grid.Row="1" Margin="0,0">
                        <Button Name="btnSynchronise" BorderBrush="Black" Width="70" Height="70" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Name="imgSynchronise" Source="pack://application:,,,/WpfRadGridView;component/Images/RefreshBlack.png" Width="50" Height="50"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                    <StackPanel Height="80" Grid.Row="2" Margin="0,0" Visibility="Collapsed">
                        <Button Name="btnAppointment" BorderBrush="Black" Width="70" Height="70" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Name="imgAppointment" Source="pack://application:,,,/WpfRadGridView;component/Images/AddBlack.png" Width="50" Height="50"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                    <StackPanel Height="80" Grid.Row="3" Margin="0,0">
                        <Button Name="btnSignOut" BorderBrush="Black" Width="70" Height="70" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Source="pack://application:,,,/WpfRadGridView;component/Images/SignOutBlack.png"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                    <StackPanel Height="80" Grid.Row="4" Margin="0,0">
                        <Button Name="btnHelp" BorderBrush="Black" Width="70" Height="70" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Source="pack://application:,,,/WpfRadGridView;component/Images/Help.png"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                    <StackPanel Name="sbHelpForImportJob"  Height="80" Grid.Row="5" Margin="0,0" Visibility="Collapsed">
                        <Button Name="btnHelpForImportJob" BorderBrush="Black" Width="70" Height="70" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Source="pack://application:,,,/WpfRadGridView;component/Images/Help.png"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>
                </Grid>
            </Grid>

            <Grid Margin="240,0,0,0" Width="Auto" Height="Auto" HorizontalAlignment="Left" VerticalAlignment="Top">
                <Grid HorizontalAlignment="Left" VerticalAlignment="Stretch">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                    </Grid.RowDefinitions>

                    <StackPanel Name="spImportJob" Height="55" Margin="5,10">
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
                            <Button Name="btnGridViewRefresh" BorderBrush="Black" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" ToolTip="Click To Cancel Import" >
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                    <Image Source="pack://application:,,,/WpfRadGridView;component/Images/SignOutBlack.png" Width="50" Height="50"></Image>
                                </StackPanel>
                            </Button>
                            <telerik:Label Content=""></telerik:Label>
                            <telerik:Label Name="lblHeader" Content="Select any Local job from the table to run the import process." Width="Auto" Foreground="Black" FontSize="26" FontWeight="Bold"></telerik:Label>
                        </StackPanel>
                    </StackPanel>

                    <StackPanel Orientation="Horizontal" Height="AUTO" Grid.Row="1" Margin="5,10">
                        <ScrollViewer Name="svAllJobs" Width="1100" Height="670" HorizontalAlignment="Left" VerticalAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Hidden" ScrollViewer.VerticalScrollBarVisibility="Auto" PanningMode="Both" IsDeferredScrollingEnabled="True">
                            <telerik:RadGridView x:Name="gvJobAll" ShowGroupPanel="False" BorderThickness="0" GridLinesVisibility="None" HorizontalAlignment="Left" MinHeight="510" Height="Auto" Width="1100" VerticalAlignment="Top" ShowColumnHeaders="False" CanUserDeleteRows="False" CanUserInsertRows="False" SnapsToDevicePixels="True" Background="Transparent" RowIndicatorVisibility="Collapsed" CanUserFreezeColumns="False" AutoGenerateColumns="False" Grid.ColumnSpan="2" Grid.RowSpan="4" RowHeight="60" Focusable="False" FocusVisualStyle="{x:Null}" EditTriggers="None" GroupRenderMode="Flat">
                                <telerik:RadGridView.RowStyle>
                                    <Style TargetType="telerik:GridViewRow">
                                        <Setter Property="Foreground" Value="{Binding BGRowColor}"/>
                                    </Style>
                                </telerik:RadGridView.RowStyle>
                                <telerik:RadGridView.Columns>
                                    <telerik:GridViewDataColumn Background="Transparent">
                                        <telerik:GridViewDataColumn.CellTemplate>
                                            <DataTemplate>
                                                <Button Name="btnSynchroniseUp" BorderBrush="Black" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" Visibility="{Binding SyncUpVisibility}" >
                                                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                                        <Image Name="imgCol1" Source="pack://application:,,,/WpfRadGridView;component/Images/SyncUpBlack.png" Tag="{Binding PropertyJobID}" MouseLeftButtonDown="imgCol1_MouseLeftButtonDown" Width="50" Height="50" ></Image>
                                                    </StackPanel>
                                                </Button>
                                            </DataTemplate>
                                        </telerik:GridViewDataColumn.CellTemplate>
                                    </telerik:GridViewDataColumn>

                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding AppointmentDate}" DataFormatString="{} {0:dd MMM yyyy}"  CellStyle="{StaticResource GridViewCellStyle1}" Width="155" />
                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding Location}" CellStyle="{StaticResource GridViewCellStyle1}" Width="220" TextWrapping="Wrap" />
                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding SellerNames}" CellStyle="{StaticResource GridViewCellStyle1}" Width="205" TextWrapping="Wrap" />
                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding ReapitID}" CellStyle="{StaticResource GridViewCellStyle1}" Width="155" TextWrapping="Wrap" />
                                    <telerik:GridViewDataColumn Background="Transparent" Width="150" TextWrapping="Wrap">
                                        <telerik:GridViewDataColumn.CellTemplate>
                                            <DataTemplate>
                                                <Button Name="btnJobStatus" ToolTip="Click to change Job Status" Width="140" Height="50" Tag="{Binding PropertyJobID}"  HorizontalAlignment="Center" VerticalAlignment="Center" Template="{StaticResource MyRoundedCornerButton}" PreviewMouseLeftButtonDown="Lookup_ForAddJobStatus" Visibility="{Binding JobStatusVisibility}">
                                                    <TextBlock TextAlignment="Center" TextWrapping="WrapWithOverflow" Text="{Binding JobStatus}" FontSize="16"></TextBlock>
                                                </Button>
                                            </DataTemplate>
                                        </telerik:GridViewDataColumn.CellTemplate>
                                    </telerik:GridViewDataColumn>
                                    <telerik:GridViewDataColumn Background="Transparent">
                                        <telerik:GridViewDataColumn.CellTemplate>
                                            <DataTemplate>
                                                <Button Name="btnDeleteAndImportPropertyJob" BorderBrush="Black" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" Visibility="{Binding DeleteAndImportVisibility}" >
                                                    <StackPanel Name="spDeleteAndImportPropertyJob"  Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                                        <Image Name="imgColDeletePropertyJob" ToolTip="Click to delete" Source="pack://application:,,,/WpfRadGridView;component/Images/Delete.png" Tag="{Binding PropertyJobID}" MouseLeftButtonDown="imgColDeletePropertyJob_MouseLeftButtonDown" Width="50" Height="50" Visibility="{Binding DeleteVisibility}"></Image>
                                                        <Image Name="imgColImportPropertyJob" ToolTip="Click to Import" Source="pack://application:,,,/WpfRadGridView;component/Images/ImportBlack.png" Tag="{Binding PropertyJobID}" MouseLeftButtonDown="imgColImportPropertyJob_MouseLeftButtonDown" Width="50" Height="50" Visibility="{Binding ImportVisibility}"></Image>
                                                        <Image Name="imgColImportComplete" ToolTip="Click to Complete Import" Source="pack://application:,,,/WpfRadGridView;component/Images/OKBlack.png" Tag="{Binding PropertyJobID}" MouseLeftButtonDown="imgColImportComplete_MouseLeftButtonDown" Width="50" Height="50" Visibility="{Binding ImportCompleteVisibility}"></Image>
                                                    </StackPanel>
                                                </Button>
                                            </DataTemplate>
                                        </telerik:GridViewDataColumn.CellTemplate>
                                    </telerik:GridViewDataColumn>
                                    <telerik:GridViewDataColumn Background="Transparent">
                                        <telerik:GridViewDataColumn.CellTemplate>
                                            <DataTemplate>
                                                <Button Name="btnJobLaunch" BorderBrush="Black" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" Visibility="{Binding NavigationVisibility}" >
                                                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                                        <Image Name="imgColJobLaunch" Source="pack://application:,,,/WpfRadGridView;component/Images/SignInBlack.png" ToolTip="{Binding Location}" Tag="{Binding PropertyJobID}" MouseLeftButtonDown="imgColJobLaunch_MouseLeftButtonDown" Width="50" Height="50" ></Image>
                                                    </StackPanel>
                                                </Button>
                                            </DataTemplate>
                                        </telerik:GridViewDataColumn.CellTemplate>
                                    </telerik:GridViewDataColumn>
                                </telerik:RadGridView.Columns>
                            </telerik:RadGridView>
                        </ScrollViewer>
                    </StackPanel>
                </Grid>
            </Grid>
        </Grid>
        <Grid HorizontalAlignment="Left">
            <Line x:Name="lnLeftTopToBottom" X1="10" Y1="3" X2="10" Y2="120" Stroke="LightGray" StrokeThickness="1" Margin="230,10,1071,10" Stretch="Fill" />
        </Grid>
        <Grid HorizontalAlignment="Right" VerticalAlignment="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <Image HorizontalAlignment="Right" VerticalAlignment="Top" Name="imgCloseWindow" Source="pack://application:,,,/WpfRadGridView;component/Images/CloseWindow.png" Height="40" Width="40" Visibility="Hidden" />
        </Grid>
    </Grid>
</Window>


5. Home.xaml.vb

Imports System.Data
Imports System.Threading
Imports System.Collections.ObjectModel
Imports Telerik.Windows.Controls
Imports System

Imports System.Net
Imports System.IO
Imports System.Collections.Specialized

Public Class Home
    Implements IDisposable

    Private WithEvents bgwOpenJob As New System.ComponentModel.BackgroundWorker()

    Dim SearchText As String = ""
    Dim SearchDateFrom As Date?
    Dim SearchDateTo As Date?

    Private MyAllJobTable As New DataTable()

    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

        ''txtName.Text = vUserName
        ''txtPassword.Password = vPassword

        Me.WindowSizeWithMargin()

        Me.FillPropertyJob()

        Me.LoadBrandLogo()

        bgwOpenJob.WorkerReportsProgress = True
        bgwOpenJob.WorkerSupportsCancellation = True
    End Sub

    Private Sub LoadBrandLogo()
        imgBrand.Source = Nothing
    End Sub

    Dim MyJobAllObject As New ObservableCollection(Of JobAllObject)()
    Private Sub FillPropertyJob()
        MyJobAllObject = New ObservableCollection(Of JobAllObject)()
        MyJobAllObject = JobAllObject.Load(PropertyJobIDTo, SearchText, SearchDateFrom, SearchDateTo)
        gvJobAll.ItemsSource = MyJobAllObject

        If PropertyJobIDTo > 0 Then
            ''Show import message section when import button has been clicked
            spImportJob.Visibility = Windows.Visibility.Visible
        Else
            ''Hide import message section as import button has not been clicked
            spImportJob.Visibility = Windows.Visibility.Collapsed
        End If
    End Sub

    Private Sub FillPropertyJobWithSerachFunctionality()
        Dim _jobsWithSearch As New ObservableCollection(Of JobAllObject)()

        For Each _job In MyJobAllObject
            If (SearchText.Trim().Length > 0) And (Not SearchDateFrom Is Nothing) And (Not SearchDateTo Is Nothing) Then
                If ((_job.Location.ToLower().Contains(SearchText.Trim().ToLower())) Or (_job.SellerNames.ToLower().Contains(SearchText.Trim().ToLower())) Or (_job.ReapitID.ToLower().Contains(SearchText.Trim().ToLower()))) And ((_job.AppointmentDate >= Format(SearchDateFrom, cDateFormat)) And (_job.AppointmentDate <= Format(SearchDateTo, cDateFormat))) Then
                    If PropertyJobIDTo > 0 Then
                        ''_job.DeleteAndImportVisibility  = "Hidden"
                        _job.DeleteAndImportVisibility = "Visible"
                        _job.DeleteVisibility = "Collapsed"
                        _job.ImportVisibility = "Collapsed"
                        _job.ImportCompleteVisibility = "Visible"
                        _job.NavigationVisibility = "Hidden"

                        ''Enabled when any PropertyJob has been clicked for Importing data from Local Job
                        If _job.PropertyJobID < 0 Then
                            _jobsWithSearch.Add(_job)
                        End If
                    Else
                        _jobsWithSearch.Add(_job)
                    End If
                End If
            ElseIf (SearchText.Trim().Length > 0) And ((SearchDateFrom Is Nothing) Or (SearchDateTo Is Nothing)) Then
                If ((_job.Location.ToLower().Contains(SearchText.Trim().ToLower())) Or (_job.SellerNames.ToLower().Contains(SearchText.Trim().ToLower())) Or (_job.ReapitID.ToLower().Contains(SearchText.Trim().ToLower()))) Then
                    If PropertyJobIDTo > 0 Then
                        ''_job.DeleteAndImportVisibility  = "Hidden"
                        _job.DeleteAndImportVisibility = "Visible"
                        _job.DeleteVisibility = "Collapsed"
                        _job.ImportVisibility = "Collapsed"
                        _job.ImportCompleteVisibility = "Visible"
                        _job.NavigationVisibility = "Hidden"

                        ''Enabled when any PropertyJob has been clicked for Importing data from Local Job
                        If _job.PropertyJobID < 0 Then
                            _jobsWithSearch.Add(_job)
                        End If
                    Else
                        _jobsWithSearch.Add(_job)
                    End If
                End If
            ElseIf (SearchText.Trim().Length = 0) And (Not SearchDateFrom Is Nothing) And (Not SearchDateTo Is Nothing) Then
                If ((_job.AppointmentDate >= Format(SearchDateFrom, cDateFormat)) And (_job.AppointmentDate <= Format(SearchDateTo, cDateFormat))) Then
                    If PropertyJobIDTo > 0 Then
                        ''_job.DeleteAndImportVisibility  = "Hidden"
                        _job.DeleteAndImportVisibility = "Visible"
                        _job.DeleteVisibility = "Collapsed"
                        _job.ImportVisibility = "Collapsed"
                        _job.ImportCompleteVisibility = "Visible"
                        _job.NavigationVisibility = "Hidden"

                        ''Enabled when any PropertyJob has been clicked for Importing data from Local Job
                        If _job.PropertyJobID < 0 Then
                            _jobsWithSearch.Add(_job)
                        End If
                    Else
                        _jobsWithSearch.Add(_job)
                    End If
                End If
            Else
                ''Enabled when any PropertyJob has been clicked for Importing data from Local Job
                If PropertyJobIDTo > 0 Then
                    ''_job.DeleteAndImportVisibility  = "Hidden"
                    _job.DeleteAndImportVisibility = "Visible"
                    _job.DeleteVisibility = "Collapsed"
                    _job.ImportVisibility = "Collapsed"
                    _job.ImportCompleteVisibility = "Visible"
                    _job.NavigationVisibility = "Hidden"

                    ''Enabled when any PropertyJob has been clicked for Importing data from Local Job
                    If _job.PropertyJobID < 0 Then
                        _jobsWithSearch.Add(_job)
                    End If
                Else
                    _jobsWithSearch.Add(_job)
                End If
            End If
        Next

        gvJobAll.ItemsSource = _jobsWithSearch

        If PropertyJobIDTo > 0 Then
            ''Show import message section when import button has been clicked
            spImportJob.Visibility = Windows.Visibility.Visible
        Else
            ''Hide import message section as import button has not been clicked
            spImportJob.Visibility = Windows.Visibility.Collapsed
        End If
    End Sub

    Private Sub Window_SizeChanged_1(sender As Object, e As SizeChangedEventArgs)
        Me.WindowSizeWithMargin()
    End Sub

    Private Sub WindowSizeWithMargin()
        If Me.ActualWidth > 0 Then gvJobAll.Width = Me.ActualWidth - 266

        If Me.ActualWidth > 0 Then svAllJobs.Width = Me.ActualWidth - 266
        If Me.ActualHeight > 0 Then svAllJobs.Height = Me.ActualHeight - 40

    End Sub

    Private Sub gvJobAll_RowLoaded(sender As Object, e As Telerik.Windows.Controls.GridView.RowLoadedEventArgs) Handles gvJobAll.RowLoaded
        Dim _row = TryCast(e.Row, Telerik.Windows.Controls.GridView.GridViewRow)
        If _row IsNot Nothing Then
            If (TypeOf e.Row Is Telerik.Windows.Controls.GridView.GridViewRow) AndAlso ((Not TypeOf e.Row Is Telerik.Windows.Controls.GridView.GridViewNewRow) Or (Not TypeOf e.Row Is Telerik.Windows.Controls.GridView.GridViewHeaderRow)) Then
                ''ToDo
            End If
        End If
    End Sub

    Private Sub imgColImportComplete_MouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs)
        
    End Sub

    Private Sub Lookup_ForAddJobStatus(sender As Object, e As RoutedEventArgs)
        
    End Sub

    Public Sub UpdateJobStatus(ByVal vPropertyJobID As Integer, ByVal vJobStatusValue As String)
        Me.FillPropertyJob()
    End Sub

    Private Sub ImportDataForSelectedPropertyJob()
        
    End Sub

    Private Sub DeleteAttachmentFileFromOnlineJobIfExistsInLocalJob(ByVal vFileName As String)
        
    End Sub

    Private Sub WriteLog(message As String)
       
    End Sub

    Dim HasAlreadyAnySyncError As Boolean = False ''To have flag if there is any sync error already then we will ignore to show multiple error message
    Private Sub btnSynchronise_Click(sender As Object, e As RoutedEventArgs) Handles btnSynchronise.Click
        
    End Sub

    Private Sub Grid_MouseDown_1(sender As Object, e As MouseButtonEventArgs)

    End Sub

    Private Sub gvJob_RowLoaded(sender As Object, e As Telerik.Windows.Controls.GridView.RowLoadedEventArgs) '' Handles gvJob.RowLoaded
        Try
            e.Row.Background = New SolidColorBrush(Colors.Transparent)
        Catch ex As Exception

        End Try
    End Sub

    Private Function UpdatePropertyJobModifiedOnWebsite(ByVal vObj As Object) As Boolean
        Return True
    End Function

    Private Function DeleteUnWantedRecords(ByVal vPropertyJobID As Integer) As Boolean
        Return True
    End Function

    Private Sub DeleteAllRelatedDataForLocalPropertyJobRecord(ByVal vPropertyJobID As Integer)
        
    End Sub

    Private Shared Function CreateMD5StringFromFile(ByVal fileName As String) As String
        Return ""
    End Function

    Private Sub DeleteRowsForPropertyJobID(ByVal tableAdapter As Object, ByVal propertyJobID As Integer)
        
    End Sub

    Private Function GetAllRowsForPropertyJobID(ByVal tableAdapter As Object, ByVal propertyJobID As Integer) As DataTable
        Return Nothing
    End Function

    Private Sub btnSignOut_Click(sender As Object, e As RoutedEventArgs) Handles btnSignOut.Click
        Application.Current.Shutdown()
    End Sub

    Private Sub btnAppointment_Click(sender As Object, e As RoutedEventArgs) Handles btnAppointment.Click
        
    End Sub

    Private Sub btnHelp_MouseLeftButtonDown(sender As Object, e As RoutedEventArgs) Handles btnHelp.Click
        
    End Sub

    Private Sub imgColJobLaunch_MouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs)
        Dim _img = CType(sender, Image)

        If Not _img Is Nothing Then
            ''Dim _id As Integer = _img.Tag

            Dim _propertyJobID As Integer = _img.Tag
            Dim _propertyAddress As String = _img.ToolTip
            Dim wd As New MainMenu()
            wd.Show()
            Me.Close()

        End If
    End Sub

    Private Sub imgColDeletePropertyJob_MouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs)
        
    End Sub

    Dim PropertyJobIDTo As Integer = 0 ''PropertyJobID which having Import button
    Dim PropertyJobIDFrom As Integer = 0 ''Local Job
    Private Sub imgColImportPropertyJob_MouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs)
        
    End Sub

    Private Sub imgColRefreshPropertyJob_MouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs)
        
    End Sub

    Private Sub imgCloseWindow_MouseDown(sender As Object, e As MouseButtonEventArgs) Handles imgCloseWindow.MouseDown
        Me.Close()
    End Sub

    Private Sub btnSearch_Click(sender As Object, e As RoutedEventArgs) Handles btnSearch.Click
        
    End Sub

    Private Sub btnNewPropertyJob_Click(sender As Object, e As RoutedEventArgs) Handles btnNewPropertyJob.Click
        
    End Sub

    Private Sub imgCol1_MouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs)

    End Sub

    Private Sub Me_Closed(sender As Object, e As EventArgs) Handles Me.Closed
        ''Release memory while closing window
        Me.Dispose()
    End Sub

#Region "IDisposable Support"
    Private disposedValue As Boolean ' To detect redundant calls

    ' IDisposable
    Protected Overridable Sub Dispose(disposing As Boolean)
        If Not Me.disposedValue Then
            If disposing Then
                ' TODO: dispose managed state (managed objects).
            End If

            ' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below.
            ' TODO: set large fields to null.

            ''Forcing Garbage Collector to reclaim memory
            GC.Collect()
            GC.WaitForPendingFinalizers()
            GC.Collect()
        End If
        Me.disposedValue = True
    End Sub

    ' TODO: override Finalize() only if Dispose(ByVal disposing As Boolean) above has code to free unmanaged resources.
    'Protected Overrides Sub Finalize()
    '    ' Do not change this code.  Put cleanup code in Dispose(ByVal disposing As Boolean) above.
    '    Dispose(False)
    '    MyBase.Finalize()
    'End Sub

    ' This code added by Visual Basic to correctly implement the disposable pattern.
    Public Sub Dispose() Implements IDisposable.Dispose
        ' Do not change this code.  Put cleanup code in Dispose(disposing As Boolean) above.
        Dispose(True)
        GC.SuppressFinalize(Me)
    End Sub
#End Region

End Class


6. MainMenu.xaml

<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:Chromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
    xmlns:System="clr-namespace:System;assembly=mscorlib" x:Class="MainMenu"
    Title="Main Menu" Height="768" Width="1366" WindowState="Maximized" SizeChanged="Window_SizeChanged_1" MinHeight="768" MinWidth="1366" FontFamily="Segoe UI" WindowStyle="None">

    <Window.Resources>
        <!--<Style TargetType="telerik:Label">
            <Setter Property="FontSize" Value="30"></Setter>
            <Setter Property="FontStyle" Value="Italic"></Setter>
            <Setter Property="VerticalAlignment" Value="Center"></Setter>
        </Style>-->
    </Window.Resources>

    <Grid x:Name="LayoutRoot3">
        <Grid.Background>
            <ImageBrush x:Name="imgBG"/>
        </Grid.Background>

        <Grid HorizontalAlignment="Left" Background="Transparent" VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <StackPanel Name="spDummyTop" Orientation="Horizontal" Height="1" Width="1340" Margin="10,0"></StackPanel>

            <StackPanel Orientation="Horizontal" Height="55" Margin="0,0" Grid.Row="1" HorizontalAlignment="Right">
                <!--<Image Name="imgCloseWindow" Source="pack://application:,,,/WpfRadGridView;component/Images/CloseWindow.png" Width="40" Height="40"></Image>-->
                <!--<Button Name="btnCloseWindow" BorderBrush="Black" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" >
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                        <Image Source="pack://application:,,,/WpfRadGridView;component/Images/SignOutBlack.png"></Image>
                    </StackPanel>
                </Button>-->
            </StackPanel>

            <StackPanel Orientation="Horizontal" Height="50" Margin="10,0" HorizontalAlignment="Center"  Grid.Row="2">
                <telerik:Label Name="lblPropertyAddress" Content="Flat 6, 2 Winders Road, Battersea" FontSize="30px" FontStyle="Italic" ></telerik:Label>
            </StackPanel>

            <StackPanel Orientation="Horizontal" Height="225" Margin="10,5" Grid.Row="3" HorizontalAlignment="Center">
                <StackPanel Orientation="Horizontal" Height="215" Margin="10,10" HorizontalAlignment="Center" VerticalAlignment="Center">
                    <StackPanel Orientation="Vertical" Height="200" Margin="10,10" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Image Name="imgPresentation" Source="pack://application:,,,/WpfRadGridView;component/Images/Yes.png" Visibility="Collapsed"></Image>
                        <telerik:Label Height="15"></telerik:Label>
                        <Button Name="btnPresentation" BorderBrush="Black" Width="150" Height="150" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButtonOnMainMenu}" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Name="imgPresentation2" Source="pack://application:,,,/WpfRadGridView;component/Images/PresentationSmallYes.png" Width="50" Height="50"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Height="200" Margin="10,10" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Image Name="imgPropertyInformation" Source="pack://application:,,,/WpfRadGridView;component/Images/Yes.png" Visibility="Collapsed"></Image>
                        <telerik:Label Height="15"></telerik:Label>
                        <Button Name="btnPropertyInformation" BorderBrush="Black" Width="150" Height="150" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButtonOnMainMenu}" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Name="imgPropertyInformation2" Source="pack://application:,,,/WpfRadGridView;component/Images/InfoSmallYes.png" Width="50" Height="50"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Height="200" Margin="10,10" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Image Name="imgFloorPlan" Source="pack://application:,,,/WpfRadGridView;component/Images/Yes.png" Visibility="Collapsed"></Image>
                        <telerik:Label Height="15"></telerik:Label>
                        <Button Name="btnFloorPlan" BorderBrush="Black" Width="150" Height="150" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButtonOnMainMenu}" IsEnabled="True" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Name="imgFloorPlan2" Source="pack://application:,,,/WpfRadGridView;component/Images/FloorPlanYes.png" Width="50" Height="50"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Height="200" Margin="10,10" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Image Name="imgPhotos" Source="pack://application:,,,/WpfRadGridView;component/Images/Yes.png" Visibility="Collapsed"></Image>
                        <telerik:Label Height="15"></telerik:Label>
                        <Button Name="btnPhotos" BorderBrush="Black" Width="150" Height="150" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButtonOnMainMenu}" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Name="imgPhotos2" Source="pack://application:,,,/WpfRadGridView;component/Images/PhotoSmallYes.png" Width="50" Height="50"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Height="200" Margin="10,10" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Image Name="imgDocuments" Source="pack://application:,,,/WpfRadGridView;component/Images/Yes.png" Visibility="Collapsed"></Image>
                        <telerik:Label Height="15"></telerik:Label>
                        <Button Name="btnDocuments" BorderBrush="Black" Width="150" Height="150" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButtonOnMainMenu}" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Name="imgDocuments2" Source="pack://application:,,,/WpfRadGridView;component/Images/DocumentSmallYes.png" Width="50" Height="50"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>

                    <StackPanel Orientation="Vertical" Height="200" Margin="10,10" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
                        <Image Name="imgVirtualTour" Source="pack://application:,,,/WpfRadGridView;component/Images/Yes.png"></Image>
                        <telerik:Label Height="15"></telerik:Label>
                        <Button Name="btnVirtualTour" BorderBrush="Black" Width="150" Height="150" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" >
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                                <Image Name="imgVirtualTour2" Source="pack://application:,,,/WpfRadGridView;component/Images/VirtualTourSmallYes.png" Width="50" Height="50"></Image>
                            </StackPanel>
                        </Button>
                    </StackPanel>

                    <StackPanel Name="sbXSD" Orientation="Vertical" Height="200" Margin="10,10" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Image Source="pack://application:,,,/WpfRadGridView;component/Images/Yes.png" Visibility="Collapsed"></Image>
                        <telerik:Label Height="15"></telerik:Label>
                        <Button Name="btnTestOutputXSD" BorderBrush="Black" Width="150" Height="150" Content="XSD (Test only)" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButtonOnMainMenu}" >

                        </Button>
                    </StackPanel>

                    <StackPanel Name="sbXML" Orientation="Vertical" Height="200" Margin="10,10" HorizontalAlignment="Center" VerticalAlignment="Center">
                        <Image Source="pack://application:,,,/WpfRadGridView;component/Images/Yes.png" Visibility="Collapsed"></Image>
                        <telerik:Label Height="15"></telerik:Label>
                        <Button Name="btnTestOutputXML" BorderBrush="Black" Width="150" Height="150" Content="XML (Test only)" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButtonOnMainMenu}" >

                        </Button>
                    </StackPanel>
                </StackPanel>
            </StackPanel>
        </Grid>

        <Grid HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="60,0,0,10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <StackPanel Height="80" Grid.Row="1" Margin="0,0">
                <Button Name="btnMainHome" BorderBrush="Black" Width="70" Height="70" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" >
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                        <Image Source="pack://application:,,,/WpfRadGridView;component/Images/MainHome.png"/>
                    </StackPanel>
                </Button>
            </StackPanel>
            <StackPanel Height="80" Grid.Row="2" Margin="0,0" Visibility="Collapsed">
                <Button Name="btnKey" BorderBrush="Black" Width="70" Height="70" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" >
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                        <Image Source="pack://application:,,,/WpfRadGridView;component/Images/Key.png"></Image>
                    </StackPanel>
                </Button>
            </StackPanel>
            <StackPanel Height="80" Grid.Row="3" Margin="0,0">
                <Button Name="btnHelp" BorderBrush="Black" Width="70" Height="70" HorizontalAlignment="Left" VerticalAlignment="Top" Template="{StaticResource MyRoundButton}" >
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" >
                        <Image Source="pack://application:,,,/WpfRadGridView;component/Images/Help.png"></Image>
                    </StackPanel>
                </Button>
            </StackPanel>
        </Grid>

        <Grid x:Name="grdProgressIndicator" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Hidden">
            <telerik:RadBusyIndicator x:Name="MyBusiIndicator" IsBusy="True" Height="113"/>
        </Grid>
    </Grid>
</Window>


7. MainMenu.xaml.vb

Public Class MainMenu

    Public Sub New()

        ' This call is required by the designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.

        Me.WindowSizeWithMargin()
    End Sub

    Private Sub Window_SizeChanged_1(sender As Object, e As SizeChangedEventArgs)
        Me.WindowSizeWithMargin()
    End Sub

    Private Sub WindowSizeWithMargin()
        Dim _wt2 As New System.Windows.Thickness()
        _wt2.Top = Me.Height - 47
        _wt2.Bottom = 0
        _wt2.Left = 0
        _wt2.Right = 0
        ''spBottom.Margin = _wt2

        If Me.ActualWidth > 0 Then spDummyTop.Width = Me.ActualWidth - 26
    End Sub

    Private Sub btnMainHome_Click(sender As Object, e As RoutedEventArgs) Handles btnMainHome.Click
        Dim _wd As New Home()
        _wd.Show()
        Me.Close()
    End Sub
End Class


8. Attached images for 'Images' folder


Regards,

Hassan


Tags
GridView
Asked by
Dean
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Dean
Top achievements
Rank 1
Mike Picco
Top achievements
Rank 1
Maya
Telerik team
Vikash
Top achievements
Rank 1
Hassan
Top achievements
Rank 1
Share this question
or