|
i am accessing the xml file through the c# in tree view. so how can i save the changes which ihave made in tree view in xml file?
|
|
|
|
|
when you read the file first time save the information with your self.
e,g save it in string what changing you are you going to made now you can easly change the string at the last you can write down you whole file again.
This is my idea i am working in this way.
|
|
|
|
|
can u plz send me sample code?
|
|
|
|
|
Look at the following overloads for the XmlDocument.Save() method. http://msdn2.microsoft.com/en-us/library/system.xml.xmldocument.save(VS.80).aspx[^]
I hope you were using the XmlDocument class to make the changes to the original XML. If you aren't, then you should definitely take a look there as it will make things easier for you.
I just realized you said you were using a databound treeview to access the XML. I've never actually used that, so ignore my response.
|
|
|
|
|
|
How to set dateformat in DataGridView column.
Which property need tobe changed or any other alternative???
|
|
|
|
|
You should change the date formate before putting the data into grid view.
If you are getting data from database then you should change your system date style formate.
|
|
|
|
|
But i want to write date manually in DataGridView how to do this???
|
|
|
|
|
There's a Format property in the DefaultCellStyle property in the GridViewColumn for setting the format.
|
|
|
|
|
|
I want to create custom picturebox in which i enter mouse i become inlage and as mouse leave in go in it previous size.
The problem did't want to big its size area.
I mean there are also other picturebox.
The example of my control that i what to create In mobile main menue.
In which which item you selected it will become large and over become over to nearest items.
rect.Inflate(2, 2);
is a technique but it not solving my problem.
Waiting for your comment ...
Thanks
|
|
|
|
|
Have you come up with any good ideas?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I get the answer form the msdn forms the link is
here]
|
|
|
|
|
Cool, and thanks for sharing
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
I am using a property Grid with a check Box displayed as one of its item.
I am able to display Check Box and check/Uncheck Items.
But the problem is I am also getting a drop down List box with True/false along with check box. I need to get rid/hide this drop down List Box .
Can any pne please let me know for the soultion if possible ?
the code I am using for displying Check Box is:
[Editor(typeof(CheckBoxInPropertyGridEditorTwoPassCalc), typeof(System.Drawing.Design.UITypeEditor))]
public bool TwoPassCalculation
{
get { return twoPassCalculation; }
set { twoPassCalculation = value; }
}
public class CheckBoxInPropertyGridEditorTwoPassCalc : UITypeEditor
{
public override bool GetPaintValueSupported(ITypeDescriptorContext context)
{
return true;
}
public override void PaintValue(PaintValueEventArgs e)
{
ControlPaint.DrawCheckBox(e.Graphics, e.Bounds, ((GeneralDimensionClass)e.Context.Instance).twoPassCalculation ? ButtonState.Checked : ButtonState.Normal);
}
}
modified on Wednesday, January 23, 2008 4:28:13 AM
|
|
|
|
|
Are you still working on this?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
how do i delete the selected node programmatically in tree view?
|
|
|
|
|
<br />
treeview.Nodes.Remove(treeView.SelectedNode);
|
|
|
|
|
Hi All
Last Mounth I Creat BackUp DataBase From Microsoft SQl Server 2005 By C#.Net Code .
But Know I Wount To Restor This BackUp From Device To Microfoft SQL Server 2005 By C#.Net Code .
Who Can Hellp Me By Support me By C#.Net Code ?
Thanks For Any Body Hellp me
Thaer
|
|
|
|
|
using Microsoft.SqlServer.Management.Smo;<br />
private static Server srvSql;<br />
private static ServerConnection srvConn;<br />
Coeenction
<br />
servername = cmbServer.Text;<br />
srvConn = new ServerConnection(cmbServer.SelectedItem.ToString());<br />
srvConn.LoginSecure = true;<br />
<br />
srvSql = new Server(srvConn);<br />
//Restoring Database
void Restoring_data()<br />
{<br />
<br />
if (srvSql != null)<br />
{<br />
<br />
Restore rstDatabase = new Restore();<br />
rstDatabase.Action = RestoreActionType.Database;<br />
rstDatabase.Database = "DataBaseName"<br />
BackupDeviceItem bkpDevice = new BackupDeviceItem(txtbackup.Text.ToString(), DeviceType.File);<br />
rstDatabase.Devices.Add(bkpDevice);<br />
rstDatabase.ReplaceDatabase = true;<br />
<br />
rstDatabase.SqlRestore(srvSql);<br />
<br />
}<br />
else<br />
{<br />
MessageBox.Show("A connection to a SQL server was not established.", "Not Connected to Server", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);<br />
}
Hope this will help your
|
|
|
|
|
Thanks Mr Abhijit Jana
but this code have Exeption
Nicrosof.SqlServer.Management.smo.PropertyNotSetExeption,
Set Property Device to Accomplish this action
And this Exeption wount
RestData.script(server);
I Dont What is the Problem for this Problem if you can hellp me
Thaer
|
|
|
|
|
How to pass session value in javascript
help me with code
thanx in advance
|
|
|
|
|
post it on Asp.net Forum !!!
|
|
|
|
|
hi i want to add , delete an modify axml file directly from tree view
i have done some code to access it , but i am not getting how to add an modify n delete a node directy
.
code:
private void Form1_Load(object sender, System.EventArgs e)
{
// Initialize the controls and the form.
label1.Text = "File Path";
label1.SetBounds(8, 8, 50, 20);
textBox1.Text = Application.StartupPath + "\\Sample.xml";
textBox1.SetBounds(64, 8, 256, 20);
button1.Text = "Populate the TreeView with XML";
button1.SetBounds(8, 40, 200, 20);
this.Text = "TreeView control from XML";
this.Width = 336;
this.Height = 368;
treeView1.SetBounds(8, 72, 312, 264);
}
private void button1_Click(object sender, System.EventArgs e)
{
try
{
// SECTION 1. Create a DOM Document and load the XML data into it.
XmlDocument dom = new XmlDocument();
dom.Load(textBox1.Text);
// SECTION 2. Initialize the TreeView control.
treeView1.Nodes.Clear();
treeView1.Nodes.Add(new TreeNode(dom.DocumentElement.Name));
TreeNode tNode = new TreeNode();
tNode = treeView1.Nodes[0];
// SECTION 3. Populate the TreeView with the DOM nodes.
AddNode(dom.DocumentElement, tNode);
treeView1.ExpandAll();
}
catch(XmlException xmlEx)
{
MessageBox.Show(xmlEx.Message);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void AddNode(XmlNode inXmlNode, TreeNode inTreeNode)
{
XmlNode xNode;
TreeNode tNode;
XmlNodeList nodeList;
int i;
// Loop through the XML nodes until the leaf is reached.
// Add the nodes to the TreeView during the looping process.
if (inXmlNode.HasChildNodes)
{
nodeList = inXmlNode.ChildNodes;
for(i = 0; i<=nodeList.Count - 1; i++)
{
xNode = inXmlNode.ChildNodes[i];
inTreeNode.Nodes.Add(new TreeNode(xNode.Name));
tNode = inTreeNode.Nodes[i];
AddNode(xNode, tNode);
}
}
else
{
// Here you need to pull the data from the XmlNode based on the
// type of node, whether attribute values are required, and so forth.
inTreeNode.Text = (inXmlNode.OuterXml).Trim();
}
}
plz help me . or send me an pprom on manasvi.s.s@gmail.com
|
|
|
|
|
Have you come up with any good ideas?
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|