xmldatasource

Master/Details view with XmlDataSources

丶灬走出姿态 提交于 2019-12-11 17:19:34
问题 I have a basic test web form with a DataList and a DetailsView and two XmlDataSource components for each of them. The binding of the DataList to the underlying XML document was easy to set up, but I'm struggling with getting the DetailsView hooked up. The idea is that there is a master/details relationship between the two bindable controls, so I guess I should hook onto the OnSelectedItemIndexChanged on the DataList to do the binding of the currently selected item in the DetailsView. But what

Xpath within ItemDataBound for Repeater

喜你入骨 提交于 2019-12-10 21:53:39
问题 Okay so I'm pulling in an XML feed from feedburner, using an XMLDataSource and a repeater. <asp:Repeater ID="rptrEvents" OnItemDataBound="rptrEvents_ItemDataBound" DataSourceID="XmlDataSource1" runat="server"> <ItemTemplate> <li runat="server" id="liLineItem"> <a href="<%#XPath("link")%>"> <span><%#XPath("pubdate")%></span> <%#XPath("title")%> </a> </li> </ItemTemplate> </asp:Repeater> Now the problem I'm running into is, "pubdate" is empty, and title includes both the title and date [though

JasperReports: JRDataSource.subDataSource shows undefined

▼魔方 西西 提交于 2019-12-08 03:43:36
问题 I am following this tutorial to create my reports using iReport . I have already created a couple of reports using the guidelines mentioned. But in a new report, when I set the DataSource of the ListComponent Jasper reports the following error to me: The method subDataSource(String) is undefined for the type JRDataSource value = ((net.sf.jasperreports.engine.JRDataSource)parameter_REPORT_DATA_SOURCE.getValue()).subDataSource("/items/invoices"); //$JR_EXPR_ID=11$ I tried to look up in the docs

Really simple XLS from XML datasource - Jasper

孤街醉人 提交于 2019-12-06 14:13:00
问题 I have a very simple XML datasource structured like this: <datasource> <row> <column>Some text 1</column> <column>Some text 2</column> <column>Some text 3</column> </row> <row> <column>Some text 4</column> <column>Some text 5</column> <column>Some text 6</column> </row> <row> <column>Some text 7</column> <column>Some text 8</column> <column>Some text 9</column> </row> </datasource> And I want to create a very simple XLS report formatted like this: ------------------------------------------- |

Load XML Data (Key/Value Pairs) into Data Structure

醉酒当歌 提交于 2019-12-03 21:44:12
I have an XML Data Source which contains a list of key/value pairs. I'm looking for a simple way to load the same data into an array or some other data structure so that I can easily look up the data. I can bind it to a GridView with a couple of clicks but I'm failing to find a straightforward way to load it into something that isn't a UI Control. My data source looks like: <SiteMap> <Sections> <Section Folder="TradeVolumes" TabIndex="1" /> <Section Folder="TradeBreaks" TabIndex="2" /> </Sections> </SiteMap> I'm wanting to load key value pairs (Folder, TabIndex) What is the best way to load

How to programmatically set SelectedValue of Dropdownlist when it is bound to XmlDataSource

℡╲_俬逩灬. 提交于 2019-11-29 05:29:36
I'm using XmlDataSource as the datasource for a dropdownlist . Now I want to set the SelectedValue of the drop down when the page initially loads. I have tried the OnDataBound event of the drop down in which I could see the total items. But setting the SelectedValue didn't work. In OnDataBinding event, I couldn't even see the total items probably because the list isn't bound yet? How can I set the selected index based on a value? This seems to work for me. protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { DropDownList1.DataBind(); // get the data into the list you

How to programmatically set SelectedValue of Dropdownlist when it is bound to XmlDataSource

主宰稳场 提交于 2019-11-27 23:03:05
问题 I'm using XmlDataSource as the datasource for a dropdownlist . Now I want to set the SelectedValue of the drop down when the page initially loads. I have tried the OnDataBound event of the drop down in which I could see the total items. But setting the SelectedValue didn't work. In OnDataBinding event, I couldn't even see the total items probably because the list isn't bound yet? How can I set the selected index based on a value? 回答1: This seems to work for me. protected void Page_Load(object