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

[Solved] Insert button does not show in Add New Record mode in radgrid

0 Answers 264 Views
Grid
This is a migrated thread and some comments may be shown as answers.
m chotu
Top achievements
Rank 1
m chotu asked on 15 Jan 2010, 08:42 PM
Hi;

I have a radgrid with detail table added to it.  I have the CommandItemDisplay="Top" set for the detail table.  During run time, when I click on the add new record button, then the insert item template becomes visible.  Here, I only see the Cancel button but not the Insert button.  I have attached a screen shot of the missing insert button in my grid.  Here is my radgrid setup in the aspx page. 

Your help is really appreciated.

Thanks in advance,
MS

<

 

div style="padding-top:10px;">

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="viewGrid">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="viewGrid" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

<telerik:RadGrid ID="viewGrid" runat="server" ActiveItemStyle-BorderColor="ActiveBorder"

 

 

ShowStatusBar="True" AllowSorting="true" ItemStyle-BorderWidth="1px" OnSortCommand="viewGrid_Sort"

 

 

MasterTableView-ExpandCollapseColumn-CollapseImageUrl="~/App_Themes/Images/Content/collapse.gif"

 

 

MasterTableView-ExpandCollapseColumn-ButtonType="ImageButton" OnUpdateCommand="viewGrid_UpdateCommand"

 

 

MasterTableView-ExpandCollapseColumn-ExpandImageUrl="~/App_Themes/Images/Content/expand.gif"

 

 

MasterTableView-ExpandCollapseColumn-ItemStyle-HorizontalAlign="Center" OnItemCreated="viewGrid_ItemCreated"

 

 

MasterTableView-ExpandCollapseColumn-ItemStyle-VerticalAlign="Middle" OnItemDataBound="viewGrid_DataBound"

 

 

MasterTableView-ExpandCollapseColumn-ItemStyle-Width="2%" OnDetailTableDataBind="viewGrid_DetailTableDataBind"

 

 

OnNeedDataSource="viewGrid_NeedDataSource" OnPreRender="viewGrid_PreRender" AllowAutomaticUpdates="true"

 

 

OnInsertCommand="viewGrid_InsertCommand" AllowAutomaticInserts="true">

 

 

<MasterTableView AutoGenerateColumns="False" HierarchyLoadMode="ServerBind"

 

 

DataKeyNames="DomainName,ParentDomainValue" EditMode="InPlace" Name="Master" >

 

 

<DetailTables>

 

 

<telerik:GridTableView DataKeyNames="DomainName,ParentDomainName,ParentDomainValue" Name="DomainLabel"

 

 

AutoGenerateColumns="false" EditMode="InPlace" ItemStyle-BorderWidth="0px" AllowSorting="false"

 

 

ShowHeader="false" AllowAutomaticInserts="true" AllowAutomaticUpdates="true"

 

 

CommandItemDisplay="Top">

 

 

<ParentTableRelation>

 

 

<telerik:GridRelationFields DetailKeyField="DomainName" MasterKeyField="DomainName" />

 

 

</ParentTableRelation>

 

 

<CommandItemSettings RefreshText="Save Record" AddNewRecordText="Add a Domain Value" />

 

 

<Columns>

 

 

 

<telerik:GridBoundColumn UniqueName="DomainValue" DataType="System.String"

 

 

DataField="DomainValue" ColumnEditorID="GridTextBoxColumnEditor1">

 

 

<ItemStyle Width="10%" HorizontalAlign="Left" Wrap="false" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridCheckBoxColumn DataField="ActiveFlag" UniqueName="ActiveFlag"

 

 

DataType="System.Boolean" >

 

 

</telerik:GridCheckBoxColumn>

 

 

<telerik:GridCheckBoxColumn DataField="EditableFlag" UniqueName="EditFlag"

 

 

DataType="System.Boolean" Visible="false" >

 

 

</telerik:GridCheckBoxColumn>

 

 

<telerik:GridBoundColumn DataField="ParentDomainName" UniqueName="ParentDomainName"

 

 

DataType="System.String" Visible="false" >

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="ParentDomainValue" UniqueName="ParentDomainValue"

 

 

DataType="System.String" Visible="false" >

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridEditCommandColumn ButtonType="PushButton" EditText="Edit Domain Value" UpdateText="Update"

 

 

CancelText="Cancel" UniqueName="EditCommandColumn1">

 

 

<HeaderStyle Width="20px" />

 

 

</telerik:GridEditCommandColumn>

 

 

 

</Columns>

 

 

</telerik:GridTableView>

 

 

</DetailTables>

 

 

 

 

<Columns>

 

 

<telerik:GridBoundColumn UniqueName="DomainName" DataType="System.String" HeaderText="<%$ Resources:DomainAdmin, locDomainName %>"

 

 

DataField="DomainName" SortExpression="DomainName">

 

 

<HeaderStyle HorizontalAlign="Left" Width="10%" />

 

 

<ItemStyle Width="10%" HorizontalAlign="Left" Wrap="true" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn UniqueName="ParentDomainName" DataType="System.String"

 

 

HeaderText="<%$ Resources:DomainAdmin, locParentDomainName %>" DataField="ParentDomainName"

 

 

SortExpression="ParentDomainName">

 

 

<HeaderStyle HorizontalAlign="Left" Width="10%" />

 

 

<ItemStyle Width="10%" HorizontalAlign="Left" Wrap="true" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn UniqueName="ParentDomainValue" DataType="System.String" HeaderText="<%$ Resources:DomainAdmin, locParentDomainValue %>"

 

 

DataField="ParentDomainValue" SortExpression="ParentDomainValue">

 

 

<HeaderStyle HorizontalAlign="Left" Width="10%" />

 

 

<ItemStyle Width="10%" HorizontalAlign="Left" Wrap="true" />

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

<AlternatingItemStyle Wrap="false"/>

 

 

<ItemStyle Wrap="false"/>

 

 

<RowIndicatorColumn Visible="False">

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn ButtonType="ImageButton">

 

 

</ExpandCollapseColumn>

 

 

<EditFormSettings>

 

 

<PopUpSettings ScrollBars="None" />

 

 

</EditFormSettings>

 

 

 

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

 

</div>

 


No answers yet. Maybe you can help?

Tags
Grid
Asked by
m chotu
Top achievements
Rank 1
Share this question
or