퇴근5분전

 

 프로그램을 만들때 비동기로 처리하고 싶다거나

 프로그래스 바로 진행율같은걸 표시하고 싶을때나...

 

사용하면 엄청 편하게 사용이 가능하다.

 

task나 await 같은 비동기... 처리도 있지만... ( 머리가 나쁘니 이해하는데 오래 걸리긴 한데... )

 

## 소스 사용예제

                       // todo : Excel Export
                        AsyncManagerClass async = new AsyncManagerClass();
                        async.BeforeAsyncCall = () => {
                            button1.DoInvoke(b => b.Enabled = false);  <-- 크로스 쓰레드를 회피! 하는 Invoke!
                            progressBar1.DoInvoke(p =>
                            {
                                p.Minimum = 0;
                                p.Maximum = src.Rows.Count -1;
                            });
                        };
                        async.AfterAsyncCall = () => {
                            button1.DoInvoke(b => b.Enabled = true);
                        };
                        async.Async(() => {
                            ExportToExcel(src);   <--- 비동기로 뭔가 열심히 처리 할수 있는 Method!
                        });

 

 

async.Async 내에서 호출되는 컨트롤들은 모두

             .DoInvoke( c => ... );  로 묶어서 처리 해주면 된다.

 

private void ExportToExcel(DataTable src)
{

    ... 생략 ...
    try
    {

        for (int row = 0; row < src.Rows.Count; row++)
        {
            progressBar1.DoInvoke( p => p.Value = row );

            ... 생략 ...   

        }
    }
    catch (Exception exc)
    {
        MessageBox.Show(exc.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }

}

 

 

 #region 비동기 처리
    public class AsyncManagerClass
    {
        public Action BeforeAsyncCall = null;

        public Action AfterAsyncCall = null;

        public void Async(Action doActionMethod)
        {
            if (BeforeAsyncCall != null)
                BeforeAsyncCall();

            IsRun = true;
            if (doActionMethod != null)
            {
                doActionMethod.BeginInvoke(ir =>
                {
                    try
                    {
                        doActionMethod.EndInvoke(ir);

                        if (AfterAsyncCall != null)
                        {
                            AfterAsyncCall();
                        }
                    }
                    catch
                    {
                        // 작업 중!! 예외
                    }
                    IsRun = false;
                }, null);
            }

        }

        public void Stop()
        {
            IsRun = false;
        }

        public bool IsRun { get; set; }
    }

    public static class Ex
    {
        public static void DoInvoke<T>(this T ctrl, Action<T> callMethod) where T : Control
        {
            if (ctrl.InvokeRequired)
            {
                ctrl.Invoke(new Action<T, Action<T>>(DoInvoke), ctrl, callMethod);
            }
            else
            {
                callMethod(ctrl);
            }
        }
    }
    #endregion

 

# 데이타 테이블 정의서를 엑셀에 뽑아내는 프로그램.

 

 

  -- 나한테도 이미 돌아다니며 구한 몇가지 버젼이 있지만...

     이번에 새로이 만들었다.

 

 object Like에는 like문 그대로 입력해주면... 필터링 가능하다.

   ex ) D[w|a]    ( '%'는 뒤에만 소스 주석에서 걸려있음, 파라미터로 전달하니까... )

 

내려받기를 클릭하면 프로그래스로 진행율을 표시하고...  아래 양식으로 테이블별로 만들어진다.

 

Column 명( C열 ) 또는 Table 명( E열 )  을 입력하면

   I열은 설명을 추가하는 스크립트가 나온다.

   J열은 설명을 삭제하는 스크립트가 나온다.

       

 

   음 추가가 필요한 기능은 메타!!  ( 시간될때 또... 넣자. )

'# 4) .Net ( Vs 2010 ) > C#' 카테고리의 다른 글

Sqler 에 올라온 질문 글...  (0) 2016.10.21
비동기 처리...를 간단히!!!  (0) 2016.10.18
로또 체크기...?  (0) 2016.10.18
Class를 XML변환, XML을 Class변환  (0) 2016.09.12
DevExpress WinForm] Layout 보완...  (0) 2014.10.12

 

  가끔 로또와 연금복권을 사는데...

 

이걸 체크하려면 ... 보기 어려울때가 있네, 또 사이트 가니 체크하는게 있던데...

 

