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

InsertForm doesn't display the Default Insert Button

2 Answers 88 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kai
Top achievements
Rank 1
Kai asked on 21 Apr 2009, 03:00 PM
Hi,

I have the problem, that the automatic generated InsertForm doesn't display the Default Insert-Button. The Cancel-Button works fine. 

I tried this:
<EditFormSettings> 
    <EditColumn CurrentFilterFunction="NoFilter" FilterListOptions="VaryByDataType" UniqueName="EditCommandColumn1"  
InsertImageUrl="../../Skins/Default/Grid/Edit.gif" /> 
</EditFormSettings> 
Doesn't work.

My settings:
    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" AllowAutomaticDeletes="True" 
        AllowAutomaticInserts="True" AllowAutomaticUpdates="True" DataSourceID="SqlDataSource1" 
        GridLines="None" BackColor="Gray" Font-Bold="False" Font-Italic="False" Font-Overline="False" 
        Font-Strikeout="False" Font-Underline="False" HeaderStyle-BackColor="Beige" ShowHeader="true" 
        AllowPaging="True" PageSize="10" Width="80%" BorderWidth="0px" ShowStatusBar="true" 
        AllowSorting="True"
        <PagerStyle Mode="NumericPages"></PagerStyle> 
        <MasterTableView CommandItemDisplay="Bottom" DataSourceID="SqlDataSource1" HorizontalAlign="NotSet" 
            DataKeyNames="ID" CurrentResetPageIndexAction="SetPageIndexToFirst" Dir="LTR" 
            Frame="Border" TableLayout="Auto" Font-Bold="False" Font-Italic="False" Font-Overline="False" 
            Font-Strikeout="False" Font-Underline="False" BackColor="#dcdcdc" EditMode="InPlace" 
            AllowMultiColumnSorting="True" AutoGenerateColumns="false"
 
... 
 
        </MasterTableView> 

Hope somebody can help me with this issue.

Regards

Kai


2 Answers, 1 is accepted

Sort by
0
illumination
Top achievements
Rank 2
answered on 21 Apr 2009, 07:08 PM
                <EditFormSettings EditFormType="Template" > 
                <FormTemplate> 
                    <table> 
                        <tr> 
                            <td align="right" colspan="2">  
                                 <asp:Button ID="Button1" Text='<%# Iif (TypeOf Container is GridEditFormInsertItem, "Insert", "Update") %>' 
                                     runat="server" CommandName='<%# Iif (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>' Font-Size="11px">  
                                 </asp:Button>&nbsp;  
                                 <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" Font-Size="11px">  
                                 </asp:Button> 
                            </td> 
                        </tr> 
                    </table> 
                </FormTemplate> 
            </EditFormSettings> 

How about this one?
0
Princy
Top achievements
Rank 2
answered on 27 Apr 2009, 06:58 AM
Hello Kai,

Since you are using Inplace EditMode try setting the InsertImageUrl for the GridEditCommandColumn as shown below:
aspx:
  <telerik:GridEditCommandColumn UniqueName="Edit" ButtonType="ImageButton" InsertImageUrl="images(1)/Edit.gif" >        
  </telerik:GridEditCommandColumn> 
Note: Also set the ButtonType to ImageButton.

Thanks
Princy.
Tags
Grid
Asked by
Kai
Top achievements
Rank 1
Answers by
illumination
Top achievements
Rank 2
Princy
Top achievements
Rank 2
Share this question
or