四度空间

专注.NET、SharePoint

DevExpress ASPxComboBox lost selected item after postback

<dx:ASPxComboBox ID="cbxSname" ClientInstanceName="cbxSname" Font-Names="微软雅黑" Font-Size="12px"
                                        runat="server" EnableCallbackMode="true" CallbackPageSize="20" Width="170px"
                                        IncrementalFilteringMode="Contains" ValueType="System.Int32" ValueField="Gong_sid"
                                        OnItemsRequestedByFilterCondition="cbxSname_OnItemsRequestedByFilterCondition"
                                        OnItemRequestedByValue="cbxSname_OnItemRequestedByValue" TextFormatString="{0}"
                                        DropDownStyle="DropDown" MaxLength="100">
                                        <Columns>
                                            <dx:ListBoxColumn FieldName="Gong_smch" Caption=" " Width="50px" />
                                        </Columns>
                                    </dx:ASPxComboBox>
Code is above. When you use this, make sure the value field type match the attribute ValueType which means if you have an int primary key value field, then set the ValueType to System.Int32. Or you will meet this issue.

posted on 2013-07-09 15:21  月飘冥  阅读(195)  评论(0编辑  收藏  举报

导航