UnityObjects.Data OF = M.NewObjectData(UnityObjects.DataObjectType.doSalesOrderSlip);
….
string FISNO = DateTime.Now.ToString("yyyyMMddHHmmss").ToString();
EMF.ExportToXML("GL_VOUCHERS", "C:/Users/PC/Desktop/devr/" + FISNO + ".xml");
//YADA
INV.ExportToXML("SALES_INVOICES", System.IO.Directory.GetCurrentDirectory()+"/" + FISNO + ".xml");
/*
if (!OF.Post())
….
"SALES_ORDER" = XML OLARAK LOGODAN KAYDEDİNCE EN ÜSTTTE XMLİN ALTINDAKİDİR
NOT GL VOUCHER LOGODAN VERİ DIŞARI AKTARINCA XMLDEKİ BAŞLIKTIR ÖRN: <?xml version="1.0″ encoding="ISO-8859-9″?>
<GL_VOUCHERS>
*/
Tag: export
ASPXGRIDVIEW İşlemleri
protected void ASPxGridView1_SelectionChanged(object sender, EventArgs e)
{
var products = ASPxGridView1.GetSelectedFieldValues(“NAME”);
Label1.Text = products[0].ToString();
}
Gridview devexpress 7.2 sonrası için gecerli export Gridview
un altina ekle
un ustune ekle
<Toolbars>
<dx:GridViewToolbar EnableAdaptivity=“true”>
<Items>
<dx:GridViewToolbarItem Command=“ExportToPdf” />
<dx:GridViewToolbarItem Command=“ExportToXls” />
<dx:GridViewToolbarItem Command=“ExportToXlsx” />
<dx:GridViewToolbarItem Command=“ExportToDocx” />
<dx:GridViewToolbarItem Command=“ExportToRtf” />
<dx:GridViewToolbarItem Command=“ExportToCsv” />
</Items>
</dx:GridViewToolbar>
</Toolbars>
Gridview grup category combobox ve baglantisi
birinci sqldatasource_musteriler yarat ve bunu aspxgridviewe bind
Ikinci datasource sqldatasource_musterigruplari yarat bu bir yere bind olmayacak
Sqlden iki tablo yarat birinin adi musteri(id,adi,grupid) olsun
digeride musteri_grup (id,grup_adi) olsun
aspxgridview designerda columnsa tikla combobox column ekle captionunu grup yap, Fieldname grupid sec, sag tabda comboboxpropertiesde datasourceid musteri_gruplarini sec text field grup_adi , valuefield=id
Gridview Horizontal scrollbar
Datasource eklemede hata alırsan sol taraftan server explorerden modify deyip save passwordu seç
Gridview Required zorunlu alan ayari
Designerda ac ve columnsdan zorunlu alana tıkla ve sağda textboxpropertiesden en aşağıda validation settingste requiredi true yap
Master Detail Grid
ONCE 2 TANE SQLDATASOURCE VE 2 TANE ASPXGRIDVIEW YARAT BIRI MUSTERILER DIGERI MUSTERI HAREKETLER
MUSTERILERI NORMAL TABLODAN AL ASPXGRIDVIEW MUSTERILERIN SETTINGS DETAILDE DETAILROWU TRUE YAP,
MUSTERI HAREKETLERINIDE AL WHERE KISMINA TIKLA COLUMN MUSTERI_ID OPERATOR ” = ” , SOURCE SESSION , SESSION FIELD = MUSTERI_ID
VE DAHA SONRA KODA EKLE
protected void ASPxGridViewmusterihareketler_BeforePerformDataSelect(object sender, EventArgs e)
{
Session[“MUSTERI_ID”] = (sender as ASPxGridView).GetMasterRowKeyValue();
}
SON OLARAKDA ASPXGRIDVIEWMUSTERILERE TIKLA EDITTEMPLATE VE DETAILROWU SEC VE ASPXGRIDMUSTERIHAREKETLERINI ICINE SURUKLE VE END TEMPLATE YAP
Gridviewda son kolumun genişliğini max yapmak
<dx:GridViewDataTextColumn FieldName="ADI" VisibleIndex="2" Width=”100%”>
gridview detay masterda detay width sorunu once masterin altina ekle :
<dx:ASPxGridView Width=”100%”
sonra masterin son colomunun widthini %100 yap
sonra detaya ekle
<dx:ASPxGridView2 Width=”100%”
Devexpress gridview export to excel with savefiledialog
string filename;
saveFileDialog1.Filter = "xlsx files (*.xlsx)|*.xlsx";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
saveFileDialog1.ShowDialog();
filename = saveFileDialog1.FileName;
if (filename == "") filename = "";
else
{
gridView1.ExportToXlsx(filename);
System.Diagnostics.Process.Start(filename);
}