|
How do i do that ?
I know how to display the struct layout.
I know how to load dynamically the assembly.
Let me try and explain my problem:
lets say that i have a class A which can display type S as a string.
S is defined in class B.
I have to reference B or else i get a compilation problem.
but, since B has two versions (1 and 2) i want to load it dynamically.
how do i do that ?
|
|
|
|
|
Nir sheffi wrote: how do i do that ?
Your problem is not very specific. Maybe you need to rethink the design and focus on smaller problem areas.
|
|
|
|
|
but this is my problem !
i want to display a struct that changes between versions of assemblies.
|
|
|
|
|
Nir sheffi wrote: but this is my problem !
i want to display a struct that changes between versions of assemblies.
So what is the problem?
- Does it not load?
- Can you not differenciate between 2 versions of the same type?
- Do you get an exception when you do something?
- Anything else?
|
|
|
|
|
class A
{
void print(B b){....}; // prints type B
}
struct B (ver 1.0)
{
int x;
}
struct B (ver 2.0)
{
int x;
int y;
}
if A does not ref. directly to assembly that holds B we can not compile since A does not know B.
but i want to load B dynamically, so i do not want to ref. B during compilation.
that is my problem.
|
|
|
|
|
Hi everyone!!!
Is there anyone who knows how to retrive photos in the active directory using c#?
|
|
|
|
|
u Can Start Here in CodeProject
[^]
Have Fun
Never forget it
|
|
|
|
|
Hello,
I use the smtp and the System.Web.Mail namespace to send mail to Hotmail and Yahoo servers but I receive a failure message int Inetpub\mailroot\Badmail folder from hotmail server But I don't know why.
Thanks.
Dad
|
|
|
|
|
You have to have a hotmail account. You need to ask hotmail for their correct smtp settings in order to use their servers to send mail. If you have an account, and you think you have the correct settings, you should try asking in the hotmail forums, or sending an email to their support team.
Simon
|
|
|
|
|
Hello, I want to show two date value(starting date, end date) on top of my Crystal report
like this( From: 07-07-08 to To: 08-07-08). I select these two date in another form. Now how can I send this two parameter in my crystal report and print on top left of my report?
Can any 1 help plz??
|
|
|
|
|
Hi All,
I have a text box i dont want to user eneters here anything apart from character..
so is there any property exist here to validate automatically...
or i have to do it on textchange event ...
vikas da
|
|
|
|
|
No, for a normal text box you have to use an event to filter it. You could use the text changed event, or you could use the key press events and filter out any keys you don't want to accept. (This wouldn't stop them pasting into the text box though, so you should probably validate the whole block of text when the dialog was confirmed too.) Don't forget to not block the backspace/delete/arrow keys if you do this.
Simon
|
|
|
|
|
Thank alot for your reply.. i am trying the same now what you have been suggested....
vikas da
|
|
|
|
|
Use Validating event to validate the contents and cancel the event if required. This event will be fired when user moves focus out of the textbox, even pressing the ok button would trigger this event.
So, use this event to check if the text of the textbox is ok or not.
Nirandas,
a developer from India.
http://www.nirandas.com
|
|
|
|
|
Hi All,
I have 10 textboxes, with different lables,
during creating the text boxes i just do copy paste and didnt remeber to follow the sequence ..
now i am facing the problem here after loading the form when i am filling the values in the form ...am nevigating from one textbox to other using tab ... but its not working good ...means its going to first textbox then third then fifth as was copied so how can i make all this in order...
Thanks alot..
vikas da
|
|
|
|
|
When you are in the design view of the form, select the Tab Order item of the menu View to fix the sequence.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks alot ... it is done since i am using VS2008 so it is called here as tab order...
vikas da
|
|
|
|
|
thanks alot i got tab order also... this is nice
vikas da
|
|
|
|
|
Hi, i have datagrid and i have make the first column to be a checkbox
foreach (Category cat in categoryTable.Values)
{
string[] dataResult = { cat.Name, cat.Description };
this.dataGridCat.Rows.Add(dataResult);
}
categoryTable is my hashtable, and inside the values i store a Category object.
my datagrid first columm is name "Del" which is a checkbox, 2nd column is Name and 3rd column is Description.
I put the above foreach loop into the form load, so when the form is loaded, it will shows all the category in the hashtable. When the user check the checkbox or checkboxes and press the OK button, it will loop throught the datagrid and delete those that are checked
So now i need help on
1) Adding a checkbox
2) Looping throught the datagrid and check
|
|
|
|
|
1)
goto the dataGridView in The Design and click add Column
there choose tthe CheckBox Type Column
2)
Init The Coulmn With False Value
foreach (DataGridViewRow DGVW in dataGridView1.Rows)
{
DataGridViewCheckBoxCell dataCell = DGVW.Cells[0] as DataGridViewCheckBoxCell;
dataCell.Value = false;
}
When Checked the value will turn True
and The n Check :
foreach (DataGridViewRow DGVW in dataGridView1.Rows)
{
DataGridViewCheckBoxCell dataCell = DGVW.Cells[0] as DataGridViewCheckBoxCell;
if ((bool)dataCell.Value)
{
dataGridView1.Rows.Remove(DGVW);
}
}
Have Fun
Never forget it
|
|
|
|
|
private void FrmAddOrder_Load(object sender, EventArgs e)
{
int currentRow = 0;
foreach (Product p in productTable.Values)
{
this.dataGridProduct.Rows.Add();
this.dataGridProduct.Rows[currentRow].Cells["colProductName"].Value = p.Name;
this.dataGridProduct.Rows[currentRow].Cells["colModelNumber"].Value = p.ModelNumber;
this.dataGridProduct.Rows[currentRow].Cells["colCategory"].Value = p.Category;
this.dataGridProduct.Rows[currentRow].Cells["colDesc"].Value = p.Description;
this.dataGridProduct.Rows[currentRow].Cells["colMSRP"].Value = p.MSRP;
this.dataGridProduct.Rows[currentRow].Cells["colRetailPrice"].Value = p.RetailPrice;
currentRow++;
}
}
private void btnOK_Click(object sender, EventArgs e)
{
foreach (DataGridViewRow dgw in dataGridProduct.Rows)
{
DataGridViewCheckBoxCell datacell = dgw.Cells[0] as DataGridViewCheckBoxCell;
try
{
if ((bool)datacell.Value == true)
{
}
}
catch (NullReferenceException)
{
}
}
}
I have 2 hashtable
1st one is called orderTable;
2nd one is called productTable;
my "datagridproduct" will show the data that is productTable
The Order class have the following attribute
namespace EBMS
{
public class Order
{
private string refNumber;
private string custName;
private string destAdd;
private string destCity;
private DateTime orderDate;
private double totalPrice;
private Hashtable itemList;
I want to create a new Order object and the itemList will store those items in the dategridproduct that is checked.
How do i add my product that is checked into itemList and then add the itemList into my orderTable
modified on Tuesday, July 8, 2008 1:16 PM
|
|
|
|
|
Hi,
I am developing an application which retrievs data from a database and displays it into Datagridview. The data is displayed properly onto the Datagridview. Datatable is also used.
The question is how can i export/save this Datagridview table into a picture so that i can insert it into a mail.
Its a windows application in C#.
Feel free for any clarification.
Thanks in advance.
Praveen Raghuvanshi
Software Engineer,
India.
|
|
|
|
|
Control has a "DrawToBitmap " method which takes a screen shot of the control.
|
|
|
|
|
Thanks Navaneet for the response.
Still i have a problem. The problem is that 'DrawtoBitmap' gives a snapshot of the size of datagridview only. It doesn't give all the records like we have some hidden records in the datagridview which gets visible only by scroll bars.
I need to have all the records in the datagridview to be converted into a image so that i can embed it into a mail.
My requirement is to display a data obtained from a database onto a windows application. I want to embed that data into email in tabular form.
I would appreciate if there is any other way of achieving this.
Thanks in advance
Praveen Raghuvanshi
|
|
|
|
|
Hi,
I need to determine the location of label text in pixels as Margin, Padding, and TextAlign properties change
|
|
|
|