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

Command Item Line not visible?

4 Answers 189 Views
Grid
This is a migrated thread and some comments may be shown as answers.
DaveBarkshire
Top achievements
Rank 1
DaveBarkshire asked on 05 Jul 2012, 03:00 PM
I have a working radgrid and would like the command line to appear so that I can add some buttons to it. However, I can't make the line visible. Any ideas?

<

 

telerik:RadGrid ID="rgdGrid" runat="server" AutoGenerateColumns="False" Culture="en-GB"

 

 

ShowStatusBar="True" ShowFooter="False" OnUpdateCommand="rgdGrid_UpdateCommand"

 

 

OnEditCommand="rgdGrid_EditCommand"

 

 

OnItemDataBound="rgdGrid_ItemDataBound" OnCancelCommand="rgdGrid_CancelCommand"

 

 

AllowSorting="True" GroupingEnabled="False" OnSortCommand="rgdGrid_SortCommand"

 

 

Width="100%" ShowGroupPanel="True" Skin="Web20"

 

 

MasterTableView-CellPadding="0" MasterTableView-CellSpacing="0" CellPadding="0" >

 

 

<MasterTableView EnableHeaderContextMenu="true" EditMode="InPlace"

 

 

ItemStyle-Wrap="False" CommandItemDisplay="Top" >

 

 

<CommandItemSettings ExportToPdfText="Export to PDF" ShowExportToExcelButton="true" ShowExportToWordButton="true" />

 

<

 

CommandItemTemplate>

 

 

<asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" />

 

 

<asp:LinkButton ID="btnUpdateSelected" runat="server" CommandName="UpdateSelected" />

 

 

</CommandItemTemplate>

 



4 Answers, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 05 Jul 2012, 05:59 PM
Hello,

You are able to display any of one commanditemtemplate at a time.

<CommandItemSettings ExportToPdfText="Export to PDF" ShowExportToExcelButton="true" ShowExportToWordButton="true" />
OR
<
 
  
 
CommandItemTemplate>
 
  
 
  
 
<asp:LinkButton ID="btnEditSelected" runat="server" CommandName="EditSelected" />
 
  
 
  
 
<asp:LinkButton ID="btnUpdateSelected" runat="server" CommandName="UpdateSelected" />
 
  
 
  
 
</CommandItemTemplate>


Thanks,
Jayesh Goyani
0
Jayesh Goyani
Top achievements
Rank 2
answered on 05 Jul 2012, 06:00 PM
Hello,

You code must be as ...............
<MasterTableView EnableHeaderContextMenu="true" EditMode="InPlace" ItemStyle-Wrap="False"
               CommandItemDisplay="Top">
               <CommandItemTemplate>
               <asp:LinkButton ID="LinkButton1" Text="a"  runat="server" CommandName="ExportToPdf" />
               <asp:LinkButton ID="LinkButton2" Text="b" runat="server" CommandName="ExportToExcel" />
               <asp:LinkButton ID="LinkButton3" Text="c" runat="server" CommandName="ExportToWord" />
               <asp:LinkButton ID="btnEditSelected" Text="d" runat="server" CommandName="EditSelected" />
               <asp:LinkButton ID="btnUpdateSelected" Text="e"  runat="server" CommandName="UpdateSelected" />
               </CommandItemTemplate>


Thanks,
Jayesh Goyani
0
Shinu
Top achievements
Rank 2
answered on 06 Jul 2012, 05:02 AM
Hi,

Since you are using CommandItemTemplate, try setting the Text Property of the LinkButton to show the command line.

ASPX:
<MasterTableView EnableHeaderContextMenu="true" EditMode="InPlace" ItemStyle-Wrap="False" CommandItemDisplay="Top">
    <CommandItemTemplate>
        <asp:LinkButton ID="btnEditSelected" Text="Edit" runat="server" CommandName="EditSelected" />
        <asp:LinkButton ID="btnUpdateSelected" Text="Update" runat="server" CommandName="UpdateSelected" />
    </CommandItemTemplate>
. . .

Thanks,
Shinu.
0
DaveBarkshire
Top achievements
Rank 1
answered on 06 Jul 2012, 02:41 PM
Many thanks to you both. I think that by having two tags to describe the command line confused the grid. I can now see the command line.
Tags
Grid
Asked by
DaveBarkshire
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Shinu
Top achievements
Rank 2
DaveBarkshire
Top achievements
Rank 1
Share this question
or