Posted on Jan 23, 2012 (permalink)
Reply
Posted on Jan 26, 2012 (permalink)
public
partial
class
VirtualGridForm : Form
{
private
Random random =
new
Random((
int
)DateTime.Now.Ticks);
VirtualGridForm()
InitializeComponent();
radGridView.VirtualMode =
true
;
radGridView.CellValueNeeded +=
GridViewCellValueEventHandler(radGridView_CellValueNeeded);
radGridView.RowCount = 1000;
radGridView.ColumnCount = 10;
}
void
radGridView_CellValueNeeded(
object
sender, GridViewCellValueEventArgs e)
e.Value = random.Next(1000);
button1_Click(
sender, EventArgs e)
radGridView.TableElement.Update(GridUINotifyAction.DataChanged);
SP1 of Q3’11 of RadControls for WinForms is available for download (see what's new).
Posted on Jan 29, 2012 (permalink)
var visibleRows = gridStudy.TableElement.VisualRows.Select(r=>r.RowInfo).ToArray();gridStudy.TableElement.Update(GridUINotifyAction.DataChanged, visibleRows); It works but I don't know whether the extra code I add to update the visible rows only enhance performanfce or not?
Posted on Feb 1, 2012 (permalink)
This additional logic is not needed in virtual mode. RadGridView is optimized for this behavior and CellValueNeeded event will be fired only for the visible cells on the screen.
Back to Top
[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]
UI controls for ASP.NET AJAX, MVC, WPF,Silverlight, Windows 8 and Windows Phone
Cross-platform Mobile Development Toolwith cloud-based architecture
Everything you need to build sites andmobile apps with JavaScript and HTML5
One easy tool for Functional, Performance,Load and Mobile software testing
Everything for your online business - contentmanagement, ecommerce, emarketing
Simple and intuitive project managementand collaboration software