<
telerik:RadGrid
ID
=
"RadGridTableau"
runat
=
"server"
GridLines
=
"Vertical"
AllowPaging
=
"true"
allowsorting
=
"true"
Skin
=
"Simple"
AllowFilteringByColumn
=
"False"
AutoGenerateColumns
=
"True"
PageSize
=
"10"
Width
=
"1500"
>
<
MasterTableView
NoMasterRecordsText
=
"Nessun Tableau presente."
GridLines
=
"Vertical"
AllowPaging
=
"true"
AllowFilteringByColumn
=
"False"
TableLayout
=
"Fixed"
Name
=
"TableauMain"
DataKeyNames
=
"idTypology"
>
<
DetailTables
>
<
telerik:GridTableView
DataKeyNames
=
"idRisorsa"
Name
=
"TableauDetail"
AutoGenerateColumns
=
"true"
>
<
Columns
>
</
Columns
>
</
telerik:GridTableView
>
</
DetailTables
>
<
Columns
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
enablePostBackOnRowClick
=
"true"
>
<
ClientEvents
OnRowContextMenu
=
"RowContextMenu"
></
ClientEvents
>
<
Selecting
AllowRowSelect
=
"True"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
Protected Sub RadGridTableau_DetailTableDataBind(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridDetailTableDataBindEventArgs) Handles RadGridTableau.DetailTableDataBind
Try
Dim dataItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)
Dim idTypology As String = dataItem.GetDataKeyValue("idTypology").ToString()
Dim d1 As Date = RadDatePicker_From.SelectedDate
Dim d2 As Date = RadDatePicker_To.SelectedDate
Dim polInterface As New POL_Manager.CPolInterface(myConn)
Dim myDatasource As DataSet = polInterface.StateResources(idTypology, d1, d2, AvailableState)
LogManager.WriteToDebugLog("c:\log\aa\", "RadGridTableau_DetailTableDataBind myDatasource.Tables(0).Columns.Count " & myDatasource.Tables(0).Columns.Count)
e.DetailTableView.DataSource = myDatasource
'e.DetailTableView.ShowHeader = False
Catch ex As Exception
Call LogManager.WriteToErrorLog(errorPath, ClassName, System.Reflection.MethodBase.GetCurrentMethod.Name.ToString(), ex, Err())
End Try
End Sub
polInterface.StateResources(idTypology, d1, d2, AvailableState)
) d1 and d2 are here different then first time<
asp:Button
ID
=
"btnRebind"
runat
=
"server"
Text
=
"Reload"
/>
Protected Sub btnRebind_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRebind.Click
Try
RadGridTableau.Rebind()
For Each item As GridDataItem In RadGridTableau.MasterTableView.Items
For Each innerView As GridTableView In item.ChildItem.NestedTableViews
innerView.DataSource = Nothing
innerView.Rebind()
Next
Next
Catch ex As Exception
Call LogManager.WriteToErrorLog(errorPath, ClassName, System.Reflection.MethodBase.GetCurrentMethod.Name.ToString(), ex, Err)
End Try
End Sub
RadGridTableau_DetailTableDataBind
is invoked. myDatasource.Tables(0).Columns.Count)
ClientGrid.MasterTableView.SelectRow(ClientGrid.MasterTableView.Rows[rowIndex].Control,
true);
<
radG:RadGrid AllowFilteringByColumn="false" Skin="Windows" SkinsPath="~/radcontrols/Grid/skins"
ID="RadGrid1" CssClass="bg-AdS-000110" runat="server" CellPadding="4" CellSpacing="1"
GridLines="none" AutoGenerateColumns="false" AllowSorting="true" AllowPaging="true"
AllowCustomPaging="true" AllowMultiRowSelection="true" OnSortCommand="RadGrid1_SortCommand"
OnNeedDataSource="RadGrid1_NeedDataSource" OnDetailTableDataBind="RadGrid1_DetailTableDataBind"
OnItemDataBound="RadGrid1_ItemDataBound" OnItemCommand="RadGrid1_ItemCommand">
<AlternatingItemStyle CssClass="bg-AdS-001000" HorizontalAlign="left"></AlternatingItemStyle>
<ItemStyle CssClass="bg-AdS-001011" HorizontalAlign="left"></ItemStyle>
<HeaderStyle CssClass="bg-AdS-000111" HorizontalAlign="left" />
<ClientSettings ColumnsReorderMethod="Reorder" AllowExpandCollapse="true" AllowColumnsReorder="true"
ReorderColumnsOnClient="false">
<Selecting AllowRowSelect="true" EnableDragToSelectRows="false" />
<ClientEvents OnRowSelecting="RowSelecting" OnRowDeselected="RowDeselected" OnRowSelected="RowSelected"
OnGridCreated="GridCreated" />
</ClientSettings>
<MasterTableView AllowMultiColumnSorting="false" AllowCustomSorting="true" DataMember="master"
Name="masterName" HierarchyLoadMode="ServerOnDemand" DataKeyNames="x,y,z"
Width="100%" CellPadding="0" CellSpacing="0" GridLines="None" BorderWidth="0">
<ExpandCollapseColumn CommandName="ExpandCollapse" UniqueName="expandC">
<HeaderStyle BackColor="#E0E0E0" CssClass="DashboardHeader" />
<ItemStyle Width="1" />
</ExpandCollapseColumn>
<DetailTables>
<radG:GridTableView AllowFilteringByColumn="false" runat="server" GridLines="None"
CellPadding="0" CellSpacing="0" HierarchyLoadMode="Client" HierarchyDefaultExpanded="true"
Width="100%" DataMember="details" Name="detailsName" ShowHeader="false">
<Columns>
<radG:GridTemplateColumn AllowFiltering="false">
<ItemTemplate>
<uc1:ItemDetails runat="server" ID="IDetails"></uc1:ItemDetails>
</ItemTemplate>
<ItemStyle BackColor="#FFFFFF" BorderWidth="0" />
</radG:GridTemplateColumn>
</Columns>
</radG:GridTableView>
</DetailTables>
<Columns>
<radG:GridClientSelectColumn UniqueName="CS" Reorderable="false">
<HeaderStyle Width="20" />
</radG:GridClientSelectColumn>
<radG:GridTemplateColumn HeaderStyle-HorizontalAlign="left" Reorderable="false">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:ImageButton ID="IB_Notes" onMouseout="hideddrivetip()" runat="server" ImageUrl="~/Images/add_note.gif"
OnClick="NotesView_Click"></asp:ImageButton>
<asp:Image ID="IMG_Notes" Visible="false" onMouseout="hideddrivetip()" runat="server"
ImageUrl="~/images/add_note.gif" />
<asp:Image ID="IB_Error" Visible="false" onMouseout="hideddrivetip()" runat="server"
ImageUrl="~/images/icon/ico_error.gif"></asp:Image>
<asp:ImageButton ID="IB_PreflightChk" Visible="false" runat="server" OnClick="IB_PreflightChk_Click"
ImageUrl="~/Images/icon_success.gif" />
</ItemTemplate>
</radG:GridTemplateColumn>
<radG:GridTemplateColumn SortExpression="BuyerSuppliedProductName" HeaderText="xxx"
HeaderStyle-Wrap="true">
<ItemStyle Wrap="true"></ItemStyle>
<ItemTemplate>
<asp:HyperLink ID="HL_JN" runat="server" NavigateUrl="javascript:;" Text='zzz'></asp:HyperLink>
<asp:HyperLink ID="HL_JN1" runat="server" NavigateUrl="javascript:;" Text='zzz'></asp:HyperLink>
</ItemTemplate>
</radG:GridTemplateColumn>
<radG:GridBoundColumn SortExpression="ProductName" DataField="ProductName" HeaderText="xxx"
HeaderStyle-Wrap="true" ItemStyle-HorizontalAlign="left" HeaderStyle-HorizontalAlign="left">
<ItemStyle Wrap="true" />
</radG:GridBoundColumn>
<radG:GridTemplateColumn SortExpression="Cost" HeaderText="xxx"
HeaderStyle-Wrap="false">
<HeaderStyle HorizontalAlign="left" />
<ItemStyle Wrap="False" HorizontalAlign="right"></ItemStyle>
<ItemTemplate>
<asp:HyperLink ID="HL_Quote" Target="_blank" runat="server" Text='xxx'></asp:HyperLink>
</ItemTemplate>
</radG:GridTemplateColumn>
<radG:GridTemplateColumn SortExpression="DueDate" HeaderText="xxx"
HeaderStyle-Wrap="false">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:Label ID="LBL_ItmDD" runat="server" Text='xxx'></asp:Label>
</ItemTemplate>
</radG:GridTemplateColumn>
<radG:GridBoundColumn DataField="CopOrgImp" AllowSorting="false" HeaderText="xxx"
ItemStyle-HorizontalAlign="right" ItemStyle-Wrap="false" HeaderStyle-HorizontalAlign="left"
ItemStyle-Width="1">
<HeaderStyle Wrap="false" />
</radG:GridBoundColumn>
<radG:GridTemplateColumn HeaderText="ccc" HeaderStyle-Wrap="false">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:Label ID="LBL_ItmNUP" runat="server" Text='xxx'></asp:Label>
</ItemTemplate>
</radG:GridTemplateColumn><radG:GridTemplateColumn SortExpression="OutputName" HeaderText="<%$ String:OperatorView.OutPut %>"
HeaderStyle-Wrap="false">
<ItemStyle Wrap="False"></ItemStyle>
<ItemTemplate>
<asp:Label ID="LBL_ItmOP" runat="server" Text='aaa'></asp:Label>
</ItemTemplate>
</radG:GridTemplateColumn>
<radG:GridBoundColumn SortExpression="StatusName" DataField="StatusName" HeaderText="vvv"
HeaderStyle-Wrap="false" ItemStyle-HorizontalAlign="left" HeaderStyle-HorizontalAlign="left">
</radG:GridBoundColumn>
<radG:GridBoundColumn SortExpression="OperatorName" DataField="OperatorName" HeaderText="bvb"
HeaderStyle-Wrap="false" ItemStyle-HorizontalAlign="left" HeaderStyle-HorizontalAlign="left">
</radG:GridBoundColumn>
</Columns>
</MasterTableView>
<ClientSettings>
<Resizing AllowColumnResize="False" />
</ClientSettings>
</radG:RadGrid>