Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

GridViewColumn url wpf

    private void Hyperlink_OnClick(object sender, RoutedEventArgs e)
    {
        var hl = e.OriginalSource as System.Windows.Documents.Hyperlink;
        Process.Start(hl.NavigateUri.AbsoluteUri);
    }
Comment

GridViewColumn url wpf

        private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
    {
        Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
        e.Handled = true;
    }

    //

    private void CreateDynamicGridView()
    {
        // Create a GridView  
        GridView grdView = new GridView();
        grdView.AllowsColumnReorder = true;
        grdView.ColumnHeaderToolTip = "Authors";

        GridViewColumn nameColumn = new GridViewColumn();
        nameColumn.DisplayMemberBinding = new Binding("Name");
        nameColumn.Header = "Author Name";
        nameColumn.Width = 120;
        grdView.Columns.Add(nameColumn);

        GridViewColumn ageColumn = new GridViewColumn();
        ageColumn.DisplayMemberBinding = new Binding("Age");
        ageColumn.Header = "Age";
        ageColumn.Width = 30;
        grdView.Columns.Add(ageColumn);

        GridViewColumn bookColumn = new GridViewColumn();
        bookColumn.DisplayMemberBinding = new Binding("Book");
        bookColumn.Header = "Book";
        bookColumn.Width = 250;
        grdView.Columns.Add(bookColumn);

        GridViewColumn mvpColumn = new GridViewColumn();
        mvpColumn.DisplayMemberBinding = new Binding("Mvp");
        mvpColumn.Header = "Mvp";
        mvpColumn.Width = 50;
        grdView.Columns.Add(mvpColumn);

        ListView1.View = grdView;
    }


    private ArrayList AuthorsList()
    {
        ArrayList list = new ArrayList();
        list.Add(new Author("http://google.com", "Mahesh Chand", 30, "ADO.NET Programming", true));
        list.Add(new Author("http://facebook.com", "Mike Gold", 35, "Programming C#", true));
        list.Add(new Author("http://google.com", "Raj Kumar", 25, "WPF Cookbook", false));
        list.Add(new Author("http://ok.ru", "Tony Parker", 48, "VB.NET Coding", false));
        list.Add(new Author("http://mail.ru", "Renee Ward", 22, "Coding Standards", true));
        list.Add(new Author("http://ya.ru", "Praveen Kumar", 33, "Vista Development", false));

        return list;
    }

    private void MenuItem_Click(object sender, RoutedEventArgs e)
    {

    }
}


public class Author
{
    public Author(string url, string authorName, Int16 authorAge, string authorBook, bool authorMVP)
    {
        this.Url = url;
        this.Name = authorName;
        this.Age = authorAge;
        this.Book = authorBook;
        this.Mvp = authorMVP;
    }

    private string _url;
    public string Url
    {
        get { return _url; }
        set { _url = value; }
    }

    private string name;

    public string Name
    {
        get { return name; }
        set { name = value; }
    }
    private Int16 age;

    public Int16 Age
    {
        get { return age; }
        set { age = value; }
    }
    private string book;

    public string Book
    {
        get { return book; }
        set { book = value; }
    }
    private bool mvp;

    public bool Mvp
    {
        get { return mvp; }
        set { mvp = value; }
    }

}
Comment

PREVIOUS NEXT
Code Example
Csharp :: Event that fires during DataGridViewComboBoxColumn SelectedIndexChanged 
Csharp :: c# convert address to int 
Csharp :: asp.net core get current culture in controller 
Csharp :: c# propertyinfo indexof 
Csharp :: telerik raddatepicker default date today wpf 
Csharp :: allelrt box wpf 
Csharp :: read text c# 
Csharp :: how to detect a null bool C# 
Csharp :: delete content from file c# 
Csharp :: sequelize instance method is not a function 
Csharp :: unknown discriminator value mongodb 
Csharp :: c# statements 
Csharp :: get child index unity 
Csharp :: Entity Framework 4 and caching of query results 
Csharp :: DataTable GetErrors 
Csharp :: check if variable less than in f# 
Csharp :: difference between %e/E, %f/F and %g/G in program C 
Csharp :: get the next letter after specific character in c# 
Csharp :: record keyword c# 
Csharp :: Console.WriteLine($"Hello {Ana.ToUpper($)}!"); 
Csharp :: c# dictionary key set 
Csharp :: asp.net core mvc razor page call pagemodel actio 
Csharp :: wpf string to byte array 
Csharp :: how to remove a parten transform unity 
Csharp :: c# try catch multiple catches 
Csharp :: How to do a comment in c# 
Csharp :: temp^late php table for mysql 
Csharp :: Razor while loop 
Csharp :: C# list of unique values with group and counts 
Csharp :: c# check if list is empty 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =