how did i set a column invisible? the data (when i later select some row) i still need.in the old ultragrid i did it with
Band.Columns(0).Hidden =
True
Hello Martin,
Why you think that this error is related to hiding the column? Do you stop getting the error when you remove the code for hiding it? Would you give me the definition of your webdatagrid from the aspx page to take a look at your configuration?
Regards,
Lyuba
Developer Support Engineer
Infragistics
www.infragistics.com/support
>Do you stop getting the error when you remove the code for hiding it?
yes . if i comment out
Datacolumn1.Hidden = Trueit works fine.
Hi, i build it dynamic. on the aspx page i have only <ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="500px" Width="98%" AutoGenerateColumns="false" > <Behaviors> <ig:Selection RowSelectType="Multiple" Enabled="true" /> <ig:RowSelectors RowNumbering="true" Enabled="true" /> <ig:Paging PagerAppearance="Bottom" PageSize="10" PagerCssClass="igg_CustomPager" Enabled="true"> <PagerTemplate> <uc1:CustomerPagerControl ID="CustomerPagerControl1" runat="server" /> </PagerTemplate> </ig:Paging> </Behaviors> </ig:WebDataGrid>
code behind i have
Dim Datacolumn1 As New BoundDataField Datacolumn1.DataFieldName = "L_ID" Datacolumn1.Key = "L_ID" Datacolumn1.Header.Text = "L_ID" >>>>> ' Datacolumn1.Hidden = True
WebDataGrid1.Columns.Add(Datacolumn1)
Dim Datacolumn2 As New BoundDataField Datacolumn2.DataFieldName = "test2" Datacolumn2.Key = "test2" Datacolumn2.Header.Text = "test2." Datacolumn2.Width = 10 * 8 'http://alexonasp.net/samples/stringformatting/ Datacolumn2.DataFormatString = "{0:MM/dd/yyyy}" WebDataGrid1.Columns.Add(Datacolumn2)
Dim Datacolumn3 As New BoundDataField Datacolumn3.DataFieldName = "test3" Datacolumn3.Key = "test3" Datacolumn3.Header.Text = "test3" WebDataGrid1.Columns.Add(Datacolumn3)
WebDataGrid1.DataSource = MyRS
WebDataGrid1.DataBind()