using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using DevExpress.Web.ASPxGridView; using DevExpress.Web.Data; using System.Drawing; using System.Collections;
Year: 2013
DevExpress AspxGridview ทำให้ Detail Row ขยายออก
เริ่มจากปรับในส่วนของ Events ของ Gridview แล้วใส่ Code protected void ASPxGridView2_DataBound(object sender, EventArgs e) { //if (Convert.ToBoolean(Session[“expandAll”])) //((ASPxGridView)sender).DetailRows.ExpandAllRows(); ((ASPxGridView)sender).ExpandAll(); ((ASPxGridView)sender).SettingsDetail.ShowDetailButtons = true;
DevExpress AspxGridview ให้ Focused Textbox เวลา Edit ข้อมูล
เมื่อปรับแต่ง Gridview และปรับให้สามารถ Edit ข้อมูลใน Gridview ได้แล้วแต่ถ้าข้อมูลมีเยอะแล้วอาจจะทำให้เวลากด New แทนที่หน้าจอจะไป Focus ที่บรรทัดที่เพิ่มข้อมูลมันดันไม่เป็นแบบนั้นให้ทำการแก้ไขดังนี้เริ่มจากปรับ Properties ของ Gridview ในส่วนของ Events ของ Gridview ดังรูป แล้วใส่โค้ดลงไปในส่วนของ
2 Table align center
วิธีการทำ Table 2 ให้อยู่ตรงกลางง่ายๆ ปรับ style ของ table 2 ให้ margin-left:auto; margin-right:auto; <html xmlns=”http://www.w3.org/1999/xhtml”> <head runat=”server”> <title></title> <style type=”text/css”>
ปรับ Style ของ Artisteer ให้ Text-Align แสดงข้อมูลตรงกลาง ใช้กับ Button
เนื่องจากการใช้ Button ของ Devexpress กับ Artisteer ทำให้การจัดปุ่ม Button ค่อนข้างไม่ตรงกับ CSS วิธีแก้คือกำหนด Style ขึ้นมาและปรับให้ CSS ที่สร้างโดย Artisteer ยกเลิกการจัด style ให้ content
การใส่ Patameter และการใช้งาน DataSet ใน System.Data.OracleClient
protected void AspxSubmit_Click(object sender, EventArgs e) { System.Data.OracleClient.OracleConnection objConn; System.Data.OracleClient.OracleCommand objCmd; String strConnString, strSQL; strConnString = “Data Source=xxxx;User Id=xxxx;Password=xxxxx;”; objConn
การใช้งาน NameSpace System.Data.OracleClient กับ DataReader()
ก่อนทำต้องทำการติดตั้ง Oracle Client และทำตาม http://kungtee.rmutp.ac.th/2013/02/26/visual-studio-2012-c-net-gridview-connect-to-oracle-db/ ก่อน 1.ทำการ Add Reference System.Data.OracleClient ใน Visual Studio ก่อน 2.ทดสอบใส่ Code using System.Data.OracleClient; using System.Data.SqlClient; public partial class
วิธีการติดตั้ง IIS 7 บน Windows 7 สำหรับ RUN ASP.NET
วิธีการติดตั้ง IIS 7 บน Windows 7 สำหรับ RUN ASP.NET ให้เปิด Turn Windows Features ON or OFF
