|
hello... i think u have to combine the data of the datagrid into a string object and then send that.... how much detail are u planning of sending.. if u have one row one column then try somethin like
string str=urDataGrid.rows[0].cells[0].value
or if u have one row multiple columns, try
string str="";
foreach(DataGridViewCells cell in urDataGridView.Rows[0].Cells)
str+= cell.Value;
or if u have multiple rows and multiple columns try
str="";
foreach(DataGridViewRows row in urDataGridView.Rows)
{
foreach(DataGridViewCells cells in row.Cells)
str+=cells.Value
str+="\n"
}
I havent tried it, but i bet id would work... u can use string.Format for formatting the string...
haseeb
|
|
|
|
|
Thanks Haseeb,will try that out and keep you posted
|
|
|
|
|
hi all
how to biuld textbox as active control and set the backcolore to it by using C# .Net
thanks for any body hellp me
Thaer
|
|
|
|
|
Hi,
You can set the active control of the form using following code :
this.ActiveControl = textBox1;
textBox1.BackColor = System.Drawing.Color.Black;
//this.ActivControl.BackColor = System.Drawing.Color.Black;
Thanks,
Gopal.S
|
|
|
|
|
|
Hi,
Can you please elaborate your question? An example might help.
|
|
|
|
|
Hi!
Simply: Generate a "regular" random number in the range [0...n[ with n being the number of elements in the array of values and use it as index into your array.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
the minimum value should be 0 and the maximum value should be the length of array ( minus 1). Next generate the random number b/w the range and then use myarray[randomNo], to get a randomnly selected value from the array.
haseeb
|
|
|
|
|
Hello....i've been working in ado.net for a few months now... and am quite confused how to use the dataset object. though i know it depends on what type of project a person is upto but still i wanted to know which one is the better approach to usin the datasets...
Approach 1: fill the dataset with all tables at project load and use the dataset for all searches and things. though as sqlserver is locally placed, i update the sqlserver tables as soon as i update the data set...
Approach 2: fill dataset with only the rows that are required... ie if u need some rows according to a criteria, write a select statement, discard ur present dataset and refil it with this statement...
Please provide full information,based on performance issues of a system...
as far as i think , i believe approach1 will be better but it becomes hard to handle when u have more tables, like 60 tables... so wat should be done in this case, "A dataset for every 10 tables"? or wat...
Thanx
haseeb
haseeb
haseeb
|
|
|
|
|
This depends on the type of application you want to write. It's a good practice to minimize the queries to a database when you write a web application. But still, my opinion is that it's not a good practice to read all the data from the database into a dataset. What happens when you have around 50-60 tables and each table has 50.000 or more rows. In this case you do a huge waste of memory. I think it's better practice to save into a dataset all the data needed at a certain time. This is my opinion.
I will use Google before asking dumb questions
|
|
|
|
|
lolz... cool answer... or should i say, read my whole question first and then try answering...
i have already said of making small datasets (at the end of my question)... max of 10 tables... which means max of 10 tables when data is less and it can go upto as small dataset as of one table... Also those tables should be related to each other...
now i can go on making datasets only for one row in a table and i have seen ppl doin it...and when i code, i use a single dataset for related data that is required... now i can't go on making dataset for 10 rows or 20 rows coz that won't help the cause of disconnected environment even a lil bit.
Anyways from ur answer, i feel i have a better sense than u atleast...and please don't consider answering again...
"i would think 10 times, before giving others answers that would give the impression that i am very smart..."...LOLZ
haseeb
|
|
|
|
|
Datasets are best used to hold DataTables that have Relationships, I very rarely use a DataSet.
|
|
|
|
|
Hi
How can i change Title in crystalReport using C# Code ?
Thank's
|
|
|
|
|
Hi
You can use "ReportTitle" property of the "SummaryInfo" object.
ex:
reportDocument.SummaryInfo.ReportTitle = " Title ";
Thanks,
Gopal.S
|
|
|
|
|
Thanks alot,
you help me.
|
|
|
|
|
I have a Data Base and i want use listView in my form in the my project(C#).
Now i want set "ListView" and show my data in it.
thaks
I can Because I want
|
|
|
|
|
Are you still having trouble with this?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hello frnd,
i have a XML document i want to read complete XML with DOM.
how can i do it...
cay code sample or link ????
thankx in advance
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Isn't that what System.Xml.XmlDocument.Load does?
|
|
|
|
|
Hello,
I want to save image/picture in my Database and retrive it
and how to display it in Datagrid
plse help me
came out of hardwork
|
|
|
|
|
|
Hi, I have a doubt regarding webservices..
I have written one webservice. where i have to put this webservice to use by internet users? what to do for this?
Is there a way to look all exsisting webservices? if so where can i found?
Is all webservices are under one website(i.e by showing what for this webservices and their description)?
How we can found webservices?
-- modified at 0:06 Saturday 24th November, 2007
|
|
|
|
|
Satish - Developer wrote: where i have to put this webservice to use by internet users? what to do for this?
A public server
Satish - Developer wrote: Is there a way to look all exsisting webservices?
Not really, no
Satish - Developer wrote: Is all webservices are under one website(i.e by showing what for this webservices and their description)?
LOL - no.
Satish - Developer wrote: How we can found webservices?
Usually by googling for the type of service you want. Why would you want to find them *all* ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,my platform is windows application(c#)
i have to place the datagrid values [cell values]multiplecells
into another windows form....
please give me suggestions or give any related code to this
murali krishna
|
|
|
|
|
Hi,
1) You can simply set the datagrid as public one.
Here is the code snippet:
public partial class Form1 : Form
{
public DataGrid dg;
public Form1()
{
InitializeComponent();
dg = new DataGrid();
dg.Name ="Sample";
}
private void button1_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.Owner = this;
frm.Show();
}
}
}
In Form2,
private void Form2_Load(object sender, EventArgs e)
{
Form1 f= this.Owner as Form1;
MessageBox.Show(f.dg.Name);
}
2) Another way, this is more securable one.
a) Move the datagrid values to DataTable. (ex: objDataTable)
b) Create a property (DTable) for getting objDataTable object.
public DataTable DTable
{
get { return objDataTable; }
}
c) Show the Form2 with the specified Owner.
Form2 frm = new Form2();
frm.Owner = this;
frm.Show();
d) Now, You can get the values in Form2 using DTable property.
//Form2.Load()
Form1 f= this.Owner as Form1;
DataTable dt = f.DTable;
Thanks,
Gopal.S
|
|
|
|