private Unit u = new Unit();u.setUnitContext();
IObjectScope context = u.context;var q = from d in context.Extent<TblUnitType>()select new { d.UnitType, d.Abbreviation };radGridView1.DataSource = q.ToList();I try to embed RadCheckBoxElement to GridView in CellFormating event. My scenario is to show a RadCheckBoxElement in row "caption0". My Telerik controls version is Q1 2010.
| void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e) |
| { |
| if (e.CellElement.ColumnInfo is GridViewDataColumn && ((GridViewDataColumn)e.CellElement.ColumnInfo).FieldName == "Caption") |
| { |
| if (!(e.CellElement.RowElement is GridTableHeaderRowElement)) |
| { |
| if (e.CellElement.Text.Equals("caption0")) |
| { |
| if (e.CellElement.RowInfo.Cells["Value"].CellElement.Children.Count > 0) |
| return; |
| RadCheckBoxElement element = new RadCheckBoxElement(); |
| e.CellElement.RowInfo.Cells["Value"].CellElement.Children.Add(element); |
| } |
| } |
| } |
| } |
It seems that everything works fine without scrollbar.
However, if I scroll the scrollbar, a strange issue will happen. The RadCheckBoxElement will be embedded not only in row "caption0" but also in other rows. If I scroll the scrollbar several times, more and more RadCheckBoxElement will be shown in different rows.
Please refer to the attached images.
Could anybody help me? Thank you.
this.BindingContext[objectView1].CancelCurrentEdit(); this.objectProvider1.CancelAll();
Roland
Hi,
I have a requirement to make RadApplicationMenu to open only by mouse right-click. How can I prevent mouse left button click and 'Enter' key pressing?
Thank you in advance.