엑셀 수식으로 만들어진 체크기가 있는데... 심심해서 새로 만들어봤다.

 

 api.. 이런게 지원이 되서 편하게 되었다.

 

 

  

   회의록 프로그램을 만들면서 데이타를 객체로 구성하고, 저장데이타를 xml로 만들었다.

이때 xml 관련 Attribute등을 이용해서 직렬화과정을 거치게 되는데

 

아래껀 굳이 xml 관련 Attribute 를 지정하지 않아도 되더라...

 

 

 

public class Tmp
    {
        public string Name { get; set; }

        public List<CTmp> Items { get; set; }
        public Tmp()
        {
            Items = new List<CTmp>();
        }
    }

    public class CTmp
    {
        public string Name { get; set; }
        public string DESC { get; set; }
    }

 

 

 

 

 

            Tmp root = new Tmp();
            root.Name = "루트";
            root.Items.Add(new CTmp() { Name = root.Name + "_자식1", DESC = "자식1" });
            root.Items.Add(new CTmp() { Name = root.Name + "_자식2", DESC = "자식2" });
            root.Items.Add(new CTmp() { Name = root.Name + "_자식3", DESC = "자식3" });
            root.Items.Add(new CTmp() { Name = root.Name + "_자식4", DESC = "자식4" });

 

            string xml = root.Serialize<Tmp>();
            Tmp rt = xml.DeSerialize<Tmp>();

 

 

 

 public static class XmlEX
    {
        public static string Serialize<T>(this T value)
        {
            if (value == null) return string.Empty;

            var xmlSerializer = new System.Xml.Serialization.XmlSerializer(typeof(T));

            using (var stringWriter = new System.IO.StringWriter())
            {
                using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings { Indent = true }))
                {
                    xmlSerializer.Serialize(xmlWriter, value);
                    return stringWriter.ToString();
                }
            }
        }

        public static T DeSerialize<T>(this string xml) where T : class, new()
        {
            T obj = default(T);
            var xmlSerializer = new System.Xml.Serialization.XmlSerializer(typeof(T));
            using (var stringReader = new System.IO.StringReader(xml))
            {
                using (var reader = XmlReader.Create(stringReader, new XmlReaderSettings()))
                {
                    obj = xmlSerializer.Deserialize(reader) as T;
                }
            }
            return obj;
        }
    }

'# 4) .Net ( Vs 2010 ) > C#' 카테고리의 다른 글

데이타 테이블정의서 Excel 생성하기.  (0) 2016.10.18
로또 체크기...?  (0) 2016.10.18
DevExpress WinForm] Layout 보완...  (0) 2014.10.12
DevExpress WinForm] Layout Control  (0) 2014.10.12
바로가기 만들기] shortcut  (0) 2014.09.27

 

 WPF 로딩창... 이틀 힘들었넹..

 

 

 

BTN을 누르면 로딩창이 떠서 돌다가 프로세스가 끝나면 창이 닫힌다!

 

이 기능을 구현하는데 ... WPF로 하려니 대박.. ㅡ.,ㅡ;; 뭐가 이렇게 안되는게 많지? ( 모르는 걸꺼야... )

 

조건 :

  1. GIF 의 로딩 애니메이션과 관련해서 배경이 투명임.

  2. 오래 걸리는 프로레스처리 기간동안 화면에 떠서 땡글 땡글 돌고 있어야 한다.

  3. 처리가 완료되면 자동으로 닫혀야 한다.

 

여기서 WPF로 쉽게 접근해본다고...

 

처음 WebBrowser로 시작 Resource에 넣었는데... WebBrowser에 전달을 어떻게 하지?...

Html문서로 만들면... 이미지를 어딘가 올려놔야 될텐데.. 로컬경로라 해도... 배포문제도 있공...

좀 해보다가 Pass

 

다음 구글링 하니 MediaElement 로 하는게 있는데 이것도 리소스랑 연결을 못해서 ... ㅡ.ㅡ;;

 

또 winform의 PictureBox 이건 간단하게 되었다.

 

단... 여기서 완전 삽질 시작...

