Adding a child row to a new parent row

rated by 0 users
This post has 4 Replies | 3 Followers

Not Ranked
Points 40
randolfW98 Posted: 09-26-2008 6:20 PM

Hi,

I am new to using this grid and am trying to add a child row to a newly added parent row in a hiearchial layout and can never get the child tables new button to be enabled. I have tried adding a new row to the child datatable when the parent is added to the dataset in the rowUpdated event but I still don't ever get the expansion icon or the child new row button enabled when that new parent row has focus. I am sure I am just missing some simple property or setting. Any help would be appreciated.

Randy

 Here is the markup, I am using a user control row edit template to edit both rows, which are added in code behind:

<igtbl:UltraWebGrid id="UltraWebGrid1" runat="server" EnableViewState="True" DataMember="DaysRequests" DataSource='<%# GridDS %>' OnInitializeDataSource="UltraWebGrid1_InitializeDataSource" Browser="Xml">

<DisplayLayout ViewType="Hierarchical" AllowDeleteDefault="Yes" AllowAddNewDefault="Yes" RowHeightDefault="20px" Version="3.00" GridLinesDefault="Horizontal" SelectTypeRowDefault="Single" RowsRange="20" BorderCollapseDefault="Separate" LoadOnDemand="Xml"

Name="UltraWebGrid1" AllowUpdateDefault="RowTemplateOnly" CellClickActionDefault="Edit" AutoGenerateColumns="False">

<AddNewBox BoxStyle-BackColor="white" BoxStyle-BorderColor="blue" Hidden="false" View="compact" Location="top"></AddNewBox>

<ClientSideEvents XmlHTTPResponseHandler="UltraWebGrid1_XmlHTTPResponseHandler" TemplateUpdateControlsHandler="UltraWebGrid1_TemplateUpdateControlsHandler"></ClientSideEvents>

<HeaderStyleDefault VerticalAlign="Middle" BorderWidth="1px" Font-Size="8pt" Font-Names="Verdana" BorderColor="White" BorderStyle="Solid" HorizontalAlign="Left" ForeColor="#333333" BackColor="LightGray">

<Padding Left="5px" Right="5px"></Padding>

<BorderDetails ColorRight="White" WidthRight="1px" StyleRight="Solid"></BorderDetails>

</HeaderStyleDefault>

<RowSelectorStyleDefault BorderStyle="None" BackColor="White"></RowSelectorStyleDefault>

<FrameStyle Cursor="Default" BorderWidth="1px" Font-Size="8pt" Font-Names="Verdana" BorderColor="Gainsboro" BorderStyle="Solid" BackColor="Transparent"></FrameStyle>

<FooterStyleDefault BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray">

<BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails>

</FooterStyleDefault>

<RowExpAreaStyleDefault BackColor="White"></RowExpAreaStyleDefault>

<SelectedRowStyleDefault ForeColor="#F7F7F7" BackColor="gray"></SelectedRowStyleDefault>

<RowAlternateStyleDefault BackColor="#F7F7F7"></RowAlternateStyleDefault>

<RowStyleDefault VerticalAlign="Middle" BorderWidth="1px" Font-Size="8pt" Font-Names="Verdana" BorderColor="Gainsboro" BorderStyle="Solid" HorizontalAlign="Right" ForeColor="#333333" BackColor="#E7E7FF">

<Padding Left="7px" Right="7px"></Padding>

<BorderDetails WidthLeft="0px" WidthTop="0px"></BorderDetails>

</RowStyleDefault>

 

</DisplayLayout>

<Bands>

<igtbl:UltraGridBand AddButtonCaption="Request Details" BaseTableName="DaysRequests" Key="InternalId" DataKeyField="InternalId" ChildBandColumn="DaysRequests_DaysResponses">

<Columns>

<igtbl:UltraGridColumn HeaderText="InternalId" Key="InternalId" Hidden="True" BaseColumnName="InternalId">

<Footer Key="InternalId"></Footer>

