Hi. I have a template add row at the top of my grid. One of the columns in the grid is used to display true/false values. In the template add row, that column has a checkbox image in it - the true/false data is displayed with the style ColumnStyle.CheckBox.
Is it possible to set up the grid so the template add row doesn't display the checkbox? The users find it confusing to see the checkbox there. They only want to see it after clicking on the template add row.
Thanks.
I think this works better for what you want:
private void ultraGrid1_BeforeRowActivate(object sender, Infragistics.Win.UltraWinGrid.RowEventArgs e) { if (e.Row.IsAddRow) { e.Row.Cells["A"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Default; } } private void ultraGrid1_InitializeTemplateAddRow(object sender, Infragistics.Win.UltraWinGrid.InitializeTemplateAddRowEventArgs e) { e.TemplateAddRow.Cells["A"].Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Image; }
For future reference, you can usually open a VS2010 project in VS2008 by opening the project file instead of the solution file.In other words, open the .csproj file directly, instead of the sln file. This may not always work, but it usually works with simple sample projects.
Hi Greg,
Could you please take a look again in the attached sample. This time I made the project using VS 2008. Also I made small modification in the sample to be the same like in your case.
gregstoops said:data source as a boolean value.
Georgi,
The sample you created is a VS 2010 project. I'm using VS 2008 so I can't open it. However, I did look at the code and I think I can see what you are doing.
I tried make the same changes to my existing VS 2008 project and it did not make the checkbox go away in the template add row. The root cause of this is when I add the column to the underlying data source as a boolean value. When that happens, the grid always displays the column data (including in the template add row) as a checkbox.
Greg
Hello Greg,
I made small sample for you. Could you please take a look at the attached file and send me feedback is it the same that you are looking for. Please if you have any questions do not hesitate to ask me
Regards