Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox Resize Automatically
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01454537
Message ID:
01454574
Views:
20
>>>I have a listbox in a table on my page. When I run the app, the listbox is sized to fit the 3 items in the list, not the size I created it
>>>in design time.
>>>
>>>What's the deal here?
>>
>>How did you size it? If you set Rows=3 then it should work......
>
>I didn't do anything with Rows. This is all I have done with the listbox:
>
>
>private void _LoadList()
>{
>    DataLayer.ProviderInvariantName = "System.Data.SqlClient";
>    DataLayer.ConnectionString = ConfigurationManager.ConnectionStrings["ApexGlobalConnectionString"].ConnectionString;
>
>    dsRoles = DataLayer.ExecuteQuery("as_GetRole", CommandType.StoredProcedure);
>
>    lstRoles.DataSource = dsRoles.Tables[0];
>    lstRoles.DataTextField = "RoleName";
>    lstRoles.DataBind();
>}
>
>
>
>When I run it, it's height is much smaller than in design time.

I thought you said you set it at design time ? Anyway:
lstRoles.Rows = dsRoles.Tables[0].Rows.Count;
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform