Hi guys,
I have two webexplorerbar one within another.I try to access webdatagrid in child webexplorerbar.Here is my codind in .cs file:
First I get child bar instance from parent bar:
WebExplorerBar viewPanel = (WebExplorerBar)this.WebExplorerBar1.Groups[0].Items[0].FindControl("WEBGridPanel");
I get instance correctly from the main bar but when I try access to webdatagrid in view panel I am getting null:
WebDataGrid wdd2 = (WebDataGrid)viewPanel.FindTemplateById("gridPanel").FindControl("WebDataGrid2");
Please help me out .
Thanks
Hi Jane,
Did you try this:
WebDataGrid wdd2 = (WebDataGrid)viewPanel.Groups[0].Items[0].FindControl("WebDataGrid2");
If this does not work please let me know your ExploreBar configuration, so that I can provide you with the correct syntax.
Hi,
it is not working I am getting runtime error:
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
Here is my .aspx page:
ig:WebExplorerBar ID="WebExplorerBar1" runat="server" CssClass="viewPanel" StyleSetName="Header" Width="805px" Height="870px">
<Groups
>
<ig:ExplorerBarGroup
<Items
<ig:ExplorerBarItem TemplateId="viewPanel"
</ig:ExplorerBarItem
</Items
</ig:ExplorerBarGroup
</Groups>
<Templates>
<ig:ItemTemplate TemplateID="viewPanel" runat="server"
<Template
<div class="content" id
="content">
<div id="navigation" class="navigation" style="height
: 5px;">
</div
<div id="findemp" class="findemp" style="margin-top
: 0px">
<div id="personInfo" style="margin-top
<table
<tr
<td
<uc1:CFNList ID="CFNList1" runat="server" ClientIDMode="Static"></uc1:CFNList
</td
EIS ID:
<br
/>
<asp:TextBox ID="txtEISid" runat="server" CssClass="txtinput" Font-Size
="X-Small"
Height="12px" Width="75px" MaxLength="7" ToolTip="Please Enter EIS ID."></asp:TextBox
Status :
<asp:DropDownList ID="ddlStatus" runat="server" Width="125" CssClass="txtinput" Font-Names
="Verdana"
Font-Size
="X-Small">
<asp:ListItem Text="All" Value="W"></asp:ListItem
<asp:ListItem Text="Pending" Value="P"></asp:ListItem
<asp:ListItem Text="Approved" Value="A"></asp:ListItem
<asp:ListItem Text="Rejected" Value="R"></asp:ListItem
<asp:ListItem Text="Saved" Value="S"></asp:ListItem
</asp:DropDownList
<asp:Button ID="btnSearch" runat="server" CssClass="selectitem" Text="Search" OnClick="btnSearch_Click"
</tr
<td colspan
="6">
<td class="tbtxtbox" colspan="3" style="height
:30px;">
<asp:Label ID="lblError" runat="server" Height="10px" Font-Size="Small" ForeColor="red"
</asp:Label
</td>
</table
<div style="margin-left
: 10px;">
<ig:WebExplorerBar ID="WebExplorerBar2" CssClass="infoPanel" StyleSetName="Info" runat="server" Width
="99%">
<ig:ItemTemplate ID="ItemTemplate3" TemplateID="infoPanel" runat
="server">
<Template>
<div id="contactcard" class
="contactcard">
<div
<table width="99%" cellpadding
="1px">
<td align="center" rowspan
="5">
<igchart:UltraChart ID="UltraChart1" Visible
="False"
runat="server" Border-Thickness="0" ChartType="PieChart3D" Width="450px"
Height="180px" BackgroundImageFileName=""
BackgroundImageStyle
="StretchedFit"
EmptyChartText="" OnChartDataClicked="UltraChart1_ItemClicked" Transform3D-Scale
="100"
Version
="7.3">
<ColorModel ModelStyle="customlinear" AlphaLevel="255" ColorBegin="Pink"
ColorEnd
="DarkRed">
</ColorModel
<PieChart3D RadiusFactor="100"
</PieChart3D
<TitleTop Font="Verdana, 9.75pt, style=Bold" HorizontalAlign="Center"
Text
="YTD Breakdown by Waiver Request Status ">
</TitleTop
<Tooltips Font-Bold="False" Font-Italic="False" Font-Overline="False"
Font-Strikeout="False" Font-Underline="False"
<Border Thickness="0"
<Data UseRowLabelsColumn="True"></Data><DeploymentScenario
ImageURL="ChartImages/chart_allocation_pie_#SEQNUM(100).png"
FilePath="~/EIS/PerSession/ChartImages"></DeploymentScenario
<Effects
<igchart:GradientEffect
</Effects
<Axis
<PE ElementType="None" Fill="Cornsilk"
<X TickmarkInterval="0" Visible
="False">
<MajorGridLines AlphaLevel="255" Color="Gainsboro" DrawStyle="Dot"
Thickness="1" Visible="True"
<MinorGridLines AlphaLevel="255" Color="LightGray" DrawStyle="Dot"
Thickness="1" Visible="False"
<Labels HorizontalAlign="Near" ItemFormatString="<ITEM_LABEL>"
Orientation="Horizontal" VerticalAlign
="Center">
<SeriesLabels FormatString="" HorizontalAlign="Near" Orientation="Horizontal"
VerticalAlign
</SeriesLabels
</Labels
</X
<Y TickmarkInterval="0" Visible
<Labels HorizontalAlign="Far" ItemFormatString="<DATA_VALUE:00.##>"
<SeriesLabels FormatString="" HorizontalAlign="Far" Orientation="Horizontal"
</Y
<Y2 TickmarkInterval="0" Visible
<Labels HorizontalAlign="Near" ItemFormatString="<DATA_VALUE:00.##>"
</Y2
<X2 TickmarkInterval="0" Visible
<Labels HorizontalAlign="Far" ItemFormatString="<ITEM_LABEL>"
</X2
<Z TickmarkInterval="0" Visible
<Labels HorizontalAlign="Far" ItemFormatString="" Orientation="Horizontal"
<SeriesLabels HorizontalAlign="Far" Orientation="Horizontal"
</Z
<Z2 TickmarkInterval="0" Visible
<Labels HorizontalAlign="Near" ItemFormatString="" Orientation="Horizontal"
<SeriesLabels HorizontalAlign="Near" Orientation="Horizontal"
</Z2
</Axis
<Legend Visible="True"></Legend
</igchart:UltraChart
</Template
</ig:ItemTemplate
</Templates
</ig:WebExplorerBar
</div>
<div id
="export">
<table width="60" style="float: right; position: absolute; left
: 365px;">
<asp:Button ID="txtExcel1" Width="105px" CssClass="selectitem" runat="server" Text
="Export as Excel"
OnClick="txtExcel1_Click" /></td
<asp:Button ID="txtPdf1" CssClass="selectitem" runat="server" Width="105px" Text
="Export as PDF"
OnClick="txtPdf1_Click" /></td
<ig:WebExplorerBar ID="WebExplorerBar3" StyleSetName="WStatus" CssClass="gridPanel1" Width="99%" runat
<ig:ItemTemplate ID="ItemTemplate2" TemplateID="gridPanel" runat="server" ClientIDMode
="Static">
<ig:WebDataGrid ID="WebDataGrid2" runat="server" StyleSetName="Pear" Style="margin-top: 0px" Height="350px" Width="99%" EnableAppStyling="True" Browser="xml"
<Columns
<ig:BoundDataField DataFieldName="FILENO" Key="FILENO" Width="58px" Header-Text
="PRI">
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="LASTNAME" Key="LASTNAME" Width="120px" Header-Text
="Last Name">
</ig:BoundDataField
<ig:BoundDataField DataFieldName="FIRSTNAME" Key="FIRSTNAME" Width="90px" Header-Text
="First Name">
<ig:BoundDataField DataFieldName="CFN" Key="CFN" Width="50px" Header-Text
="CFN">
<ig:BoundDataField DataFieldName="LOCATION" Key="LOCATION" Width="70px" Header-Text
="Location">
<ig:BoundDataField DataFieldName="JOB" Key="JOB" Width="50px" Header-Text
="JOB">
<ig:BoundDataField DataFieldName="DOEHRS" Key="DOEHRS" Width="60px" Header-Text
="DOE HRS">
<ig:BoundDataField DataFieldName="CLHRS" Key="CLHRS" Width="50px" Header-Text
="CL HRS">
<ig:BoundDataField DataFieldName="STAT" Key="STAT" Width="55px" Header-Text
="Status">
<ig:BoundDataField DataFieldName="SENDDATE" Key="SENDDATE" Width="55px" Header-Text="Sub Date" DataFormatString
="MM/dd/yyyy">
<ig:BoundDataField DataFieldName="REQUESTER" Key="REQUESTER" Width="165px" Header-Text
="Requester">
<ig:BoundDataField DataFieldName="APPROVER" Key="APPROVER" Width="140px" Header-Text
="Approver">
</Columns
Thank you for the provided markup, but it does not seem to be complete and I am not sure if my sample correctly follows your configuration. Please provide the whole markup or even a sample - just let me know at what event you need reference so that I can write the syntax there.
I'm just following up to see if you had the time to provide the requested information.