This is a migrated thread and some comments may be shown as answers.

[Solved] Border for GridViewRow Issue

1 Answer 109 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Madhu
Top achievements
Rank 1
Madhu asked on 29 Jan 2010, 04:19 AM
Hi ,

          Currently I have a GridView which has HTMLPlaceHolder holder and being loaded dynamically.I want to set the border for each row but for some reason is not showing up.The other issue I have is to show the tooltip on the cell which has HTMLPlaceHolder for each row.Please let me know how to set border and tooltip for each row
Here is the sample code I have done
public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
        {

            
            
            RadHtmlPlaceholder cellElement = null;
            //TextBox cellElement = null;
            
         // Brush test=((Telerik.Windows.Controls.GridView.GridViewRow)(((Telerik.Windows.Controls.GridView.GridViewCellBase)(cell)).BorderBrush
            Object TypeForCompare = ((HtmlContents)dataItem).Content;
        
            
            if (TypeForCompare is ServiceReference1.Para)
            {
                cellElement = new RadHtmlPlaceholder();
                ((RadHtmlPlaceholder)cellElement).HtmlSource = ((ServiceReference1.Para)TypeForCompare)._entireStream;
                ((RadHtmlPlaceholder)cellElement).Height = 200;
                //cellElement = new TextBox();
                //cellElement.Text = ((ServiceReference1.Para)TypeForCompare)._entireStream;

               cellElement.SetValue(ToolTipService.ToolTipProperty,((ServiceReference1.Para)TypeForCompare)._title);
               SolidColorBrush colorBrush = new SolidColorBrush();
                colorBrush.Color = Colors.Red;
                cell.BorderBrush = colorBrush;
                //cell.BorderThickness = new Thickness(5);
                //cell.BorderBrush = colorBrush
                //cell.ParentRow.BorderBrush = colorBrush;
                //cell.ParentRow.BorderThickness = new Thickness(5);
               

                ControlCreated(cellElement, ((ServiceReference1.Para)TypeForCompare)._title,cell.ParentRow);
               
                //((RadHtmlPlaceholder)cellElement).Width=600;
                this.Width = 800;
               
               
            }
            //else //if (TypeForCompare is ServiceReference1.ParsedTable)
            //{
            //    cellElement = new RadHtmlPlaceholder();
            //    //((RadGridView)cellElement).ShowGroupPanel = false;
            //    //((RadGridView)cellElement).AutoGenerateColumns = true;
            //    //((RadGridView)cellElement).ItemsSource = CreatePersonsObservableCollection();
            //    //((RadGridView)cellElement).Height = 200;
            //    ((RadHtmlPlaceholder)cellElement).HtmlSource = ((ServiceReference1.ParsedTable)TypeForCompare)._des;
            //    ((RadHtmlPlaceholder)cellElement).Height = 200;
            //    this.Width = 800;
            //}
            //cellElement.CornerRadius = new CornerRadius(5);
            //ControlCreated(cellElement, ((ServiceReference1.ParsedTable)TypeForCompare)._title, cell.ParentRow);
             
            return cellElement;
        }

1 Answer, 1 is accepted

Sort by
0
Stefan Dobrev
Telerik team
answered on 03 Feb 2010, 02:51 PM
Hello mark,

Can you please send us a sample project that illustrates your issues? It is unclear from the pasted code what exactly the problem might be.

Greetings,
Stefan Dobrev
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
GridView
Asked by
Madhu
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
Share this question
or