Ejemplo n.º 1
0
        protected void ddListBaseitemSort_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
        {
            RadioButtonList rbl = RadListViewBaseItems.FindControl("rblBaseitemSort") as RadioButtonList;

            switch (e.Value)
            {
            case "BaseItemId":
                RadListViewBaseItems.Items[0].FireCommandEvent(RadListView.SortCommandName, "BaseItemId");
                rbl.SelectedIndex = 0;
                break;

            case "BaseItemCode":
                RadListViewBaseItems.Items[0].FireCommandEvent(RadListView.SortCommandName, "BaseItemCode");
                rbl.SelectedIndex = 0;
                break;

            case "CategoryName":
                RadListViewBaseItems.Items[0].FireCommandEvent(RadListView.SortCommandName, "CategoryName");
                rbl.SelectedIndex = 0;
                break;

            case "ClearSort":
                RadListViewBaseItems.SortExpressions.Clear();
                RadListViewBaseItems.Rebind();
                rbl.SelectedIndex = 0;
                break;

            default:
                break;
            }
        }
Ejemplo n.º 2
0
        protected void rblBaseitemSort_SelectedIndexChanged(object sender, EventArgs e)
        {
            RadioButtonList rbl   = sender as RadioButtonList;
            RadComboBox     combo = RadListViewBaseItems.FindControl("ddListBaseitemSort") as RadComboBox;

            if (combo != null && (combo.SelectedItem.Value != String.Empty && combo.SelectedItem.Value != "ClearSort"))
            {
                switch (rbl.SelectedValue)
                {
                case "ASC":
                    RadListViewBaseItems.Items[0].FireCommandEvent(RadListView.SortCommandName, combo.SelectedValue + " ASC");
                    break;

                case "DESC":
                    RadListViewBaseItems.Items[0].FireCommandEvent(RadListView.SortCommandName, combo.SelectedValue + " DESC");
                    break;

                default:
                    break;
                }
            }
        }