M
mmumme
Here is what I am trying to do. I have a web page with a bunch of
ListBoxes. When a user clicks on a ListItem in any one of these
ListBoxes I want to add info from that ListItem into a
datagrid/datalist/repeater. In the same row I want to add a dropdown
box and a couple other columns. So basically I want each row to
consist of the following columns:
Text, TextBox, TextBox, DropDown
First, which is better to use for this - a repeater, a datagrid, or a
datalist?
Second, how can I add this dynamically?
I have tried this simple example just to see if I could add anything to
the repeater dynamically:
ArrayList values = new ArrayList();
values.Add(lstItem.Text);
values.Add(lstItem.Value);
rptSelections.DataSource = values;
rptSelections.DataBind();
After the databind I see the item in the repeater but it doesn't show
on the page. I can't get it to display even though it seems to be
there. Any idea why?
I've been working .Net for about a year but haven't worked with these
controls. Any help you could provide would be greatly appreciated!
Also, are there any good books that cover the above three controls
really well?
ListBoxes. When a user clicks on a ListItem in any one of these
ListBoxes I want to add info from that ListItem into a
datagrid/datalist/repeater. In the same row I want to add a dropdown
box and a couple other columns. So basically I want each row to
consist of the following columns:
Text, TextBox, TextBox, DropDown
First, which is better to use for this - a repeater, a datagrid, or a
datalist?
Second, how can I add this dynamically?
I have tried this simple example just to see if I could add anything to
the repeater dynamically:
ArrayList values = new ArrayList();
values.Add(lstItem.Text);
values.Add(lstItem.Value);
rptSelections.DataSource = values;
rptSelections.DataBind();
After the databind I see the item in the repeater but it doesn't show
on the page. I can't get it to display even though it seems to be
there. Any idea why?
I've been working .Net for about a year but haven't worked with these
controls. Any help you could provide would be greatly appreciated!
Also, are there any good books that cover the above three controls
really well?