Can you have a dropdown menu where you can make your choice in the add new row of a webdatagrid. If so please guide me on best solution. I am using C# and ASP.Net 3.0.
Kind Regards.
Brid
Can you provide the sample coe as I also have similar requirement
webscriptmanger issue is solved by including namspace "Infragistics.Web.UI" but still "+" button is not active, when i click over "+" nither it fire client side event not even refresh page,following are my code.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebDataGrid.WebForm1"%>
<%@ Register Assembly="Infragistics4.Web.v12.2, Version=12.2.20122.1007, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"Namespace="Infragistics.Web.UI.GridControls" TagPrefix="ig"%>
<%@ Register Assembly="Infragistics4.Web.v12.2, Version=12.2.20122.1007, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"Namespace="Infragistics.Web.UI" TagPrefix="ig"
%>
<!
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></title
>
</
head
body
<form id="form1" runat
<div
<ig:WebScriptManager ID="WebScriptManager1" runat="server"
</ig:WebScriptManager
<ig:WebDataGrid ID="WebDataGrid1" runat="server" Width="400px"
AutoGenerateColumns="False" DataSourceID
="SqlDataSourceProducts">
<Columns
<ig:BoundDataField DataFieldName="ProductID" Key
="ProductID">
<Header Text="ProductID"
/>
</ig:BoundDataField
<ig:BoundDataField DataFieldName="ProductName" Key
="ProductName">
<Header Text="ProductName"
<ig:BoundDataField DataFieldName="CategoryID" Key
="CategoryID">
<Header Text="CategoryID"
</Columns
<EditorProviders
<ig:DropDownProvider ID
="WebDataGrid1_DropDownProvider1">
<EditorControl DropDownContainerMaxHeight="200px" EnableAnimations="False"
EnableDropDownAsChild="False" DataSourceID="SqlDataSourceCategories" DataKeyFields="CategoryID" TextField="CategoryName" ValueField
</EditorControl
</ig:DropDownProvider
</EditorProviders
<Behaviors
<ig:EditingCore AutoCRUD="false" Enabled
="true">
<ig:RowAdding Enabled="true" Alignment="Bottom"
<ColumnSettings
<ig:RowAddingColumnSetting ColumnKey="CategoryID"
EditorID="WebDataGrid1_DropDownProvider1"
</ColumnSettings
</ig:RowAdding
<ig:RowDeleting
</Behaviors
</ig:EditingCore
<ig:Selection CellClickAction="Row" RowSelectType
="Single">
</ig:Selection>
<ig:RowSelectors
</ig:RowSelectors
</ig:WebDataGrid
<asp:SqlDataSource ID="SqlDataSourceProducts" runat="server"
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
DeleteCommand="DELETE FROM [Products] WHERE [ProductID] = @ProductID"
InsertCommand="INSERT INTO [Products] ([ProductName], [CategoryID]) VALUES (@ProductName, @CategoryID)"
SelectCommand="SELECT [ProductID], [ProductName], [CategoryID] FROM [Products]"
UpdateCommand
="UPDATE [Products] SET [ProductName] = @ProductName, [CategoryID] = @CategoryID WHERE [ProductID] = @ProductID">
<DeleteParameters
<asp:Parameter Name="ProductID" Type="Int32"
</DeleteParameters
<InsertParameters
<asp:Parameter Name="ProductName" Type="String"
<asp:Parameter Name="CategoryID" Type="Int32"
</InsertParameters
<UpdateParameters
</UpdateParameters
</asp:SqlDataSource
</div
<asp:SqlDataSource ID="SqlDataSourceCategories" runat="server"
SelectCommand
="SELECT [CategoryID], [CategoryName] FROM [Categories]">
</form
html
Please look in this issue.
Hi Hristo,
I tried attached sample but it wont work, when i click on add button image,it wont add any row,add image is showing but it is not active. I am using infragestics 12.2 version dll
<%@ Register Assembly="Infragistics4.Web.v12.2, Version=12.2.20122.1007, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" amespace="Infragistics.Web.UI.GridControls" TagPrefix="ig" %>
Also WebScriptManager is throwing below exception "The type or namespace name 'WebScriptManager' does not exist in the namespace 'Infragistics.Web.UI.GridControls' (are you missing an assembly reference?)"
I commented webscriptmanger but it wont work.
Thanks,
Pankaj.
Thank you so much. It works great. Much obliged.
If I undestood correctly you need something like this:
if so you can download sample from my previous post.