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

Hide/show the 'Ad d New Item' button on gird from serverside

1 Answer 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hrushikesh Mokashi
Top achievements
Rank 1
Hrushikesh Mokashi asked on 28 Jan 2009, 10:23 AM
Hi All,

I am using RadGrid with inline insert/update/delete .
I have 'Save' button on page.

In design mode i have set the grid 'RadGrid.MasterTableView.CommandItemDisplay ' property as 'None'
On page load i have hide the 'Add New Item' button on grid. By using following code segment.
RadGrid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.None

On 'Save' button click , i have set the code to show the button on top of the grid,

    RadGrid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top


Issue:
On page load it hides the 'Add new Item' button of grid.
But on 'Save' button click it is not showing the 'Add New Item' button on grid.

Please hlep me.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 28 Jan 2009, 11:38 AM
Hello Hrushikesh,

Try adding the Rebind method on the button click event as shown below:
cs:
 protected void SaveButton_Click(object sender, EventArgs e) 
    { 
        RadGrid.MasterTableView.CommandItemDisplay = GridCommandItemDisplay.Top; 
        RadGrid.Rebind(); 
    } 

Thanks
Princy.
Tags
General Discussions
Asked by
Hrushikesh Mokashi
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or