By default, the width of a picker is 58px. In this topic, we will expand the width of a picker to 200px in Design view, in Source view, and in code.
In Design View
Complete the following steps:
1. Add a C1PickerView control and a ScriptManager control to your ASP.NET Ajax-Enabled Web project.
2.
Click C1PickerView's
smart tag () to open the C1PickerView
Tasks menu and then select C1PickerView Designer.
The C1PickerView Designer Form opens.
3. Click the Add Child Item drop-down arrow and select Picker to add it to the control.
C1Picker1 is added to the project.
4. In treeview, select C1Picker1 and set its Width property to "200".
5. Click OK to close the C1PickerView Designer Form.
In Source View
Complete the following steps:
1. Add a C1PickerView control and a ScriptManager control to your ASP.NET Ajax-Enabled Web project.
2. Click the Split tab to enter Split view.
3. In the Source view pane, enter the following markup between the <cc1:C1PickerView> and </cc1:C1PickerView> tags to create the picker:
<Pickers>
<cc1:C1Picker runat="server" ID="C1Picker01">
</cc1:C1Picker>
</Pickers>
4. Increase the width of the picker by adding Width="200px" to the <cc1:C1Picker> tag so that the markup resembles the following:
<cc3:C1Picker runat="server" PickerType="DependsOnItems" Width="200px">
5. Synchronize Design view with Source view and observe that the picker width has increased.
In Code
Complete the following steps:
1. Complete steps 1 – 3 under "Expanding the Picker Width in Source View".
2. Import the following namespaces:
Imports C1.Web.iPhone.C1PickerView
•C#
using C1.Web.iPhone.C1PickerView;
3. To set the picker width, enter Code view and add the following code to the Page_Load event:
C1PickerView1.Pickers(0).Width = 200
•C#
C1PickerView1.Pickers[0].Width = 200;
4. Open the project and observe that the picker width has increased.
This Topic
Illustrates the Following:
The following image shows a C1PickerView control with a picker width of 200 pixels: