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

[Solved] Show Only Refresh Button in Grid.

2 Answers 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Thitima Srimongkhol
Top achievements
Rank 1
Thitima Srimongkhol asked on 21 Jan 2010, 10:47 AM
Radgrid use

CommandItemDisplay

="Top" ,It show AddNew and Refresh Button .
I would like show only refresh button. How it do?
Thanks
nuch
^_^

 

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 Jan 2010, 10:58 AM
Hello Thitima,

You can try out the following code to hide the AddNewRecord button in the Command Item:
cs:
 protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
 
        if (e.Item is GridCommandItem) 
        { 
            GridCommandItem cmdItem = (GridCommandItem)e.Item; 
           
            Button btn1 = (Button)cmdItem.FindControl("AddNewRecordButton"); 
            btn1.Visible = false
           
            LinkButton lnkbtn1 = (LinkButton)cmdItem.FindControl("InitInsertButton"); 
            lnkbtn1.Visible = false
        } 
  } 

Thanks
Princy.
0
Thitima Srimongkhol
Top achievements
Rank 1
answered on 22 Jan 2010, 08:42 AM
It's work. Thanks you.
^_^
Tags
Grid
Asked by
Thitima Srimongkhol
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Thitima Srimongkhol
Top achievements
Rank 1
Share this question
or