c# - Horizontal Scrollbar not working in listbox created using Razor -
i have tried many many times google trying google overflow problem ie
in google googling what meaning of life
lots of different answers different problems no 1 has answer want!
i have editor template in mvc site creates listbox in table other fields , buttons. problem listbox doesn't show scrollbars when value inside long. value added listbox when user adds key , value , clicks add
<tr> <td> @html.textbox("new key", newkey, new {id = "keytext", placeholder = "parmeter key", @class = "form-control", style = "width: 133px;"}) @html.textbox("new value", newvalue, new {id = "valuetext", placeholder = "parmeter value", @class = "form-control", style = "width: 133px;"}) <div id="hiddensq"> </div> @for (int = 0; < model.count(); i++) { @html.hidden("uservalues", model.tolist()[i].tostring()) } </td> <td rowspan="2"> @html.listbox("listbox", new selectlist(model), new { id = "listbox", onclick = "editselected(this.value)", size = 6, @class = "form-control", style = "width: 144px; height: 105px; overflow: auto;" }) </td> </tr> <tr> <td> <input type="button" value="add" class="btn btn-default" onclick="add(this.value)" /> <input type="button" value="remove" class="btn btn-default" onclick="removefromlistbox(this.value)" /> </td> </tr>
my model contains list of object have made called parameter
public list<parameter> parameters { get; set; }
this stores values in listbox. inside parameters theres 2 properties , overridden tostring
public string key { get; set; } public string value { get; set; } public override string tostring() { return key + "=" + value; }
i have tried soo many different solutions have tried on web none of them work. may because new of , have been thrown in deep end (seems common problem me) sort out can move on.
Comments
Post a Comment