Hi. My UltraWebgrid html is below. I have a functional grid inside an update panel on a content page with masterpage. I am using Infragistics 3.5 v10.3.20103.2134 controls. I need to add rows to the grid, but I am unable to get the functionality to work. Does Adding use the RowEditTemplate or is it a seperate template? Can someone please help, thanks?
Hi Maya, I couldn't get the sample to work, in that clicking the Add icon still doesn't do anything. What I did was place a button on the page that just inserts a blank record and re-loads the grid so they can edit the 'new' record. Thanks
Hello dbishop9 ,
Let me know if you need further assistance with this issue.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Hello dbishop,
Well, if you need a template for the adding there is no separate one you can use. You’ll have to use the RowEditing one. You can just manually open it when you add the new row.
I’m attaching a sample for your reference let me know if you have any questions.
I supposed I should include the html, shouldn't I? lol
<igtbl:UltraWebGrid ID="igMyGrid" runat="server" EnableAppStyling="True" StyleSetName="Office2007Blue" StyleSetPath="~/ig_res/" DisplayLayout-CellPaddingDefault="5"> <Bands> <igtbl:UltraGridBand> <Columns> <igtbl:UltraGridColumn BaseColumnName="ID" Key="ID" Hidden="true"> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn BaseColumnName="DATE" Key="DATE"> <Header Caption="Due Date"> <RowLayoutColumnInfo OriginX="2" /> </Header> <HeaderStyle HorizontalAlign="Center" /> <CellStyle HorizontalAlign="Center" /> <Footer> <RowLayoutColumnInfo OriginX="2" /> </Footer> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn BaseColumnName="NAME" Key="NAME"> <Header Caption="Performance Plan Goal"> <RowLayoutColumnInfo OriginX="3" /> </Header> <HeaderStyle HorizontalAlign="Left" /> <CellStyle HorizontalAlign="Left" /> <Footer> <RowLayoutColumnInfo OriginX="3" /> </Footer> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn BaseColumnName="Analysis" Key="Analysis"> <Header Caption="Plan Analysis"> <RowLayoutColumnInfo OriginX="4" /> </Header> <HeaderStyle HorizontalAlign="Left" /> <CellStyle HorizontalAlign="Left" /> <Footer> <RowLayoutColumnInfo OriginX="4" /> </Footer> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn BaseColumnName="STATUS" Key="STATUS"> <Header Caption="Status"> <RowLayoutColumnInfo OriginX="5" /> </Header> <HeaderStyle HorizontalAlign="Center" /> <CellStyle HorizontalAlign="Center" /> <Footer> <RowLayoutColumnInfo OriginX="5" /> </Footer> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn BaseColumnName="GOALDESC" Key="GOALDESC"> <Header Caption="Goal"> <RowLayoutColumnInfo OriginX="6" /> </Header> <HeaderStyle HorizontalAlign="Center" /> <CellStyle HorizontalAlign="Center" /> <Footer> <RowLayoutColumnInfo OriginX="6" /> </Footer> </igtbl:UltraGridColumn> <igtbl:UltraGridColumn BaseColumnName="COMPLETEDDATE" Key="COMPLETEDDATE"> <Header Caption="Completed"> <RowLayoutColumnInfo OriginX="7" /> </Header> <HeaderStyle HorizontalAlign="Center" /> <CellStyle HorizontalAlign="Center" /> <Footer> <RowLayoutColumnInfo OriginX="7" /> </Footer> </igtbl:UltraGridColumn> </Columns> <RowEditTemplate> <div id="divMyGridControls" style="background-color: #E5ECFD;"> <p align="left" style="padding: 2px 2px 2px 2px; border-color: Lightgray; border-width: 1px; border-style: solid;"> <asp:Table ID="tblMyGridControls" runat="server"> <asp:TableRow Visible="true"> <asp:TableCell> <asp:Label ID="lblMyGridID" runat="server" columnkey="ID"></asp:Label> </asp:TableCell> <asp:TableCell> <asp:TextBox ID="txtMyGridID" runat="server" Enabled="false" ToolTip="ID" columnkey="ID" BorderStyle="none" BackColor="#E5ECFD" ForeColor="#E5ECFD" Font-Size="0"></asp:TextBox> </asp:TableCell> </asp:TableRow> <asp:TableRow> <asp:TableCell> <asp:Label ID="lblMyGridItem" runat="server">Name</asp:Label> </asp:TableCell> <asp:TableCell> <button id="btnMyGridGoal" runat="server" style="font-size: 8pt; width: 80px; cursor: pointer;" tabindex="3" type="button"> Check Spelling</button><br /> <asp:TextBox ID="txtMyGridItem" runat="server" TextMode="MultiLine" Rows="3" MaxLength="10000" ToolTip="10,000 Maximum Characters" Width="850px" columnkey="NAME"></asp:TextBox> </asp:TableCell> </asp:TableRow> <asp:TableRow> <asp:TableCell Width="85px"> <asp:label ID="lblMyGridDueDate" runat="server">Due Date</asp:label> </asp:TableCell> <asp:TableCell> <igsch:WebDateChooser ID="igMyGridDueDate" runat="server" CalendarLayout-Culture="en-US" EnableAppStyling="True" Section508Compliant="true" StyleSetName="Office2007Blue" Format="Short" StyleSetPath="~/ig_res/" NullDateLabel="Select a Date" AllowNull="true" ClientSideEvents-InitializeDateChooser ="igMyGridDueDate_InitializeDateChooser"> </igsch:WebDateChooser> </asp:TableCell> </asp:TableRow> <asp:TableRow> <asp:TableCell> <asp:Label ID="lblMyGridAnalysis" runat="server">Analysis</asp:Label> </asp:TableCell> <asp:TableCell> <button id="btnMyGridAnalysis" runat="server" style="font-size: 8pt; width: 80px; cursor: pointer;" tabindex="3" type="button"> Check Spelling</button><br /> <asp:TextBox ID="txtMyGridAnalysis" runat="server" TextMode="MultiLine" Rows="3" MaxLength="10000" ToolTip="10,000 Maximum Characters" Width="850px" columnkey="ANALYSIS"></asp:TextBox> </asp:TableCell> </asp:TableRow> <asp:TableRow> <asp:TableCell> <asp:Label ID="lblMyGridStatus" runat="server">Status</asp:Label> </asp:TableCell> <asp:TableCell> <asp:DropDownList ID="ddlMyGridStatus" runat="server" columnkey="STATUS" DataTextField="STATUS" Width="150px"> </asp:DropDownList> </asp:TableCell> </asp:TableRow> <asp:TableRow> <asp:TableCell> <asp:Label ID="lblMyGridGoal" runat="server">Goal in AFS Plan</asp:Label> </asp:TableCell> <asp:TableCell> <asp:DropDownList ID="ddlMyGridGoal" runat="server" columnkey="GOALDESC" DataTextField="GOAL" Width="150px"> </asp:DropDownList> </asp:TableCell> </asp:TableRow> <asp:TableRow> <asp:TableCell> <asp:Label ID="lblMyGridCompletedDate" runat="server">Completed</asp:Label> </asp:TableCell> <asp:TableCell> <igsch:WebDateChooser ID="igMyGridCompletedDate" runat="server" EnableAppStyling="True" Section508Compliant="true" StyleSetName="Office2007Blue" DisplayModeFormat="d" EditModeFormat="d" StyleSetPath="~/ig_res/" NullDateLabel="Select a Date" AllowNull="true" ClientSideEvents-InitializeDateChooser="igMyGridCompletedDate_InitializeDateChooser"> </igsch:WebDateChooser> </asp:TableCell> </asp:TableRow> </asp:Table> </p> <p align="center" style="background-color: #D5DDEA; vertical-align: middle; padding: 2px 2px 0px 2px; border-color: Gray; border-width: 1px; border-style: solid;"> <asp:ImageButton ID="ibtnMyGridOK" runat="server" ImageUrl="~/Images/oknew.png" OnClick="ibtnMyGridOK_Click" /> <asp:ImageButton ID="ibtnMyGridCancel" runat="server" ImageUrl="~/Images/cancelnew.png" /> </p> </div> </RowEditTemplate> <RowTemplateStyle Wrap="true" > </RowTemplateStyle> <AddNewRow View="Bottom" Visible="Yes"> </AddNewRow> </igtbl:UltraGridBand> </Bands> <DisplayLayout Name="igMyGrid" AllowDeleteDefault="Yes" AllowSortingDefault="Yes" AllowUpdateDefault="RowTemplateOnly" BorderCollapseDefault="Separate" CellPaddingDefault="5" AutoGenerateColumns="false" HeaderClickActionDefault="SortSingle" RowSelectorsDefault="Yes" RowHeightDefault="20px" NoDataMessage="No Performance Plan Items To Display" HeaderStyleDefault-Cursor="Hand" Version="4.00" CellClickActionDefault="Edit" SelectTypeRowDefault="Single" AllowAddNewDefault="Yes" AddNewRowDefault-Visible="Yes" > <ClientSideEvents BeforeRowTemplateOpenHandler="igMyGrid_BeforeRowTemplateOpenHandler" /> <FrameStyle> </FrameStyle> <ActivationObject BorderColor="" BorderWidth=""> </ActivationObject> </DisplayLayout></igtbl:UltraWebGrid>