WPF.Window창에 설정을 마치고

     WindowsFormsHost 에 PictureBox를 넣고 리소스를 연결했다.

          GIF의 바탕이 원래 투명인데!!!

          윈도우 창의 AllowsTransparency="True" 를 설정하고 폼을 띄우니 배경이 흰색이 나온다!

          흰색을 없애보려고 별짓다하다가 두손두발 들었다.

     

그래서 Winform을 프로젝트에 추가해서 PictureBox에 이미지를 넣었다.

 

로딩폼을 띄웠다가 접었다 해야되는데!!!

 

구글링 하면 WPF 관련해서 여러가지 뜨는데...

 음...  처음부터 그냥 윈폼처럼 구현할것을... WPF라고 죄다 찾다가 삽질만...

덕분에 좀더 많이 뒤져봤지만...

 

 

 # WPF - Window 와 Form 부모창 셋팅할수 있는 방법

 http://stackoverflow.com/questions/1095763/how-to-set-a-wpf-window-as-the-owner-of-a-winforms-form

 

 # 단순 비동기 대리자 호출만으로 뺑글뺑글이 안되서 쓰레드!

   WPF ... 쓰레드... 허허

   

 -- 그나마 코드를 많이 손본 소스!

 

            trd = new System.Threading.Thread(() =>
            {
                w = new ProgressBarForm();
                w.FormClosed += delegate {
                      System.Windows.Threading.Dispatcher.CurrentDispatcher.InvokeShutdown();  // Step2
                };
                w.Show();
                System.Windows.Threading.Dispatcher.Run();  // Step1

                int a = 0; // Step3

            });
            trd.SetApartmentState(System.Threading.ApartmentState.STA);
            trd.IsBackground = true;
            trd.Start();

 

 이 쓰레드가 돌면 w.Show 한 후 Run에서 블럭이 걸린다.

 와... 이걸 몰라서 계속 a = 0으로 안빠져서 이 쓰레드가 미쳤나 했다.

폼이 닫힐때 Step2에서 ShutDown 되면 그때서야 빠진다.

 

이건 또 다른 방법 어차피 똑같음!

 

            trd = new System.Threading.Thread(() =>
            {
                System.Windows.Threading.DispatcherFrame df = new System.Windows.Threading.DispatcherFrame();
                w = new ProgressBarForm();
                w.FormClosed += delegate {
                    df.Dispatcher.InvokeShutdown(); // Step2
                };
                w.Show();
                System.Windows.Threading.Dispatcher.PushFrame(df);  // Step1

                int a = 0;  // Step3

            });
            trd.SetApartmentState(System.Threading.ApartmentState.STA);
            trd.IsBackground = true;
            trd.Start();

 

음 WPF 프로젝트니까 처음 Xaml로 시작했다가 결국엔 윈폼이네...

 

GIF 배경색이 투명으로만 나왔어도 쉽게 가는거였는뎅...

 

구글링에 삽질에... 암튼..

 

정비 하고 또 테스트 하고 하다보니 ...

 

 결국엔 윈폼 코드가 되버렸넹.. 크크..

생각보다 WPF 어려운데... 낼부터 좀더 파고들어봐야징.

  -- 최종 소스 ㅡ.ㅡ;? 

            trd = new System.Threading.Thread(() =>
            {
                ProgressBarForm w = new ProgressBarForm();
                Func<System.Windows.Forms.DialogResult> showDialogDelegate = w.ShowDialog;
                showDialogDelegate.BeginInvoke(ir => showDialogDelegate.EndInvoke(ir), null);

                IsRunning = true;

                while (IsRunning) System.Threading.Thread.Sleep(234);

                w.Invoke(new Action(() =>
                {
                    using (w)
                    {
                        w.Close();
                    }
                    w = null;
                }));
            });
            trd.SetApartmentState(System.Threading.ApartmentState.STA);
            trd.IsBackground = true;
            trd.Start();

 

-- 소스는 ( 숨겨둠! )

 

 

오늘 ( 2015-10-02 ) CodeProject 갔더니.

http://www.codeproject.com/Tips/1035207/Number-Only-Behaviour-for-WPF

 

내가 만든 프로그램 버그 : Ctrl + C눌렀는데 복사가 안되고 붙여넣기가 된다?

>> 집에서 수정해놓았던 소스는 C , V 코드가 이미 수정되어 있네...

 

