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;
Month: June 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
