Add a new column to the Infragistics Wingrid

I am using Infragistics wingrid in my application. I assigned the data source to my winged ones. Now I want to add a new column at a specific location.

Can anyone please tell me how this can be done?

Best regards, Sawan.

-1


source to share


3 answers


Greetings,



I would add a new column to your data source. Since the data source is snapped to the grid, a column should appear.

+1


source


It looks like you are trying to add an unbound column. In this case, you can add the following to the grid's InitializeLayout delegate:



private void myUltraGrid_InitializeLayout(object sender, InitializeLayoutEventArgs e)
{
     e.Layout.Bands[0].Columns.Add("New Column Name");
}

      

+1


source


Infrastructure HOWTO: Initializing the UltraWinGrid Layout

http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.Aspx?ArticleID=1692

From the article: "When the DataSource property of a grid is set to a data source, the InitializeLayout event is fired. UltraWinGrid waits for the grid layout to be initialized inside this event. This does not mean that you cannot customize the layout at other times, but most of the layout related properties should be set inside the InitializeLayout event. "

+1


source







All Articles