>> 숫자 이외에 붙여넣기 할때 붙여지는 현상

  SetValue 에서 valueString의 데이타 타입확인 후 변환 후 콤마 찍고 바인딩 하도록 수정함!

 

#########################################################################

 

WPF Numeric 컨트롤이 없을줄이야 ㅡ.,ㅡ^

 

구글링 해도 없네..?

 

거기다가 ... ErrorProvidor가 없어 ㅡㅡ;?

 

예제들이 모두 바이딩을 해야 되다뉘???

 

 

 

 

쨔안!~~~ 만들었다.

 

컨트롤을 만들었다기 보다.. Textbox에 Template 을 이용해서 만들었다.

 

위 예로는 5, 2 <-- Numeric( 5, 2 ) 로 만들어진 컬럼을 대상으로 컨트롤 입력/출력을 함!!

 

입력할때마다 콤마 콤마가 자동으로 위치잡고 소수점 찍으면 뒤로는 한자리씩 교체되고...

 

유효성 체크도 한방에 주르륵... 처리 해주고..

 

이게 컨트롤로 만든게 아니라서 ... 뭐... 필요할때쯤 되면 만들어 보든가~

 

### 디버깅..

 

 

 

ReadOnly 스타일을 넣었고,

정수만 처리할때 - 자리를 처리 하지 않도록 뺌.

Control + c, v, x 처리.

 

디버깅을 하다가 예상하지 못한 일을 격었다.

 

SetValue( NumberText1, 99999999.99999999999 )   로 지정하였을때!!

 

double 인데 문자열로 변환 했더니 반올림이 되어서 나온다?

 

음... 일단 컨트롤에 자리수가 8, 2 이기 때문에 소수 2자리 뒤에 문자들은 반올림 없이 잘라내려고

 

문자열로 만드는 과정에서 당황했었다.

 

찾은 방법은 r !! n, d, x등등 봤는데... r... 이건 반올림 없이 문자열로 만들어준다.

뒤에 자르고 콤마를 넣어주며 마무리!!!

 

### 수정본 ### 소수점처리가 잘못되어있었넹... , 파라미터 부분에서 포맷도 제거 함.

 

private string GetNumberFormat(object dm, NumericTextBoxInfo info)
        {
            string number = "" + dm;

            if (info.Scale > 0)
            {
                // 소수점뒷자리를 잘라냄.
                if (number.IndexOf('.') >= 0)
                {
                    string[] nums = number.Split('.');
                    number = nums[0] + ".";
                    if (nums[1].Length > info.Scale)
                    {
                        number += nums[1].Substring(0, info.Scale);
                    }
                    else
                    {
                        number += nums[1].PadRight(info.Scale, '0');
                    }
                }
                else
                { 
                    number = number + "." + "".PadRight(info.Scale, '0');
                }
            }
            else
            {
                if (number.IndexOf('.') >= 0)
                {
                    number = number.Remove(number.IndexOf('.'));
                }
            }
            /*뒤에서부터 콤마 찍고 온다..*/
            int start = number.Length;
            if (number.IndexOf('.') > 0) {
                start = number.IndexOf('.');
            }

            for (int end = start - 3; end >= 0; end -= 3 )
            {
                number = number.Insert(end, ",");
            }

            return number.TrimStart(',');
        }

 

 

하핫.. 재미있당.

 

소스 hidden~ ( 갱신 20150915 )

숫자를 한글로 변환하는 method.

 

소숫점은... 에러남 크크... 고치면 되겠지머

 

 

        string ConvertNumberToKoreanCurrency(string txt)
        {
            string kornum = "영일이삼사오육칠팔구";
            string[] kor = "|십|백|천".Split('|');
            string[] kor2 = "|만|억|조|경".Split('|');
            string numString = "" + StringConvertToDecimal(txt);
            List<string> korlst = new List<string>();
            int korIndex = 0;
            for (int i = numString.Length - 1; i >= 0; i--, korIndex++)
            {
                int idx = Convert.ToInt16("" + numString[i]);

                if (korIndex % 4 == 0)
                {
                    korlst.Insert(0, "" + kor2[korIndex / 4] + " ");
                }

                if (idx != 0)
                {
                    korlst.Insert(0, "" + kor[korIndex % 4]);
                    if (korIndex > 1 && idx == 1) continue;
                    korlst.Insert(0, "" + kornum[idx]);
                }
            }
            return string.Join("", korlst.ToArray());
        }

 

        decimal StringConvertToDecimal(string txt)
        {
            decimal value = 0m;
            decimal.TryParse(("" + txt).Replace(",", ""), out value);
            return value;
        }

 

 

 

 

버튼 Edit에 Masking!

 

  if (_edittype == ButtonEditEx_EditType.Tel)
            {
                Properties.Mask.EditMask = @"[0-9]{2,3}-[0-9]{3,4}-[0-9]{4}";
                Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
                Properties.Mask.UseMaskAsDisplayFormat = true;
            }
            else if (_edittype == ButtonEditEx_EditType.Email)
            {
                Properties.Mask.EditMask = @"[a-zA-Z0-9.-]+@[a-zA-Z0-9-]+(\.[A-Za-z]{2,6}){1,2}";
                Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.RegEx;
                Properties.Mask.UseMaskAsDisplayFormat = true;
            }
            else if (_edittype == ButtonEditEx_EditType.Money)
            {
                Properties.Mask.EditMask = GetMoneyMasking();
                Properties.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
                Properties.Mask.UseMaskAsDisplayFormat = true;
            }           

 

 private string GetMoneyMasking()
        {
            string editmask = "N0";
            if (Properties.MaxLength > 0)
            {
                string masking = "";
                for (int loop = 0; loop < Properties.MaxLength; loop++)
                {
                    masking = "#" + masking;
                    if (loop % 3 == 2)
                    {
                        masking = "," + masking;
                    }
                }
                editmask = masking;
            }
            return editmask;
        }

 

Number의 자리수 제한은 maxlength 로 제한 할때 #,###,###으로 표기하기 위해...

 

 

 

'# 4) .Net ( Vs 2010 ) > DevExpress' 카테고리의 다른 글

Grid  (0) 2015.01.25
TreeList  (0) 2015.01.25

 

 

 

private void InitGrid()
        {
            gridView1.OptionsView.ShowGroupPanel = false;

            var col1 = gridView1.Columns.Add();
            col1.FieldName = "Key";
            col1.Caption = "메뉴ID";
            col1.Width = 120;
            col1.Visible = true;

            var col2 = gridView1.Columns.Add();
            col2.FieldName = "Name";
            col2.Caption = "메뉴명";
            col2.Width = 220;
            col2.Visible = true;
            
            gridControl1.DataSource = GetDataSource();
        }

 

음.. 버튼도 넣어볼까나?

 

 

 

 

   private void InitGrid()
        {
            gridView1.OptionsView.ShowGroupPanel = false;

            var col1 = gridView1.Columns.Add();
            col1.FieldName = "Key";
            col1.Caption = "메뉴ID";
            col1.Width = 120;
            col1.Visible = true;

            var col2 = gridView1.Columns.Add();
            col2.FieldName = "Name";
            col2.Caption = "메뉴명";
            col2.Width = 220;
            col2.Visible = true;

               var col3 = gridView1.Columns.Add();
            col3.Caption = "컬럼";
            col3.Width = 150;
            col3.Visible = true;
            var redit = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
            redit.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
            var btnEdit = new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph);
            redit.Buttons.Add(btnEdit);
            redit.Buttons[0].Caption = "001";
          redit.Buttons[0].Kind = DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph;
          redit.Buttons[1].Caption = "002";
          redit.Buttons[1].Kind = DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph;

            redit.ButtonClick += redit_ButtonClick;
            col3.ColumnEdit = redit;             gridControl1.DataSource = GetDataSource();
        }

        void redit_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            if (e.Button.Index == 0)
            {
                MessageBox.Show(e.Button.Caption);
            }
            else if (e.Button.Index == 1)
            {
                MessageBox.Show(e.Button.Caption);
            }
        }

 

 

 

 

 

 

'# 4) .Net ( Vs 2010 ) > DevExpress' 카테고리의 다른 글

ButtonEdit  (0) 2015.01.25
TreeList  (0) 2015.01.25

 

+ TreeList...  그리고 VGridControl

 

 지금 프로젝트에서 사용하는 사용컨트롤인데...

처음 접하는 프로젝트였으므로 공부를 해볼 시간이 필요했는데, 잘 안되었다...

 

 경험자였던 팀원분은 두달간 메뉴 여섯개 두달간 만드시다 잘렸고...

 

