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

[Solved] Need to hide Add new And Refresh Button

2 Answers 86 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
vishal
Top achievements
Rank 1
vishal asked on 11 Dec 2010, 09:38 AM
Hi
I am using Radgrid control, There i can see add new record and refresh button on it, I need to hide those buttons .I have tried so many things is there any property to hide this panels.

Thanks
Vishal

2 Answers, 1 is accepted

Sort by
0
evo
Top achievements
Rank 1
answered on 24 Feb 2011, 01:08 AM

Hi Vishal,

Its realtively easy to hide the buttons in the Command Template. Here are two ways that I've achived it:

(1) Add your own Command Template section to the Master Table view and simply leave the section blank.

Like below:

<MasterTableView 
    datakeynames="Idxxx" 
    datasourceid="datListValues" 
    CommandItemDisplay="Top" 
    EditMode="InPlace"
    ItemStyle-VerticalAlign="Top"             
    AlternatingItemStyle-VerticalAlign="Top">
  
 /// This is the line of code I'm talking about
    <CommandItemTemplate>
       
    </CommandItemTemplate>
 ///
  
    <Columns>
        <telerik:GridBoundColumn DataField="xxxTitle" HeaderText="XXX" 
            UniqueName="column1"/>    
   </Columns>
</MasterTableView >
  
       

with this approach you can add your own buttons or links at a later stage when it becomes necessary

OR

(2) Just take out the CommandItemDisplay attribute from the Master table view element.
Like below:

<MasterTableView 
    datakeynames="Idxxx" 
    datasourceid="datListValues" 
  
    CommandItemDisplay="Top"   <--- Remove this attribute
  
    EditMode="InPlace"
    ItemStyle-VerticalAlign="Top"             
    AlternatingItemStyle-VerticalAlign="Top">

Hope this helps.

evoMan


0
evo
Top achievements
Rank 1
answered on 24 Feb 2011, 01:09 AM

Hi Vishal,

Its realtively easy to hide the buttons in the Command Template. Here are two ways that I've achived it:

(1) Add your own Command Template section to the Master Table view and simply leave the section blank.

Like below:

<MasterTableView 
    datakeynames="Idxxx" 
    datasourceid="datListValues" 
    CommandItemDisplay="Top" 
    EditMode="InPlace"
    ItemStyle-VerticalAlign="Top"             
    AlternatingItemStyle-VerticalAlign="Top">
  
 /// This is the line of code I'm talking about
    <CommandItemTemplate>
       
    </CommandItemTemplate>
 ///
  
    <Columns>
        <telerik:GridBoundColumn DataField="xxxTitle" HeaderText="XXX" 
            UniqueName="column1"/>    
   </Columns>
</MasterTableView >
  
       

with this approach you can add your own buttons or links at a later stage when it becomes necessary

OR

(2) Just take out the CommandItemDisplay attribute from the Master table view element.
Like below:

<MasterTableView 
    datakeynames="Idxxx" 
    datasourceid="datListValues" 
  
    CommandItemDisplay="Top"   <--- Remove this attribute
  
    EditMode="InPlace"
    ItemStyle-VerticalAlign="Top"             
    AlternatingItemStyle-VerticalAlign="Top">

Hope this helps.

evoMan


Tags
Grid
Asked by
vishal
Top achievements
Rank 1
Answers by
evo
Top achievements
Rank 1
Share this question
or