Click here to Skip to main content
15,913,939 members
Home / Discussions / C#
   

C#

 
AnswerRe: Disable TextBox cursor Pin
gauthee12-Feb-07 16:58
gauthee12-Feb-07 16:58 
AnswerRe: Disable TextBox cursor Pin
Luis Alonso Ramos12-Feb-07 17:42
Luis Alonso Ramos12-Feb-07 17:42 
GeneralRe: Disable TextBox cursor Pin
bankai12312-Feb-07 17:54
bankai12312-Feb-07 17:54 
Questionhow to fix a menustrip ? Pin
test12345012-Feb-07 13:53
test12345012-Feb-07 13:53 
AnswerRe: how to fix a menustrip ? Pin
ShermansLagoon12-Feb-07 23:16
ShermansLagoon12-Feb-07 23:16 
QuestionRe: how to fix a menustrip ? Pin
test12345013-Feb-07 2:46
test12345013-Feb-07 2:46 
AnswerRe: how to fix a menustrip ? Pin
ShermansLagoon13-Feb-07 7:13
ShermansLagoon13-Feb-07 7:13 
Question.NET 2.0 UserControl Adorners Override Please Help!! Pin
@FrankDrebin@12-Feb-07 12:56
@FrankDrebin@12-Feb-07 12:56 
QuestionHow to set node value in XMLDocument [modified] Pin
AndrusM12-Feb-07 12:51
AndrusM12-Feb-07 12:51 
AnswerRe: How to set node value in XMLDocument Pin
gauthee12-Feb-07 17:01
gauthee12-Feb-07 17:01 
GeneralRe: How to set node value in XMLDocument Pin
AndrusM13-Feb-07 1:50
AndrusM13-Feb-07 1:50 
GeneralRe: How to set node value in XMLDocument Pin
Stefan Troschuetz13-Feb-07 6:19
Stefan Troschuetz13-Feb-07 6:19 
GeneralRe: How to set node value in XMLDocument Pin
AndrusM13-Feb-07 8:48
AndrusM13-Feb-07 8:48 
GeneralRe: How to set node value in XMLDocument [modified] Pin
Stefan Troschuetz13-Feb-07 9:19
Stefan Troschuetz13-Feb-07 9:19 
GeneralRe: How to set node value in XMLDocument Pin
AndrusM14-Feb-07 6:18
AndrusM14-Feb-07 6:18 
GeneralRe: How to set node value in XMLDocument Pin
Stefan Troschuetz14-Feb-07 7:36
Stefan Troschuetz14-Feb-07 7:36 
GeneralRe: How to set node value in XMLDocument Pin
AndrusM14-Feb-07 9:23
AndrusM14-Feb-07 9:23 
Thank you. I tried it but
node.InnerText = "test";
still causes null reference exception.
Complete test case is in bottom of this message.

I think I must buy new notebook for VS development. Maybe this solves the issue. I'll try to find 7400 RPM disk and 1 GB RAM. Currently I have 5400 RPM disk. I have read somewhere that MS and Intel have made a contract. According to this MS releases new software every year which forces people to by new hardware.


using System.Xml;
class Program {
const string s = @"<?xml version='1.0' encoding='utf-8'?>
<Report xmlns='http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition'
xmlns:rd='http://schemas.microsoft.com/SQLServer/reporting/reportdesigner'>

<DataElementStyle>ElementNormal</DataElementStyle>
<RightMargin>0.25in</RightMargin>
<Body>
<ReportItems>
<List Name='list1'>
<DataInstanceName>Row</DataInstanceName>
<NoRows>Selliseid andmeid pole</NoRows>
<Style />
<DataSetName>Data</DataSetName>
<ReportItems>
<Textbox Name='Phone'>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<ZIndex>1</ZIndex>
<CanGrow>false</CanGrow>
<Value>=Fields!Kood.Value</Value>
<Left>1.5in</Left>
<Width>1in</Width>
<Height>14pt</Height>
</Textbox>
<Textbox Name='ContactName'>
<Style>
<PaddingLeft>2pt</PaddingLeft>
<PaddingBottom>2pt</PaddingBottom>
<PaddingTop>2pt</PaddingTop>
<PaddingRight>2pt</PaddingRight>
</Style>
<Width>1.5in</Width>
<Height>14pt</Height>
<CanGrow>false</CanGrow>
<Value>=Fields!Nimetus.Value</Value>
</Textbox>
</ReportItems>
</List>
</ReportItems>
<Style />
<Height>0.25in</Height>
<ColumnSpacing>0.25in</ColumnSpacing>
<Columns>1</Columns>
</Body>
<TopMargin>0.5in</TopMargin><DataSources>

<DataSource Name='DS1'>
<ConnectionProperties>
<DataProvider>PostgreSQL</DataProvider>
<ConnectString></ConnectString>
</ConnectionProperties>
</DataSource>
</DataSources>

<DataSets>
<DataSet Name='Data'>
<Query> <DataSourceName>DS1</DataSourceName>
<CommandText>SELECT * FROM nomenkla</CommandText>
</Query>
<Fields>
<Field Name='Nimetus'>
<DataField>nimetus</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name='Kood'>
<DataField>kood</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
</DataSet>
</DataSets>

<LeftMargin>0.25in</LeftMargin>
<BottomMargin>0.5in</BottomMargin>
<Width>2.5in</Width>
<PageHeader>
<Height>0pt</Height>
</PageHeader>
<PageFooter>
<Height>0pt</Height>
</PageFooter>

</Report>";


static void Main() {
GetDefaultReport(s);
}

static string GetDefaultReport(string s) {

XmlDocument xmlDocument = new XmlDocument();
xmlDocument.InnerXml = s;

XmlNamespaceManager nsmgr = new XmlNamespaceManager(xmlDocument.NameTable);
nsmgr.AddNamespace("def", "http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition");
XmlNode node = xmlDocument.SelectSingleNode("/def:DataSources/def:DataSource/def:ConnectionProperties/def:ConnectString", nsmgr);
node.InnerText = "test";
return xmlDocument.InnerXml;

}


}


Andrus
GeneralRe: How to set node value in XMLDocument Pin
Stefan Troschuetz14-Feb-07 9:59
Stefan Troschuetz14-Feb-07 9:59 
GeneralRe: How to set node value in XMLDocument Pin
AndrusM14-Feb-07 10:23
AndrusM14-Feb-07 10:23 
GeneralRe: How to set node value in XMLDocument Pin
Stefan Troschuetz14-Feb-07 21:13
Stefan Troschuetz14-Feb-07 21:13 
GeneralRe: How to set node value in XMLDocument Pin
AndrusM15-Feb-07 6:43
AndrusM15-Feb-07 6:43 
GeneralRe: How to set node value in XMLDocument Pin
Stefan Troschuetz15-Feb-07 7:32
Stefan Troschuetz15-Feb-07 7:32 
GeneralRe: How to set node value in XMLDocument Pin
AndrusM15-Feb-07 8:13
AndrusM15-Feb-07 8:13 
QuestionConvert DataReader to Entity list Pin
AndrusM12-Feb-07 12:49
AndrusM12-Feb-07 12:49 
QuestionCrystal Report WebService Report to DataSet Pin
dbambirck12-Feb-07 12:36
dbambirck12-Feb-07 12:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.