CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of View
SQL
 
 
 
 /*************************************************************************************
  *
  *        Copyright 2012 Davide Orazio Montersino http://www.davidemontersino.com
  *
  *        This program is free software: you can redistribute it and/or modify
  *        it under the terms of the GNU General Public License as published by
  *        the Free Software Foundation, either version 3 of the License, or
by Davide Orazio Montersino   January 10, 2012 @ 2:19am
59 Views
no comments
 
C#
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interactivity;
using System.Windows.Threading;
 
namespace Behaviors
{
    /// <summary>
    /// On ListBoxes using CanContentScroll=True (virtualized), WPF layout changes will make the scrollviewer reset to zero.
by SandRock   October 26, 2011 @ 12:01am
95 Views
no comments
 
SQL
USE <%DatabaseName%>
GO
SELECT t.name AS table_name,
SCHEMA_NAME(schema_id) AS schema_name,
c.name AS column_name
FROM sys.tables AS t
INNER JOIN sys.columns c ON t.OBJECT_ID = c.OBJECT_ID
WHERE c.name LIKE '%UserName%'
ORDER BY schema_name, table_name; 
by Egli   August 25, 2011 @ 4:50pm
67 Views
no comments
 
<asp:ListView ID="ListView_Example" runat="server" >
    <LayoutTemplate>
        <ul>
           <asp:PlaceHolder ID="PlaceHolder_Example" runat="server" />
        </ul>
    </LayoutTemplate>
    <ItemTemplate>
        <li>
           <a href="<%=Eval("ExampleLink")%>"><%=Eval("ExampleName")%></a><%=Eval("ExampleSeparator")%>
        </li>
by Egli   July 19, 2011 @ 7:10pm
Tags: .NET, ListView
92 Views
no comments
 
C#
namespace WindowsFormsApplication1
{
    public partial class Form1 : System.Windows.Forms.Form
    {
        public Form1()
        {
            InitializeComponent();
 
            // create list of data
            var _List = new System.Collections.Generic.List<Data> 
by Jerry Nixon   January 24, 2011 @ 2:17pm
1724 Views
1 comments
 
C#
public interface IView
{
    event EventHandler Load;
}
 
public class Presenter
{
    private IView _View;
 
    public Presenter(IView view)
by Cat   October 22, 2010 @ 3:11am
212 Views
no comments
 
C#
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Windows.Data;
 
namespace VMLocatorSample.ViewModels
{
    public class ViewModelLocator
by Bobby Diaz   March 31, 2010 @ 8:44am
1110 Views
no comments
 
C#
private void dataGridViewOrders_SelectionChanged(object sender, EventArgs e)
{
    dataGridViewOrderDetails.DataSource = null;
    if (dataGridViewOrders.SelectedRows.Count == 0) return;
 
    DataGridViewRow row = dataGridViewOrders.SelectedRows[0];
    if (row == null) return;
 
    int orderId = int.Parse(row.Cells["OrderId"].Value.ToString());
by dereklawless   February 12, 2010 @ 9:43pm
163 Views
no comments
 
C#
private void treeViewCustomer_MouseUp(object sender, MouseEventArgs e)
{
    if (e.Button == MouseButtons.Right)
    {
        treeViewCustomer.SelectedNode =
            treeViewCustomer.GetNodeAt(e.Location);
 
        contextMenuStripCustomer.Show((Control)sender, e.Location);
    }
}
by dereklawless   February 12, 2010 @ 9:41pm
Tags: TreeView
222 Views
no comments
 
C#
public partial class _Default : System.Web.UI.Page
{
    private bool mInserted = false;
 
    protected void Page_Load(object sender, EventArgs e) {
        mInserted = false;
    }
    protected void ASPxGridView1_CustomJSProperties(object sender, ASPxGridViewClientJSPropertiesEventArgs e) {
        e.Properties["cpIsInserted"] = mInserted.ToString();
    }
by Mehul Harry   January 08, 2010 @ 4:08pm
682 Views
no comments
 
    <dxwgv:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False"
        DataSourceID="AccessDataSource1" KeyFieldName="CategoryID" 
        OnCustomJSProperties="ASPxGridView1_CustomJSProperties" 
        onrowinserted="ASPxGridView1_RowInserted">
        <ClientSideEvents EndCallback="function(s, e) {
    if (s.cpIsInserted == 'True') alert('Inserted!');
}" />
by Mehul Harry   January 08, 2010 @ 4:07pm
1163 Views
no comments
 
C#
    protected void ASPxButton1_Click(object sender, EventArgs e)
    {
        object key = ASPxGridView1.GetRowValues(2, "CategoryID");
        ASPxGridView1.Selection.SelectRowByKey(key);
 
    }
by Mehul Harry   January 06, 2010 @ 11:49am
479 Views
no comments
 
XML
<ListView.View>
    <GridView>
        <GridView.ColumnHeaderContainerStyle>
            <Style>
                <!-- This hides the header -->
                <Setter Property="FrameworkElement.Visibility" Value="Collapsed" />
            </Style>
        </GridView.ColumnHeaderContainerStyle>
        <GridViewColumn DisplayMemberBinding="{Binding Path=Key}" />
        <GridViewColumn DisplayMemberBinding="{Binding Path=Value}" />
by Theo Lenndorff   January 06, 2010 @ 9:26am
316 Views
1 comments
 
Sub ToggleMvcBuildViews()
    DTE.ExecuteCommand("Project.UnloadProject")
    DTE.ExecuteCommand("OtherContextMenus.StubProject.EditProjectFile")
 
    Dim wasSetToTrue As Boolean = SetMvcBuildView(True)
    Dim wasSetToFalse As Boolean
    If Not wasSetToTrue Then
        wasSetToFalse = SetMvcBuildView(False)
    End If
by Al Gonzalez   December 08, 2009 @ 9:31pm
769 Views
no comments
 
<var columnClass="new [] {'span-11 column', 'span-11 column last' }" />
<div each="var item in o.Items" columnClass="${lastClass[itemIndex%2]}">
 
</div>
by David R. Longnecker   November 30, 2009 @ 2:25pm
295 Views
no comments
 
C#
public static void ExportToJpeg() {
    prepare(true);
    SaveFileDialog saveDialog = new SaveFileDialog
    {
        Filter = "JPEG Files (*.jpeg)|*.jpeg",
        DefaultExt = ".jpeg",
    };
    if ((bool)saveDialog.ShowDialog()) {
        using (Stream fileStream = saveDialog.OpenFile()) {
            WriteableBitmap bitmap = new WriteableBitmap(containerPanel, null);
by Danijel Stulic   August 17, 2009 @ 5:18am
885 Views
no comments
 
C#
[Precompile]
   public class WorkoutController : Controller
   {
       public ActionResult Index()
       {
          
               var workouts = new WorkoutRepository().GetAll();
               ViewData["workouts"] = new WorkoutIndexViewModel().Render(workouts);
               return View();
       }
by David R. Longnecker   August 10, 2009 @ 9:09pm
261 Views
no comments
 
C#
public class ShowSnippetViewModel
{
   
 
    public ShowSnippetViewModel(SnippetController controller)
    {
        this.Controller = controller;
    }
   SnippetController Controller = null;
by Rick Strahl   July 18, 2009 @ 4:38pm
204 Views
no comments
 
C#
public string GetTagLinkList(string tags)
{
    if (string.IsNullOrEmpty(tags))
        return string.Empty;
 
    string[] tagStrings = tags.Split( new char[1] {','}, StringSplitOptions.RemoveEmptyEntries);
 
    StringBuilder html = new StringBuilder();
    foreach (string tagString in tagStrings)
    {
by Rick Strahl   July 18, 2009 @ 3:41pm
217 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate