Forums - C# Corner

Forum guidelines

How to send multiSelect to page

Jan 7 2014 11:12 AM
I have dataBinding form mySQL show in multiselect ,I want select data to show another page
                    ItemsSource="{Binding }"                  
                    Background="Transparent" FontSize="25" Margin="0"  >

 MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(e.Result));
                ObservableCollection list = new ObservableCollection();
                DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(ObservableCollection));

                list = (ObservableCollection)serializer.ReadObject(ms);

                List myResult = new List();

                foreach (sResult cm in list)
                    //string sRound_ID = cm.Round_ID.ToString();

                    string sRound_ID = cm.Round_ID;
                    string sDate_dmy = cm.Date_dmy.ToString();
                    string sTrain_ID = cm.Train_ID;
                    string sTime = cm.Time;
                    string sStatus = cm.Status.ToString();
                    string sRes = cm.Train_ID + cm.Time + cm.Status;

                    myResult.Add(new sResult(sRound_ID, sDate_dmy, sTrain_ID, sTime, sStatus));
                    //myResult.Add(new sResult(sRes));

               // this.sList.ItemsSource = myResult;
                prog.IsVisible = false;

                List se = new List();

                foreach (sResult cm in list)
                    se.Add(cm.Train_ID + "\t\t" + cm.Time + "\t\t" + cm.Status);

                sList.ItemsSource = se;

C# Corner Chandigarh Developer Conference


Spire.Doc - Free .NET Word API
Use Spire.Doc to create, read, write, print, and convert word documents to OpenXML, RTF, TXT, XPS, EPUB, EMF, HTML, Image and PDF.