Hi,
Can anyone tell how to align the width for displaying Child Band using Web Hierarchical Data Grid. ?
The below code is written in Page_Load() in VB.NET
Dim
System.Data.DataSet
SqlClient.SqlConnection
sqlconn =
sqlconn.Open()
SqlClient.SqlDataAdapter(spName, sqlconn)
sqlDA.Fill(webgriddataset,
"T1")
SqlDataSource1_view1.DataSource = webgriddataset.Tables(0)
SqlDataSource2_view1.DataSource = webgriddataset.Tables(1)
bf(i) =
New BoundDataField
bf(i).DataFieldName = webgriddataset.Tables(0).Columns(i).Caption
bf(i).Key =
"Key" & i
bf(i).Header.Text = webgriddataset.Tables(0).Columns(i).Caption.ToLower()
'Dim scs1 = New SortingColumnSetting
'scs1.ColumnKey = bf(i).Key
'scs1.Sortable = True
'WebHierarchicalDataGrid1.Behaviors.Sorting.ColumnSettings.Add(scs1)
WebHierarchicalDataGrid1.Columns.Add(bf(i))
Next
Integer
childwidth = 300
WebHierarchicalDataGrid1.Columns(0).Width = 50
WebHierarchicalDataGrid1.Columns(1).Width = 200
WebHierarchicalDataGrid1.Columns(2).Width = 100
WebHierarchicalDataGrid1.DataSource = WebHierarchicalDataSource1
WebHierarchicalDataGrid1.DataBind()
Plz.. Go thro' and suggest solutions!!
Hi all,
I found the solution. I forgot to give the DataMember Name. I dynamically create bands and i try to add bound fields. Now it works Fine.
New problemi face is that all columns shown twice even autogenerate columns set to false.
Help me Plz.........?!!!!!!!!!!!!!
Hi All,
I found the solution. I forgot to give the data member for bands.
I dynamically assign Boundfield for bands. And Alignment works fine. Now the problem is the column displays two times even i set autoGenerateBands is to false.
Help me Plz...........>?