Author: admin

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…

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"> #tb1 { width:100%; background-color:ActiveBorder; } #tb2 { width:500px; background-color:#CCFFCC; margin-left:auto;…

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

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