I found a document online that tells me:
...
The reason for this error is that your grid instance can not bind a value for the newly inserted item through the Eval()/Bind() syntax you hard-coded (as you may have seen from the stack trace of the error).
This problem can be fixed in the following ways:
...
Here is the code I have in my NestedViewTemplate:
<asp:DropDownList ID="cboLanguage" runat="server" DataSourceID="dsLanguage" DataTextField="Text"
DataValueField="value" SelectedValue='<%# Bind("LanguageID") %>' AppendDataBoundItems="True" >
<asp:ListItem Value="-1">Please Select</asp:ListItem>
</asp:DropDownList>
<asp:ObjectDataSource ID="dsLanguage" runat="server" SelectMethod="FetchEntries"
TypeName="BenemTech.SHSR_DonorMgmt.DAO.ListDAO">
<SelectParameters>
<asp:Parameter DefaultValue="Language" Name="GroupName" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
So the problem described makes a little sense, but I have no idea how to do what the document suggests.
I am using VS 2010 and simply can't find this InitInsertCommandName method or property or event
Can somebody please post simple code that would go in this event (once I find it) to make this work?
Thanks in advance.
I am willing to try this (not sure why it matters though) but
RadEditor1.ExportToRtf()
string
script = " var oExplorer = $find('" + RadFileExplorer1.ClientID + "');" +
" oExplorer.set_currentDirectory('" + dir + "');" +
" oExplorer.refresh();";
<ResourceHeaderTemplate>
<asp:Panel ID="ResourceWrapper" runat="server" CssClass="ResCustomClass">
<asp:Table ID="ResourceTable" runat="server" Width="200px">
<asp:TableRow Width="200px">
<asp:TableCell Width="95px" HorizontalAlign="Right">
<asp:Label ID="LGroup" Font-Bold="true" runat="server" Text='<%# Eval("resgroup") %>'></asp:Label>
</asp:TableCell>
<asp:TableCell HorizontalAlign="Center" Width="10px">
<asp:Label ID="LSpacer" runat="server" Text="|"></asp:Label>
</asp:TableCell>
<asp:TableCell Width="95px" HorizontalAlign="Right">
<asp:Label ID="SpeakerImage" runat="server" Text='<%# Eval("Text") %>'></asp:Label>
</asp:TableCell>
</asp:TableRow>
</asp:Table>
</asp:Panel>
</ResourceHeaderTemplate>
Hi,
I am using this link for your example for chart to embed RadChart instances in template column of RadGrid.
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandchart/chartingrid/defaultvb.aspx?product=chart
I am using VS 2010 and ADO.net entity data model and EntityDatasource instead of sqldatasource, the issue is chart is not being rendered for all roows except the last one.. I am getting an error at the statement chart.DataSource = SqlDataSource2.Select(DataSourceSelectArguments.Empty) 'Value of type system.web.ui.DataSourceSelectArguments cannot be converted to integer.
What i use is chart.DataSource = EntitylDataSource2.Select(DataSourceSelectArguments.Empty).
The chart for the last row of the grid is displayed only, can you please advise? Please see the result attached when I use
EntityDataSource2.WhereParameters(0).DefaultValue = item.GetDataKeyValue("Entity1").ToString()
chart.DataSourceID = "EntityDataSource2"
Commented out
'chart.DataSource = EntityDataSource2.Select(DataSourceSelectArguments.Empty)
Here is my definition of EntityDataSource2
<
asp:EntityDataSource
ID
=
"EntityDataSource2"
runat
=
"server"
ConnectionString
=
"name=TEntities"
DefaultContainerName
=
"TEntities"
EnableFlattening
=
"False"
EntitySetName
=
"Entities"
Select
=
"it.[Entity1], it.[Type], it.[Entity_Desc], it.[Active], it.[Cnt], it.[Dataupdtthru]"
EntityTypeFilter
=
""
OrderBy
=
"it.[Entity1]"
Where
=
"it.[Entity1] = @Entity"
>
<
WhereParameters
>
<
asp:Parameter
DbType
=
"string"
Name
=
"Entity"
/>
</
WhereParameters
>
</
asp:EntityDataSource
>