Tuesday, July 29, 2014
Instead of select the columns on your GridView using the GridView's "Edit Columns" wizard, you can use a custom SELECT statement that you write to display the appropriate columns. In this blog we will write our own custom SELECT statement to display the category name, and supplier company on our GridView control.
To specify a custom SELECT statement perform the following steps:
1. Click on the ">" icon on the SqlDataSource1 control, then click on the "Configure Data Source"
2. Click the "Next" button until you reach the "Configure the Select Statement" screen, select the "Specify a custom SQL statement or stored procedure" radio button. Then click the "Next" button
4. On the "Test Query" screen click on the "Test Query" button see the results that the query will bring back. Notice that on columns Category, and Supplier the data from the CategoryName and CompanyName fields are displayed, respectively. Click "Finish"
5. Now the GridView is populated with the columns specified in the custom SELECT statement
Next: Entity Framework (Database First) Part 2: Creating Entity Model From an Existing Database Entity Framework 6.1.1
To specify a custom SELECT statement perform the following steps:
1. Click on the ">" icon on the SqlDataSource1 control, then click on the "Configure Data Source"
2. Click the "Next" button until you reach the "Configure the Select Statement" screen, select the "Specify a custom SQL statement or stored procedure" radio button. Then click the "Next" button
3. On the "Define Custom Statements or Stored Procedures" screen select the "SELECT" tab, and then type in the following SELECT statement to get the CategoryName field in the Categories table, and the CompanyName field in the Suppliers table. Then click on the "Next" button.
SELECT ProductName, Categories.CategoryName AS Category, Suppliers.CompanyName AS Supplier, QuantityPerUnit, UnitPrice, UnitsInStock, UnitsOnOrder, ReorderLevel, Discontinued FROM Products,Categories,Suppliers WHERE Products.CategoryID = Categories.CategoryID AND Products.SupplierID = Suppliers.SupplierID
5. Now the GridView is populated with the columns specified in the custom SELECT statement
Next: Entity Framework (Database First) Part 2: Creating Entity Model From an Existing Database Entity Framework 6.1.1
Subscribe to:
Post Comments (Atom)
Search This Blog
Tags
Web Development
Linux
Javascript
DATA
CentOS
ASPNET
SQL Server
Cloud Computing
ASP.NET Core
ASP.NET MVC
SQL
Virtualization
AWS
Database
ADO.NET
AngularJS
C#
CSS
EC2
Iaas
System Administrator
Azure
Computer Programming
JQuery
Coding
ASP.NET MVC 5
Entity Framework Core
Web Design
Infrastructure
Networking
Visual Studio
Errors
T-SQL
Ubuntu
Stored Procedures
ACME Bank
Bootstrap
Computer Networking
Entity Framework
Load Balancer
MongoDB
NoSQL
Node.js
Oracle
VirtualBox
Container
Docker
Fedora
Java
Source Control
git
ExpressJS
MySQL
NuGet
Blogger
Blogging
Bower.js
Data Science
JSON
JavaEE
Web Api
DBMS
DevOps
HTML5
MVC
SPA
Storage
github
AJAX
Big Data
Design Pattern
Eclipse IDE
Elastic IP
GIMP
Graphics Design
Heroku
Linux Mint
Postman
R
SSL
Security
Visual Studio Code
ASP.NET MVC 4
CLI
Linux Commands
Powershell
Python
Server
Software Development
Subnets
Telerik
VPC
Windows Server 2016
angular-seed
font-awesome
log4net
servlets
tomcat
AWS CloudWatch
Active Directory
Angular
Blockchain
Collections
Compatibility
Cryptocurrency
DIgital Life
DNS
Downloads
Google Blogger
Google Chrome
Google Fonts
Hadoop
IAM
KnockoutJS
LINQ
Linux Performance
Logging
Mobile-First
Open Source
Prototype
R Programming
Responsive
Route 53
S3
SELinux
Software
Unix
View
Web Forms
WildFly
XML
cshtml
githu
Aivivu - đại lý chuyên vé máy bay trong nước và quốc tế
ReplyDeletevé máy bay đi Mỹ tháng nào rẻ nhất
các chuyến bay từ mỹ về việt nam hiện nay
ve may bay tu canada ve viet nam
giá vé từ nhật về việt nam
vé máy bay incheon hà nội
Vé máy bay từ Đài Loan về VN
vé máy bay chuyên gia sang Việt Nam
Pgslot-ogz slot game from PG camp. Ice and Fire director slot game. pgslot เว็บตรง
ReplyDeletePGSLOT เว็บตรง เจ้าใหญ่ศูนย์รวมเกมพนันออนไลน์ที่ตอบปัญหานักการพนันได้ทุกความจำเป็นเปิดรับสมัครสมาชิกฟรีไม่ต้องฝากไม่ต้องแชร์แล้ววันนี้มีทุนมากแค่ไหนก็สามารถได้กำไรได้ สมัครแค่เพียงครั้งเดียวเล่นได้ทุกเกมจากทุกค่ายได้กำไรได้ทุกวี่วันตลอด 1 วัน
ReplyDeleteสมัครเข้าใช้งานผ่านวิถีทาง รวมเว็บ SPINIX ในขณะนี้ รับฟรีโดยทันทีโบนัสแบบไม่ยั้ง ยังมากับโปรโมชั่น เครดิตฟรี 50 การันตีเบอร์ 2022 ขณะนี้ เปิดให้ใช้บริการได้ตลอด 1 วันและสามารถสร้างรายได้ได้กำไรได้ด้วยตัวเองอีกด้วย
ReplyDeleteแทงบอล ออนไลน์ พนันบอลสเต็ป บอลสันโดษ บอลสกอร์ต่ำสูง พนันบอลครึ่งใบ ใบเหลือง ใบแดง และก็ต้นแบบอื่นอีกเยอะแยะ ของการพนันบอลขึ้นตรงต่อในเวลาที่คุณพนันแล้วก็ความอยากได้เพื่อมั่นใจว่าทุกคนสามารถเข้าถึงบริการที่ยอดเยี่ยมได้
ReplyDeleteมวยพักยก ที่สามารถสามารถแปลงเป็นราคามวยมาตรฐานได้อย่างคร่าวๆ
ReplyDeleteการคลังง่ายใช้งานได้ฟรีเมื่อใดก็ตามที่คุณเข้ามาใช้งานตาราง เวลาแตกของสูตรสล็อต PG ที่คุณสามารถใช้งานได้แบบไม่มีความจำเป็นที่จะต้องลงทะเบียนสมัครสมาชิกแล้วก็ที่สำคัญข้อมูลกลุ่มนี้สามารถเชื่อถือได้และก็ได้กำไรให้กับคุณได้จริงแค่เพียงส่งเข้ามาที่แบบตรง SMEBK ของพวกเราเพียงเท่านี้คุณก็สามารถใช้งานตารางกลุ่มนี้ได้แล้วสูตรสล็อต PG สูตรสล็อต PG
ReplyDeleteเดิมพันง่าย รวมเกมไว้ทุกค่าย สล็อตเว็บตรง นำเข้าจากต้นทางอย่างถูกกฎหมาย พร้อมแอดมินบริการตลอด 24 ชั่วโมง
ReplyDeleteราคา แหวนแต่งงาน
ReplyDeleteขออธิบายว่าราคาแหวนแต่งงานนั้นขึ้นอยู่กับคุณสมบัติของแหวน เช่นวัสดุที่ใช้ในการผลิต น้ำหนัก และความละเอียดในการออกแบบ อีกทั้งยังขึ้นอยู่กับแบรนด์และที่มาของแหวนด้วย อย่างไรก็ตาม คุณสามารถหาแหวนแต่งงานที่เหมาะสมกับงบประมาณของคุณได้ตามร้านเครื่องประดับหรือออนไลน์ที่ขายแหวนแต่งงานได้เลยค่ะ
บ้านทรงไทยน็อคดาวน์
ReplyDeleteLegal Lean ของนำเข้า ไอเทมแรร์ ลิ้มรสความอร่อย ในแบบใหม่
ReplyDeleteเหมาะกับคนที่อยากความบรรเทาในรูปแบบใหม่ ที่จะทำให้ท่านสามารถเพลิดเพลินใจไปกับรสที่หอมหวาน รวมทั้งความบรรเทาที่จะทำให้ท่านสามารถนอนได้สบายเพิ่มขึ้นเรื่อยๆ Legal lean syrup ลีนนอกยอดนิยม มาทำความรู้จักกับ Legal Lean รวมทั้งมาดูกันว่าผลของการใช้งานหรือความสามารถที่กระตุ้นให้เกิดความบรรเทาในแบบที่ทุกคนกำลังมองหากัน https://leanbkk.net/