Adding muliple rows inside of Gridview row?

It's a bit of an odd requirement, but I have done something similar in the past where I added a second row for a notes box for each row, because it would have been too wide to sensibly fit on the current row During your RowDataBound event try something like this: GridView x = (GridView)sender; if (e.Row. RowType == DataControlRowType. DataRow && x.

EditIndex == e.Row. RowIndex) { TextBox notes = (TextBox)e.Row. Cells23.

Controls0; notes. Height = // some height notes. Width = // some width notes.

TextMode = TextBoxMode. MultiLine; e.Row. Cells23.Controls.Clear(); GridViewRow row = new GridViewRow(0, 0, DataControlRowType.

DataRow, DataControlRowState. Normal); TableCell cell = new TableCell(); cell. ColumnSpan = // gridview columns count; cell.Controls.

Add(notes); row.Cells. Add(cell); x. Controls0.Controls.

AddAt(x. EditIndex + 2, row); } note, this is grabbing an existing bound TextBox from the 23rd column and copying it into a new row, then it is being removed from the original cell. Additionally, the notes box was only shown on the row being edited, hence: && x.

EditIndex == e.Row. RowIndex and x. Controls0.Controls.

AddAt(x. EditIndex + 2, row) You'll probably just want the new GridViewRow and new TableCell parts.

It's a bit of an odd requirement, but I have done something similar in the past where I added a second row for a notes box for each row, because it would have been too wide to sensibly fit on the current row. During your RowDataBound event try something like this: GridView x = (GridView)sender; if (e.Row. RowType == DataControlRowType.

DataRow && x. EditIndex == e.Row. RowIndex) { TextBox notes = (TextBox)e.Row.

Cells23. Controls0; notes. Height = // some height notes.

Width = // some width notes. TextMode = TextBoxMode. MultiLine; e.Row.

Cells23.Controls.Clear(); GridViewRow row = new GridViewRow(0, 0, DataControlRowType. DataRow, DataControlRowState. Normal); TableCell cell = new TableCell(); cell.

ColumnSpan = // gridview columns count; cell.Controls. Add(notes); row.Cells. Add(cell); x.

Controls0.Controls. AddAt(x. EditIndex + 2, row); } note, this is grabbing an existing bound TextBox from the 23rd column and copying it into a new row, then it is being removed from the original cell.

Additionally, the notes box was only shown on the row being edited, hence: && x. EditIndex == e.Row. RowIndex and x.

Controls0.Controls. AddAt(x. EditIndex + 2, row); You'll probably just want the new GridViewRow and new TableCell parts.

For the RadioButton, you will need to use the Depending on the data which you are binding to the GridView, e.g. List of objects within Lists of objects, you can bind Gridview's within a gridview using Container.DataItem.

I am working with Gridview control and I am also adding radio button to each row in ASP .NET. Here is something that I would like to accomplish but I am not sure how this should done. The problem is that I have add a muliple datarow insie of the each gridview.

Something like below. So, some cases I have add a row with two rows like the example. And, the ID eventurally will be radio button where user can click.

Is there any way I can accomplish this?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions