Requirements |
|
Telerik Product and Version |
2017.1.118.40 Telerik.Web.UI |
Supported Browsers and Platforms |
Internet Explorer 11 |
Components/Widgets used (JS frameworks, etc.) |
PROJECT DESCRIPTION
I am new to Telerik. I have to create a RadGrid with Insert/Update/Delete functionality using onneeddatasource. the code is working to some extent, but I need that when Edit template is opened, there should be databound dropdowns rather than textboxes. Similarly functionality for insert.
<%@ PageLanguage="C#"AutoEventWireup="true"CodeBehind="ReviewerMaintenance.aspx.cs"
Inherits="textXslt.ReviewerMaintenance"%>
<%@ RegisterAssembly="Telerik.Web.UI"Namespace="Telerik.Web.UI"TagPrefix="telerik"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD
XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Reviewer Maintenance</title>
</head>
<body>
<form id="form1" runat="server">
<telerik:RadAjaxManager ID="RadAjaxManager1"runat="server">
</telerik:RadAjaxManager>
<telerik:RadScriptManager ID="RadScriptManager1"runat="server">
</telerik:RadScriptManager>
<div>
<div>
<telerik:RadGrid ID="RadGrid1"runat="server"AllowFilteringByColumn="True"AllowPaging="True"
AllowSorting="True"AutoGenerateColumns="False"OnNeedDataSource="radGrid_NeedDataSource"
Width="97%"OnDeleteCommand="RadGrid1_DeleteCommand"OnInsertCommand="RadGrid1_InsertCommand"
OnUpdateCommand="RadGrid1_UpdateCommand"EnableAJAX="True"ShowGroupPanel="True"
Skin="Bootstrap">
<PagerStyleMode="NextPrevAndNumeric"></PagerStyle>
<GroupingSettingsCollapseAllTooltip="Collapse
all groups"></GroupingSettings>
<ClientSettingsAllowDragToGroup="True">
<ScrollingAllowScroll="True"UseStaticHeaders="True"/>
</ClientSettings>
<MasterTableViewAutoGenerateColumns="False"DataKeyNames="AccessID"Width="100%"
CommandItemDisplay="Top">
<Columns>
<telerik:GridButtonColumn CommandName="Delete"Text="Delete"UniqueName="Delete">
</telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="AccessID" DataType="System.Int32" FilterControlAltText="Filter AccessID column"
HeaderText="Access
ID" ReadOnly="True"SortExpression="AccessID"UniqueName="AccessID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FirstName"FilterControlAltText="Filter
FirstName column"
HeaderText="First
Name" ReadOnly="True" SortExpression="FirstName" UniqueName="FirstName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="LastName"FilterControlAltText="Filter
LastName column"
HeaderText="Last
Name" ReadOnly="True" SortExpression="LastName" UniqueName="LastName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FormName"FilterControlAltText="Filter
FormName column"
HeaderText="Form
Name" SortExpression="FormName" UniqueName="FormName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ContactType"FilterControlAltText="Filter
ContactType column"
HeaderText="Contact
Type" SortExpression="ContactType" UniqueName="ContactType">
</telerik:GridBoundColumn>
<telerik:GridEditCommandColumn>
</telerik:GridEditCommandColumn>
</Columns>
<EditFormSettingsColumnNumber="2"CaptionFormatString="Edit
details for Access ID {0}"
CaptionDataField="AccessID">
<FormTableItemStyle Wrap="False"></FormTableItemStyle>
<FormCaptionStyle CssClass="EditFormHeader"></FormCaptionStyle>
<FormMainTableStyle CellSpacing="0"CellPadding="3"Width="100%"/>
<FormTableStyle GridLines="Horizontal"CellSpacing="0"CellPadding="2"CssClass="module"
Height="110px"Width="50%"/>
<FormTableAlternatingItemStyleWrap="False"></FormTableAlternatingItemStyle>
<FormStyle Width="50%" BackColor="#EEF2EA"></FormStyle>
<EditColumn UpdateText="Update
record" UniqueName="EditCommandColumn1" CancelText="Cancel
edit">
</EditColumn>
<FormTableButtonRowStyle HorizontalAlign="Right"CssClass="EditFormButtonRow"></FormTableButtonRowStyle>
</EditFormSettings>
<ExpandCollapseColumnVisible="False">
<HeaderStyle Width="19px"></HeaderStyle>
</ExpandCollapseColumn>
<RowIndicatorColumnVisible="False">
<HeaderStyle Width="20px"/>
</RowIndicatorColumn>
</MasterTableView>
</telerik:RadGrid>
</div>
</div>
</form>
</body>
</html>