<Header Key="InternalId" Caption="InternalId"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn Width="140px" HeaderText="Request Date" Key="Date" BaseColumnName="Date" format="MM/dd/yyyy" >

<Footer Key="Date"></Footer>

<Header Key="Date" Caption="Request Date"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn Width="140px" HeaderText="From" Key="FromDate" BaseColumnName="FromDate" >

<Footer Key="FromDate"></Footer>

<Header Key="FromDate" Caption="From"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn Width="140px" HeaderText="To" Key="ThroughDate" BaseColumnName="ThroughDate" >

<Footer Key="ThroughDate"></Footer>

<Header Key="ThroughDate" Caption="To"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn Width="50px" HeaderText="Days" Key="Days" BaseColumnName="Days">

<Footer Key="Days"></Footer>

<Header Key="Days" Caption="Days"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn HeaderText="Reason" Key="OutpatientReason" BaseColumnName="OutpatientReason">

<Footer Key="OutpatientReason"></Footer>

<Header Key="OutpatientReason" Caption="Reason"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn Hidden="true" Key="ReceivedDate" BaseColumnName="ReceivedDate" />

<igtbl:UltraGridColumn Hidden="true" Key="ReceivedTime" BaseColumnName="ReceivedTime" />

<igtbl:UltraGridColumn Hidden="true" Key="RequestedLevelOfCare" BaseColumnName="RequestedLevelOfCare" />

<igtbl:UltraGridColumn Hidden="true" Key="RequestedPerDiem" BaseColumnName="RequestedPerDiem" />

<igtbl:UltraGridColumn Hidden="true" Key="ProviderNotifiedDate" BaseColumnName="ProviderNotifiedDate" />

<igtbl:UltraGridColumn Hidden="true" Key="ProviderNotifiedTime" BaseColumnName="ProviderNotifiedTime" />

<igtbl:UltraGridColumn Hidden="true" Key="AllInfoReceivedDate" BaseColumnName="AllInfoReceivedDate" />

<igtbl:UltraGridColumn Hidden="true" Key="AllInfoReceivedTime" BaseColumnName="AllInfoReceivedTime" />

<igtbl:UltraGridColumn Hidden="true" Key="VerbalNoticeDate" BaseColumnName="VerbalNoticeDate" />

<igtbl:UltraGridColumn Hidden="true" Key="VerbalNoticeTime" BaseColumnName="VerbalNoticeTime" />

<igtbl:UltraGridColumn Hidden="true" Key="WrittenNoticeDate" BaseColumnName="WrittenNoticeDate" />

<igtbl:UltraGridColumn Hidden="true" Key="WrittenNoticeTime" BaseColumnName="WrittenNoticeTime" />

</Columns>

</igtbl:UltraGridBand>

<igtbl:UltraGridBand BaseTableName="DaysRequests" Key="InternalId" DataKeyField="InternalId" AllowAdd="yes" ChildBandColumn="noChildBand">

<Columns>

<igtbl:UltraGridColumn HeaderText="InternalId" Key="InternalId" Hidden="True" BaseColumnName="InternalId">

<Footer Key="InternalId"></Footer>

<Header Key="InternalId" Caption="InternalId"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn Width="90px" HeaderText="Action" Key="Action" BaseColumnName="Action">

<Footer Key="Action"></Footer>

<Header Key="Action" Caption="Action"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn Width="140px" HeaderText="From" Key="FromDate" BaseColumnName="FromDate" >

<Footer Key="FromDate"></Footer>

<Header Key="FromDate" Caption="From"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn Width="140px" HeaderText="To" Key="ThroughDate" BaseColumnName="ThroughDate" >

<Footer Key="ThroughDate"></Footer>

<Header Key="ThroughDate" Caption="To"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn Width="50px" HeaderText="Days" Key="Days" BaseColumnName="Days">

<Footer Key="Days"></Footer>

<Header Key="Days" Caption="Days"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn HeaderText="Reason" Key="OutpatientReason" BaseColumnName="OutpatientReason">

<Footer Key="OutpatientReason"></Footer>

<Header Key="OutpatientReason" Caption="Reason"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn HeaderText="Reviewed" Key="Reviewed" Width="90px" BaseColumnName="Reviewed" Type="CheckBox">

<Footer Key="Reviewed"></Footer>

<Header Key="Reviewed" Caption="Reviewed"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn HeaderText="Appealed" Key="Appealed" Width="90px" BaseColumnName="Appealed" Type="CheckBox" >

<Footer Key="Appealed"></Footer>

<Header Key="Appealed" Caption="Appealed"></Header>

</igtbl:UltraGridColumn>

<igtbl:UltraGridColumn Hidden="true" Key="ApprovedPerDiem" BaseColumnName="ApprovedPerDiem" />

<igtbl:UltraGridColumn Hidden="true" Key="PerDiemVariance" BaseColumnName="PerDiemVariance" />

<igtbl:UltraGridColumn Hidden="true" Key="AuthorizedLevelOfCare" BaseColumnName="AuthorizedLevelOfCare" />

<igtbl:UltraGridColumn Hidden="true" Key="LevelOfCareVariance" BaseColumnName="LevelOfCareVariance" />

</Columns>

</igtbl:UltraGridBand>

</Bands>

</igtbl:UltraWebGrid>

  • | Post Points: 20
Top 25 Contributor
Points 9,538
Infragistics Employee
Hello Randy, The AddNew button will only become active if you the ActiveRow of the WebGrid is a parent row. The easiest way to get an row to be active is to click on the row in either a cell of the row or the row selector itself. However there was a bug, quite a while ago, that a newly added row wouldn't allow child rows to be added. So in your sample try clicking on the parent row or row selector of a different parent row. If you get the child row button to be active, try doing the same to the newly added row. If that doesn't work, then check to see if you are using the latest version of your control version. If you aren't then please try getting the hotfix and applying that.

-- Darrell

  • | Post Points: 20
Not Ranked
Points 40

I think it must be related to that bug you mention, because for existing rows it does work. I tried to download the hotfix but I am still using an evaluation license to see if this grid will meet our business requirements. Does the hotfix require me to purchase a license? I am having a hard time downloading it.

  • | Post Points: 20
Top 25 Contributor
Points 9,538
Infragistics Employee
Yes, the hotfix requires a license.

-- Darrell

  • | Post Points: 20
Top 10 Contributor
Points 40,764
Infragistics Employee

Actually, we've recently started providing hot fixes to our trial customers as well.  This is a recent change of policy, and the website hasn't yet been updated to account for it.  Licensed customers can currently get at hot fixes from their My Keys and Downloads page, but we haven't finished changing what we need to change so that trial customers can directly download hot fixes.

For now, if you'd like to download a hot fix during your evaluation period, please submit a support request to request it.  We simply need to know which installer (or installers) you used to install the toolset - the ".NET" installer (which contains both Windows Forms and ASP.NET CLR 2.0 controls in one installer), the "Windows Forms" installer, the "ASP.NET CLR 2.0" installer, or the "ASP.NET CLR 3.5" installer.  Check your Add/Remove Programs in your Windows Control Panel if you're not sure which one you installed.

To my knowledge, we're only able to provide trial hot fix downloads for versions of the toolset still available as trial downloads themselves - essentially for our most recent release of the toolset.

Vince McDonald
Senior Developer Support Engineer, MCP

Need help? Find the various ways you can ask for help from Infragistics.

  • | Post Points: 5
Page 1 of 1 (5 items) | RSS

Forum Statistics

40,788 users have contributed to 129,818 threads and 144,150 posts.

In the past week, we've had 5,587 new users, adding to our total of 467,632 registered users!

In the past 24 hours, we have 56 new thread(s), 217 new post(s), and

In the past 3 days, the most popular thread for everyone has been "Google Chrome & UltraWebGrid. Compatible or Not? ". The post with the most views is "In wingrid RowFilter dropdown items for DropDown column is not shwing ". The most replies were made to "Google Chrome & UltraWebGrid. Compatible or Not? ".

Please welcome our newest member fceskxv .