Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
345
selecting text while displaying Images and text in cell
posted

Hi,
I'm using an example I saw here in the forum to display images and text in a single cell:


        private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
        {
            UltraGridLayout layout = e.Layout;
            UltraGridBand band = layout.Bands[0];
            UltraGridColumn column0 = band.Columns[0];

            column0.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.FormattedText;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            StringBuilder sb = new StringBuilder();
            string imageString = GetImageTag(this.imageList1.Images[0]);
            sb.Append(imageString);
            sb.Append("Text1");
            imageString = GetImageTag(this.imageList1.Images[1]);
            sb.Append(imageString);
            sb.Append("Text2");
            imageString = GetImageTag(this.imageList1.Images[2]);
            sb.Append(imageString);
            sb.Append("Text3");
            this.ultraDataSource1.Rows.Add(new object[] {sb.ToString()});
        }
        private static string GetImageTag(Image image)
        {
            return string.Format("<img style=\"width:{0}px; height:{1}px;\" data=\"{2}\"/>",
                image.Width,
                image.Height,
                Infragistics.Win.FormattedLinkLabel.FormattedLinkEditor.EncodeImage(image));
        }

 

 

The images are displayed fine and I can see the text...
but I'm unable to select the text in the cell ( for copy/paste)
how do enable that in this scenario?

 

 

Parents
No Data
Reply Children
No Data