This is a migrated thread and some comments may be shown as answers.

RadGrid1.MasterTableView.GetColumn("orderno").Visible = true Problem

2 Answers 71 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mohamed
Top achievements
Rank 1
mohamed asked on 21 Oct 2011, 01:21 PM


If the OrderOption changed  radgrid _prerebder is fired butVisible = true; Columns are not showing



if (OrderOption == "Order Pending")
            {
                foreach (GridDataItem item in RadGrid1.MasterTableView.GetItems(GridItemType.Item))
                {
                    RadGrid1.MasterTableView.GetColumn("orderno").Visible = false;
                    RadGrid1.MasterTableView.GetColumn("orderdate").Visible = false;
                    RadGrid1.MasterTableView.GetColumn("quotationno5").Visible = true;
                }
            }
else if (OrderOption == "Order Generated")
            {
                foreach (GridDataItem item in RadGrid1.MasterTableView.GetItems(GridItemType.Item))
                {
                    RadGrid1.MasterTableView.GetColumn("orderno").Visible = true;
                    RadGrid1.MasterTableView.GetColumn("orderdate").Visible = true;
                    RadGrid1.MasterTableView.GetColumn("quotationno5").Visible = false;
                }
            }


Thanks,
Mohamed.

2 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 21 Oct 2011, 01:52 PM
Hello,

<telerik:GridBoundColumn DataField="ID" HeaderText="ID" UniqueName="ID">
                    </telerik:GridBoundColumn>

 void RadGrid1_PreRender(object sender, EventArgs e)
    {
        RadGrid1.MasterTableView.GetColumn("ID").Visible = false;
    }

let me know if any concern.

Thanks,
Jayesh Goyani
0
mohamed
Top achievements
Rank 1
answered on 21 Oct 2011, 02:43 PM
Thanks For Ur reply Jayesh Goyani ,

Problem Resolved


Thanks,
Mohamed.
Tags
Grid
Asked by
mohamed
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
mohamed
Top achievements
Rank 1
Share this question
or