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;

Read More

DevExpress AspxGridview ให้ Focused Textbox เวลา Edit ข้อมูล

เมื่อปรับแต่ง Gridview และปรับให้สามารถ Edit ข้อมูลใน Gridview ได้แล้วแต่ถ้าข้อมูลมีเยอะแล้วอาจจะทำให้เวลากด New แทนที่หน้าจอจะไป Focus ที่บรรทัดที่เพิ่มข้อมูลมันดันไม่เป็นแบบนั้นให้ทำการแก้ไขดังนี้เริ่มจากปรับ Properties ของ Gridview ในส่วนของ Events ของ Gridview ดังรูป แล้วใส่โค้ดลงไปในส่วนของ

Read More

ปรับ Style ของ Artisteer ให้ Text-Align แสดงข้อมูลตรงกลาง ใช้กับ Button

เนื่องจากการใช้ Button ของ Devexpress กับ Artisteer ทำให้การจัดปุ่ม Button ค่อนข้างไม่ตรงกับ CSS วิธีแก้คือกำหนด Style ขึ้นมาและปรับให้ CSS ที่สร้างโดย Artisteer ยกเลิกการจัด style ให้ content

Read More

การใส่ 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

Read More

การใช้งาน 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

Read More