Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox Resize Automatically
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01454537
Message ID:
01454574
Vues:
21
>>>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;
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform