|
what are the uses of outerxml
and also how to use....
|
|
|
|
|
Hamsika rani wrote: what are the uses of outerxml
and also how to use....
I'm not sure what all the uses of OuterXml are but you could use four periods in a paragraph that had four sentences. Does that help?
led mike
|
|
|
|
|
Hamsika rani wrote: what are the uses of outerxml
Return the XML markup that represents the current node and all its child nodes.
Hamsika rani wrote: and also how to use
Well, get an XmlNode instance and access the OuterXml property.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
I want to preview html code in my windows form app using the web browser control, without saving the document. I just want to somehow capture the text/code in the textbox, and display it in the browser control.
Anyone know how can I make this happen?
|
|
|
|
|
Set the control's DocumentText property.
/ravi
|
|
|
|
|
Thank you for your reply. However, I'm not sure how to set the control's Document.Text property. Could you offer some guidance?
Thank you.
|
|
|
|
|
WebBrowser _wb = new WebBrowser();
_wb.DocumentText = "<html>Hello, <b>HTML</b>!"; /ravi
|
|
|
|
|
hi ,
How can i use in a DataGrid Cell Only Number , Iuse yhis function for this :
public bool OnlyIsNumeric(string val)
{
try{
int result = 0;
return int.TryParse(val, System.Globalization.NumberStyles.Integer, System.Globalization.NumberFormatInfo.CurrentInfo, out result);
}
catch{ return false;}
}
but Ican not use this in datagrid in DataGrid1_CurrentCellChanged Event :
DataGrid1[DataGrid1.CurrentRowIndex, 2] = "";
thanx
s_mostafa_h
|
|
|
|
|
Hi Mostafa,
Please use this code:
private void dgview_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)
{
dgview.EditingControl.KeyPress += new KeyPressEventHandler(dgviewKeyPress);
}
private void dgviewKeyPress(object sender, KeyPressEventArgs args)
{
if (!char.IsDigit(args.KeyChar))
args.Handled = true;
}
Please let me know if this helps.
Thanks,
Gopal.S
|
|
|
|
|
thanks a lot for ur reply , but If I want to this (only number ) Only in Column 2 ( one of my field is numeric for e.g. SerialNumber ),
in this case How can i do this .
By the way I have DataGrid , Not DataGridView .then this object has not the properties that u wrote .
thanks again
-- modified at 6:58 Monday 7th May, 2007
s_mostafa_h
|
|
|
|
|
Use DataGrid.EndEdit method to validate if the entered value is numeric or not. Have a look at MSDN Library DataGrid.EndEdit where you can find an example code. Hope this helps.
|
|
|
|
|
Hi Mustafa,
Here is the another solution:
namespace Sample
{
public partial class Form1 : Form
{
DataGrid dGird;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
dGird = new DataGrid();
dGird.CurrentCellChanged += new EventHandler(dGridCellChanged);
DataTable dt = new DataTable();
dt.Columns.Add("SNo");
dt.Columns.Add("Name");
dt.Columns.Add("Amount");
dt.Columns.Add("Address");
DataRow drow = dt.NewRow();
drow[0] = "01";
drow[1] = "Gopal";
drow[2] = "100";
drow[3] = "TTL";
dt.Rows.Add(drow);
drow = dt.NewRow();
drow[0] = "02";
drow[1] = "Raja";
drow[2] = "150";
drow[3] = "SSS";
dt.Rows.Add(drow);
dGird.DataSource = dt;
dGird.Size = new Size(400, 400);
this.Controls.Add(dGird);
System.Windows.Forms.Control.ControlCollection ctlCollection = dGird.Controls;
if (dGird.CurrentCell.ColumnNumber == 0)
ctlCollection[2].KeyPress += new KeyPressEventHandler(dgKeyPress);
}
private void dgKeyPress(object sender, KeyPressEventArgs args)
{
if (!char.IsDigit(args.KeyChar) && args.KeyChar!=(char)Keys.Back)
args.Handled = true;
}
private void dGridCellChanged(object sender, EventArgs args)
{
// Control index - 0,1 assigned for scrollbars(default).
System.Windows.Forms.Control.ControlCollection ctlCollection = dGird.Controls;
if (dGird.CurrentCell.ColumnNumber == 0)
ctlCollection[2].KeyPress += new KeyPressEventHandler(dgKeyPress);
else if (dGird.CurrentCell.ColumnNumber == 2)
ctlCollection[4].KeyPress += new KeyPressEventHandler(dgKeyPress);
}
}
}
please let me know if this helps.
Thanks,
Gopal.S
|
|
|
|
|
it's help me , thanks in advance !
Yours ,;)
s_mostafa_h
|
|
|
|
|
Dear all,
Thank you for replying to my earlier post ; it was extremely helpfull. However, I've got another question. I use the following code :
private void treeView1_Click(object sender, System.EventArgs e)<br />
{<br />
TreeNode node = treeView1.SelectedNode;<br />
lblResName.Text = node.ToString();<br />
}
This produces the following output to the text property of the label :
Treenode:text
Is there a way to show only the content of the row in the treenode, without the Treenode: prefix attached to it.
Cheers
|
|
|
|
|
Fixed it ...
instead of using :
lblResName.Text = node.ToString();
I tried :
lblResName.Text = node.Text.ToString();
and that worked !
|
|
|
|
|
can i program an application to generate dll file as an output ,for example:
program generate the following code :
class cars
{
private string _Model;
Private string _Type;
public Cars()
{
}
public string Model
{
get{return _Model;}
set{_Model=Value;}
}
public string Model
{
get{return _Model;}
set{_Model=Value;}
}
}
I need to convert the above code to a dll(Cars.dll) file that simply can use it:
Please help me to do it,
Thank you very much,
|
|
|
|
|
Yes you can. When creating a new project choose windows class library.
|
|
|
|
|
I don't need to create it Manually I want do it Programmatically Can I do it,
|
|
|
|
|
|
|
Have a look at http://www.codeproject.com/csharp/codecompilation.asp
Hope this helps...
|
|
|
|
|
thank you so much
But I have another problem
how can I set the assemply info(Properties Folder) for the Source Code or the Dll output file
Best Regards ,
|
|
|
|
|
What do you mean with assembly info(Properties Folder)?
Can you explain it clearly so that I can try help you ?
|
|
|
|
|
give me about outerxml concepts
|
|
|
|
|
The outerxml property contains the xml markup for the element including it's children.
---
single minded; short sighted; long gone;
|
|
|
|