Hi,
Adding rows to a WebDataGrid using javascript does not work. This is my code:
var
grid = $find("<%= WebDataGrid1.ClientID %>");
grid.get_rows().add([education.Id, education.StartedDate, education.EndedDate, education.Degree, education.EducationCenter]);
// Grid
<ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="350px" Width="500px" AutoGenerateColumns="False" EnableTheming="true" StyleSetPath="~/styles/" EnableDataViewState="true" EnableAjax="true"> <Columns> <ig:BoundDataField DataFieldName="Id" Key="Id" Hidden="true"> <Header Text="Id" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="StartedDate" Key="StartedDate"> <Header Text="Fra" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="EndedDate" Key="EndDate"> <Header Text="Til" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="Degree" Key="Degree"> <Header Text="Utdanning / Tittel" /> </ig:BoundDataField> <ig:BoundDataField DataFieldName="EducationCenter" Key="EducationCenter"> <Header Text="Utdanningssted" /> </ig:BoundDataField> </Columns> <Behaviors> <ig:Activation Enabled="true" /> <ig:Selection RowSelectType="Single" CellClickAction="Row" CellSelectType="None" Enabled="true" SelectedRowSelectorCssClass="igg_SelectedRowSelector" /> <ig:RowSelectors Enabled="false" /> <ig:EditingCore Enabled="true" AutoCRUD="false"> <Behaviors> <ig:RowAdding Enabled="true" /> <ig:RowDeleting /> <ig:CellEditing /> </Behaviors> </ig:EditingCore> </Behaviors> </ig:WebDataGrid>
Does adding rows to a WebDataGrid acually work? ThanksThis is my version info:
Assembly
="Infragistics35.Web.v9.2, Version=9.2.20092.1003, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Thanks
I figured this out...the problem was that EditingCore.AutoCRUD was set to false, because I had used a SqlDataSource to load the data previously.