근데 막상 쭉 해보니 별건 아닌데... 왜 두달이 걸렸을까?

추가사항이나 수정사항이 나올때마다 왜 프로그래밍을 이렇게 했을까 싶을 정도로... 생각이 안잡힌다.

 

너무 복잡했던 사용법들때문에 그냥 집에서 사용법들을 알아봤다.

 

private void InitTreeList()
        {
            TreeListColumn tcKey = treeList1.Columns.Add();
            tcKey.FieldName = "Key";
            tcKey.Caption = "메뉴ID";
            tcKey.Visible = true;
            tcKey.VisibleIndex = 2;

            TreeListColumn tcName = treeList1.Columns.Add();
            tcName.FieldName = "Name";
            tcName.Caption = "메뉴명";
            tcName.Visible = true;
            tcName.VisibleIndex = 1;
            treeList1.KeyFieldName = "Key";
            treeList1.ParentFieldName = "Prn_Key";
            treeList1.DataSource = GetDataSource();
        }

 

초간단 바인딩.

 

그러면 트리가 짠!

 

데이타 입력 수정 삭제 처리시 트리에 색상 반영은.

 

private void treeList1_NodeCellStyle(object sender, DevExpress.XtraTreeList.GetCustomNodeCellStyleEventArgs e)
        {
            DataRowView currentNode = treeList1.GetDataRecordByNode(e.Node) as DataRowView;
            if (currentNode != null)
            {
                if (currentNode.Row.RowState == DataRowState.Added)
                {
                    e.Column.AppearanceCell.ForeColor = Color.Blue;
                }
                else if (currentNode.Row.RowState == DataRowState.Modified)
                {
                     e.Column.AppearanceCell.ForeColor = Color.Green;
                }
                else if (currentNode.Row.RowState == DataRowState.Deleted)
                {
                     e.Column.AppearanceCell.ForeColor = Color.Silver;
                }
                else
                {
                     e.Column.AppearanceCell.ForeColor = Color.Black
                }
            }
        }

 

그리고 treeList1.GetDataRecordByNode <-- 요 메서드

바인딩 된 노드의 데이타객체로 변환하는 메서드

 

추가적으로

private void GetChangeDataButton_Click(object sender, EventArgs e)
        {
            StringBuilder query = new StringBuilder();
            var table = treeList1.DataSource as DataTable;
            var chage = table.GetChanges();
            if (chage != null)
            foreach (DataRow dr in chage.Rows)
            {
                if ((dr.RowState & (DataRowState.Modified | DataRowState.Added | DataRowState.Deleted)) > 0)
                {
                    query.AppendFormat("MenuID = {0}, MenuName = {1}" + Environment.NewLine, dr[0], dr[1]);
                }
            }
            MessageBox.Show("" + query);
        }

 

이건 바인딩 된 데이타의 변경된 데이타만을 가져오는 부분.

 

또 여기에 VGridControl 췟!

 

팀원이었던 분이 써놓은 컨트롤인데 ... 이것도 당췌 왜 그렇게 사용했는지 알수가 없는데

사용이 겁나게 단순한데...

 

  private void InitVGrid()
        {
            var keyEdit = new DevExpress.XtraVerticalGrid.Rows.EditorRow("Key");
            keyEdit.Properties.Caption = "메뉴ID";
            keyEdit.Properties.ReadOnly = true;
            vGridControl1.Rows.Add(keyEdit);

            var nameEdit = new DevExpress.XtraVerticalGrid.Rows.EditorRow("Name");
            nameEdit.Properties.Caption = "메뉴명";
            nameEdit.Properties.ReadOnly = false;
            vGridControl1.Rows.Add(nameEdit);
            vGridControl1.DataSource = treeList1.DataSource;
        }

 

요렇게 ㅡ.,ㅡ;; 끝.

그냥 저거 한줄이면 되는데...

 

음... 그분은 왜? 객체를 몇개나 만들어서 줬다 받았다 했을까?

 

 

 

 

 

 

 

 

 

 

'# 4) .Net ( Vs 2010 ) > DevExpress' 카테고리의 다른 글

ButtonEdit  (0) 2015.01.25
Grid  (0) 2015.01.25