Intersoft WebGrid Documentation
How-to: Specify a TextItem programmatically
See Also Send comments on this topic.

Glossary Item Box

Beside you can specify a TextItem using WebGrid's Designer, you also can specify TextItem programmatically.

In this topic, you will learn how to specify a TextItem programmatically, such as set CommonText "Ready" to "Start".

To Specify a TextItem Programmatically.

Add the following code in InitializeLayout server side event:

C# Copy Code
private void WebGrid1_InitializeLayout(object sender, ISNet.WebUI.WebGrid.LayoutEventArgs e)
{    
   WebGridTextItem oItem = new WebGridTextItem("CommonText/Ready","Start");    
   WebGrid1.LayoutSettings.TextSettings.TextItems.Add(oItem);
}

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.