Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Form has dropdownlistbox.

I want add selected item from DDL to DataTable in dataset and assume it with DataGrid.

 

The first row adds normally, but when i add the second row grid consist only one row that i add last time.

For example:

1. choice is "ddd" --> in a grid one row "ddd"

2. choice is "lll" --> in a grid must be || "ddd" || "lll" ||

but there is only "lll" row in a grid.

code:

 

procedure TWebForm3.Button1_Click(sender: System.Object; e: System.EventArgs);

var nr:dataRow;

begin

nr:=datasetNew.Tables['new'].NewRow;

nr['name']:=DropDL.SelectedItem.Text;

dsNew.Tables['new'].Rows.Add(nr);

D_Grid.DataBind;

end;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...