Click here to Skip to main content
15,921,660 members
Home / Discussions / C#
   

C#

 
GeneralRe: what are the assemblies required for c# BHO to run in all environment? Pin
SeMartens26-Jul-09 23:09
SeMartens26-Jul-09 23:09 
GeneralRe: what are the assemblies required for c# BHO to run in all environment? Pin
svt gdwl26-Jul-09 23:20
svt gdwl26-Jul-09 23:20 
QuestionNon-Blocking Socket Definition Pin
M Riaz Bashir26-Jul-09 19:41
M Riaz Bashir26-Jul-09 19:41 
AnswerRe: Non-Blocking Socket Definition Pin
Abhijit Jana26-Jul-09 20:12
professionalAbhijit Jana26-Jul-09 20:12 
QuestionHow I can get the Modified date of a file ? Pin
E_Gold26-Jul-09 19:31
E_Gold26-Jul-09 19:31 
AnswerRe: How I can get the Modified date of a file ? Pin
King Julien26-Jul-09 20:12
King Julien26-Jul-09 20:12 
GeneralRe: How I can get the Modified date of a file ? Pin
E_Gold27-Jul-09 2:55
E_Gold27-Jul-09 2:55 
GeneralRe: How I can get the Modified date of a file ? Pin
King Julien27-Jul-09 3:15
King Julien27-Jul-09 3:15 
QuestionArabic Pin
Member 254517626-Jul-09 19:21
Member 254517626-Jul-09 19:21 
AnswerRe: Arabic Pin
Mohammad Dayyan26-Jul-09 19:47
Mohammad Dayyan26-Jul-09 19:47 
Questioncode 4 random number without repeating number in a row . Pin
OLUMADE26-Jul-09 11:48
OLUMADE26-Jul-09 11:48 
AnswerRe: code 4 random number without repeating number in a row . Pin
Christian Graus26-Jul-09 12:11
protectorChristian Graus26-Jul-09 12:11 
AnswerRe: code 4 random number without repeating number in a row . [modified] Pin
PIEBALDconsult26-Jul-09 12:42
mvePIEBALDconsult26-Jul-09 12:42 
QuestionUnicode Pin
hadad26-Jul-09 4:03
hadad26-Jul-09 4:03 
AnswerRe: Unicode Pin
Manas Bhardwaj26-Jul-09 4:16
professionalManas Bhardwaj26-Jul-09 4:16 
AnswerRe: Unicode Pin
harold aptroot26-Jul-09 4:48
harold aptroot26-Jul-09 4:48 
QuestionC# datagridview display Question Pin
spankyleo12326-Jul-09 3:26
spankyleo12326-Jul-09 3:26 
My Question,

I have designed FORM1 with a datagridview dgvForm1 and am populating data into it using LINQ queries. The data is populating fine into the dgvForm1.

I have a checkbox column in the dgvForm1 to select the checked rows.

I have a button in FORM1 called DISPLAY.

I have FORM2 with datagridview dgvForm2.


All I want to do is ...allow the user to select the required rows from dgvForm1 using checkboxs. After selecting, the user clicks on the DISPLAY which will show FORM2 . I want to display the selected rows from dgvForm1 in the datagridview(dgvForm2) of FORM2.

Am using C# with VS 2008 , this my code for reading the checked value of rows,,,, I have defined a constructor in Form2 to take in string values. Then in form2 initialization am assigning the string value to datagridview2 in form 2.. Am not sure if its correct to do so ..... but am not getting the required result.i.e my datagrid2 is not getting populate with the checked rows from datagrid1. please suggest solutions,,,thanks


string<br />
<br />
data = string.Empty;<br />
//data = this<br />
foreach (DataGridViewRow row in dataGridView1.Rows<br />
{<br />
if (row.Cells[SelectColumnIndex].Value != null &&<br />
Convert.ToBoolean(row.Cells[SelectColumnIndex].Value) == true)<br />
{<br />
foreach (DataGridViewCell cell in row.Cells)<br />
{<br />
if (cell.OwningColumn.Index != SelectColumnIndex)<br />
{<br />
data += (cell.Value + ","); <br />
}<br />
}<br />
data += "\n";<br />
}<br />
}<br />
Form2 fm = new Form2(data);<br />
fm.Show();<br />
<br />
}<br />
<br />
<br />
public Form2(String data) <br />
<br />
{<br />
<br />
InitializeComponent();<br />
<br />
this.dgv1Fm2.DataSource = data; <br />
<br />
 <br />
<br />
 <br />
<br />
}<br />
<br />

AnswerRe: C# datagridview display Question Pin
Henry Minute26-Jul-09 3:45
Henry Minute26-Jul-09 3:45 
GeneralRe: C# datagridview display Question Pin
spankyleo12326-Jul-09 4:29
spankyleo12326-Jul-09 4:29 
GeneralRe: C# datagridview display Question Pin
Henry Minute26-Jul-09 4:46
Henry Minute26-Jul-09 4:46 
QuestionTaking screenshots from DirectX Games Pin
SimpleData26-Jul-09 2:55
SimpleData26-Jul-09 2:55 
QuestionInsert Obejct to sorted list Pin
bonzaiholding26-Jul-09 2:44
bonzaiholding26-Jul-09 2:44 
AnswerRe: Insert Obejct to sorted list [modified] Pin
PIEBALDconsult26-Jul-09 4:39
mvePIEBALDconsult26-Jul-09 4:39 
GeneralRe: Insert Obejct to sorted list Pin
bonzaiholding26-Jul-09 6:15
bonzaiholding26-Jul-09 6:15 
GeneralRe: Insert Obejct to sorted list Pin
PIEBALDconsult26-Jul-09 6:26
mvePIEBALDconsult26-Jul-09 6:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.