Hello,
Can you please tell me how to make the items in the drop down list provider read only?
I want to prevent the user from editing the selected item as though it is a text box. I would think that would be default behavior - you want the user to pick an item but not edit them.
Thanks very much,
-Bill
There is a EditorControl property off the Provider. This will give you the underlying DropDown control. From there you have access to all properties including the DropDownDisplayStyle property which can be set to ReadOnly.
http://help.infragistics.com/NetAdvantage/ASPNET/2010.1/CLR3.5/?page=Infragistics35.Web.v10.1~Infragistics.Web.UI.ListControls.DropDownDisplayMode.html
We have version 9.2. I didn't find that property there. Is it available in 9.2?
That link shows how to set it programmatically. It is also available declaritively as well, right?
If so, is it a property of the <EditorControl />
Thanks,
Here is some sample markup. I believe it's the DisplayMode property on the editor provider. This code is from 9.2.
<ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="441px" Width="879px"
AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
style="margin-right: 0px">
<Columns>
<ig:BoundDataField DataFieldName="CustomerID" Key="CustomerID">
<Header Text="CustomerID" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="CompanyName" Key="CompanyName">
<Header Text="CompanyName" />
<ig:BoundDataField DataFieldName="ContactName" Key="ContactName">
<Header Text="ContactName" />
</Columns>
<Behaviors>
<ig:EditingCore>
<ig:CellEditing>
<ColumnSettings>
<ig:EditingColumnSetting ColumnKey="CustomerID"
EditorID="WebDataGrid1_DropDownProvider1" />
</ColumnSettings>
</ig:CellEditing>
</Behaviors>
</ig:EditingCore>
<EditorProviders>
<ig:DropDownProvider ID="WebDataGrid1_DropDownProvider1">
<EditorControl DisplayMode="ReadOnlyList" DropDownContainerMaxHeight="200px"
EnableAnimations="False" EnableCustomValues="False"
EnableDropDownAsChild="False">
</EditorControl>
</ig:DropDownProvider>
</EditorProviders>
</ig:WebDataGrid>
Great thanks!
I found that the "readonlylist" will not allow you to make a selection, but the DisplayMode="DropDownList" worked as desired (can make a selection but not edit the text).
Thanks for your help!