Hi Team,
I am migrating from ultrawebgrid to webdatagrid. first default editable row adding to webdatagrid initially. If user enterted data into row, click on tab automatically a add new editable row, else don't add any row. like wise user can add according to his wish. finally he will click on finish button, all the data which we have captured in webdatagrid, need to save into database. Please provide the solution ASAP that would be helpful.
Previous code with ultrawebgrid
<DisplayLayout AllowDeleteDefault="Yes" ColHeadersVisibleDefault="No" RowHeightDefault="20px" Version="4.00" BorderCollapseDefault="Separate" Name="dgrdAttribute" TableLayout="Fixed"> <AddNewBox> <Style BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray">
<BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails>
</Style> </AddNewBox> <Pager> <Style BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray">
</Style> </Pager> <HeaderStyleDefault BorderStyle="Solid" ForeColor="White" BackColor="#AA0000"> <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails> </HeaderStyleDefault> <FrameStyle Width="202px" BorderWidth="1px" Font-Size="8pt" Font-Names="Verdana" BorderColor="DarkGray" BorderStyle="Solid" Height="200px"></FrameStyle> <FilterOptionsDefault AllString="(All)" NonEmptyString="(NonEmpty)" EmptyString="(Empty)"> <FilterHighlightRowStyle ForeColor="White" BackColor="#151C55"></FilterHighlightRowStyle> <FilterDropDownStyle Width="200px" BorderWidth="1px" Font-Size="11px" Font-Names="Verdana,Arial,Helvetica,sans-serif" BorderColor="Silver" BorderStyle="Solid" BackColor="White" CustomRules="overflow:auto;"> <Padding Left="2px"></Padding> </FilterDropDownStyle> </FilterOptionsDefault> <FooterStyleDefault BorderWidth="1px" BorderStyle="Solid" BackColor="LightGray"> <BorderDetails ColorTop="White" WidthLeft="1px" WidthTop="1px" ColorLeft="White"></BorderDetails> </FooterStyleDefault> <EditCellStyleDefault BorderWidth="0px" BorderStyle="None"></EditCellStyleDefault> <RowAlternateStyleDefault ForeColor="Black" BackColor="#CCCCCC"></RowAlternateStyleDefault> <RowStyleDefault BorderWidth="1px" BorderColor="Gray" BorderStyle="Solid" BackColor="White"> <Padding Left="3px"></Padding> <BorderDetails ColorTop="White" ColorLeft="White"></BorderDetails> </RowStyleDefault> </DisplayLayout> <Bands> <igtbl:UltraGridBand AllowAdd="Yes" RowSelectors="No"> <Columns> <igtbl:UltraGridColumn HeaderText="Attribute list" FooterText="" EditorControlID="" FormulaErrorValue="" Width="200px" AllowUpdate="Yes" Format="" BaseColumnName="AttributeName" AllowResize="Free"> <Footer Key="" Caption="" Title=""></Footer> <Header Key="" Caption="Attribute list" Title=""></Header> </igtbl:UltraGridColumn> </Columns> <FilterOptions AllString="" NonEmptyString="" EmptyString=""> <FilterHighlightRowStyle ForeColor="White" BackColor="#151C55"></FilterHighlightRowStyle> <FilterDropDownStyle Width="200px" BorderWidth="1px" Font-Size="11px" Font-Names="Verdana,Arial,Helvetica,sans-serif" BorderColor="Silver" BorderStyle="Solid" BackColor="White" CustomRules="overflow:auto;"> <Padding Left="2px"></Padding> </FilterDropDownStyle> </FilterOptions> <AddNewRow Visible="Yes"></AddNewRow> </igtbl:UltraGridBand> </Bands>
Hello,
Thank you for using our forum!
As I understand you want to implement Grids row adding feature, in that case my suggestion is to have a look at the following articles like:
- Add New Row - Basic Features- Add new row in WebDataGrid client/server side- Row Adding (WebDataGrid) documentation
Also I have created a sample for you in order to show you how to add a row into WebDataGrid and with button click to insert the new row into the database.
I hope you will benefit from the sample.
I will give detailed example what I want. WebDataGrid having only one column, Initial page load default first row of webDatagrid should be editable. After entering data into in the irst row of WebDataGrid, click on tab need to create one more editable row should display, this should be done by client side only. Once all the work is over at client side, Click on server side buttion, need to capture row details which entered in webDatagrid at server side.
For Details you can check the images which I sent to you.
Image 1 : Page load Default editable first row displaying in WebDataGrid
Image 2 : After entered data in first row click on tab, need to create second row which also editable(need to be done by client side only).
Image 3: After entered data in Secon row click on tab, need to create second row which also editable(need to be done by client side only).
Image 4 : Click on CreateSite button, three rows data of webdatagrid need to be capture at server side.