|
Hi,
Why i am in need of this is i need to generate an XML by reading the properties from a Class file (in any language C#, VB.Net..etc).. for that i have to know the properties defined in those class files and based on the properties and datatype of those properties i need to generate a dynamic XML files
example
If a class file is something as
<code>public Class A
{
private int number;
private string name;
public int Number
{
get {return number;}
set {number = value;}
}
public string Name
{
get {return name;}
set {name = value;}
}
}</code>
based the above shown class, i have to generate by getting the properties of the class
<Bobject name="A">
<DataMember name="Number"> </DataMember>
<DataMember name="Name"> </DataMember>
</Bobject>
Like this i have to generate XML file.. For this i need to get the reflection of class, isnt it? Is any other way available to get the properties declared in a class file?
Expecting your reply.
Thankfully,
jm
Thankfully,
jm
Thankfully,
jm
|
|
|
|
|
I think you may have a conceptual problem. The assembly loads the class whenever you have an instance of the class or call into the class. At that time, you can reflect the class; but if you wrote the class you should be able to indicate anything about it by even more straightforward processes.
Nonetheless, you don't load the file to reflect on the object: You reflect (usually) an instance of the object or a type object representing the class.
|
|
|
|
|
hello,
i have an MDI form that called FORM1
an I have a child form FORM2
I wrote:
form2.MDIPerent = form1
it works but in the side i get scroll bars
how I get over the scroll bars?
P.S
I try to use autoscroll = true
but it can't be done on an MDI FORM
|
|
|
|
|
you must use this code
Form2 frm = new Form2();
frm.MDIParrent = this;
frm.Show();;)
note: Your MDI Form must larger than child Form.
|
|
|
|
|
hi all,
I have a datagridview which when I populate it with data, the first row is selected by default.
IIRC in .Net 1.1 the DataGrid never used to do this.
Any one know how I can stop it?
I've tried setting every row's Selected property to false.
Thanks
|
|
|
|
|
First Check whether u have write any code in the Rowbound. If not please check whether selectedIndex prrperty is set to -1. I hope this will solve ur problem
Regards,
A Jabeer Ali
|
|
|
|
|
there isn't a selectedIndex property and I haven't hooked any events as of yet.
|
|
|
|
|
Sorry My friend. This Option is available in net.2005 for ASP:gridview.
what version u r using?
Regards,
A Jabeer Ali
|
|
|
|
|
.Net 2.0 with C# 2005.
I am using a WinForms DataGridView.
|
|
|
|
|
I have tried ClearSelection and I have also set the selection mode to select a full row
|
|
|
|
|
Check the Row Template for this Line
DataGridViewRow { Index=-1 }
Regards,
A Jabeer Ali
|
|
|
|
|
And do what may I ask?
I am unable to change it and the grid.RowTemplate.Index is read-only.
|
|
|
|
|
I've found that ClearSelection will only work if I use the DataSource property.
|
|
|
|
|
Try dataGridView1.ClearSelection(); after populating the grid with data. That should de-select anything that is selected.
|
|
|
|
|
DatagridView1.Rows(0).Selected = False
|
|
|
|
|
hello
how can i find component for receive picture from scanner in C#.net
|
|
|
|
|
Hi all,
I have design the web site with the some Control. If i press the button then the New textbox will be created. This is Working fine.But when i refresh the page after click the button also the textbox created.
Kindly help me.
Regards,
A Jabeer Ali.
Regards,
A Jabeer Ali
|
|
|
|
|
When you refresh, you do the postback again, thus the button press will occur again.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello Christian,
Is there some kind of Application.DoEvents() call, responsible for that?
All the best,
Martin
|
|
|
|
|
From my knowlegde There is no such function available. Please tell me some solution to refresh the Button event to happen.
Regards,
A Jabeer Ali
|
|
|
|
|
The Button Press Should not happen when the user hits the refresh Button.
Regards,
A Jabeer Ali
|
|
|
|
|
When i change the method of the Form to "POST". Then if i refresh the Page is asking me confirmation Dialog. If i press ok then the Textbox is Created else not. But i need even that should not be happen.
Regards,
A Jabeer Ali
|
|
|
|
|
This happens because you are refreshing the last operation - which was the javascript doPostback operation. If you don't want this to happen, I would suggest that you change the architecture so you don't need the postback to happen.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Can you Help me in changing the Architecture
Regards,
A Jabeer Ali
|
|
|
|
|
Well, you may want to look into Ajax. This doesn't use postbacks.
Deja View - the feeling that you've seen this post before.
|
|
|
|