Category: Devexpress

DevExpress : Mask Decimal & Symbol style

ปรับรูปแบบตัวเลขใน textbox ใช้ Mask เป็นตัวจัดการบางทีจะ Error ถ้าเป็นตัวเลขแล้วไม่กำหนดให้ Decimal Symbol ต้องปรับตามภาพด้านล่างในส่วน Properties ของ Mask  

ตัวอย่าง Devexpress ถ้า Detail Gridview ไม่มีข้อมูล ให้ยกเลิกปุมที่กดดู Detail

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; using System.Data; public partial class _Default : System.Web.UI.Page { protected…

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; //ASPxGridView gridView = sender as ASPxGridView; //gridView.JSProperties["cpSummary"] = gridView.GetTotalSummaryValue(gridView.TotalSummary["Used"]); }…

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

เมื่อปรับแต่ง Gridview และปรับให้สามารถ Edit ข้อมูลใน Gridview ได้แล้วแต่ถ้าข้อมูลมีเยอะแล้วอาจจะทำให้เวลากด New แทนที่หน้าจอจะไป Focus ที่บรรทัดที่เพิ่มข้อมูลมันดันไม่เป็นแบบนั้นให้ทำการแก้ไขดังนี้เริ่มจากปรับ Properties ของ Gridview ในส่วนของ Events ของ Gridview ดังรูป แล้วใส่โค้ดลงไปในส่วนของ Code behide protected void ASPxGridView1_CellEditorInitialize(object sender, ASPxGridViewEditorEventArgs e) { e.Editor.Enabled…