Click here to Skip to main content
15,890,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a Grid in which 256 rows are there in which several columns are there like A,CH,Flat,PPP,D1-D16,DL.

This Grid in Placed In A User Control.

I Have An Another Page in Which that usercontrol is loaded & page includes a Master Page.

In The Page Load Event I have To Initialise & Populate Some Default Value That grid(which is in a usercontrol) in this Page(which includes a master page).

What I have tried:

for (int n = 0; n < 256; ++n)
{
Button btn_A1 = (Button)gvchannel.FindControl("btn_A1");
// Ch
if (cSiteData.stCh[n].EN)
//dataGridViewCh.Rows[n].Cells["Attached"].Value = "A";
//GridViewRow gvrowchannel=(GridViewRow)gvchannel.FindControl
{
//gvchannel.Rows[n].Cells[0].Text = "A";

btn_A1.Text = "A";
}
else
//dataGridViewCh.Rows[n].Cells["Attached"].Value = "";
//gvchannel.Rows[n].Cells[0].Text = "";
btn_A1.Text = "";

//dataGridViewCh.Rows[n].Cells["Channel"].Value = n + 1;
gvchannel.Rows[n].Cells[1].Text = Convert.ToString(n + 1);
//dataGridViewCh.Rows[n].Cells["Flat"].Value = cSiteData.stCh[n].flat;
gvchannel.Rows[n].Cells[2].Text = cSiteData.stCh[n].flat.ToString();
//dataGridViewCh.Rows[n].Cells["PPP"].Value = cSiteData.stCh[n].ppp;
gvchannel.Rows[n].Cells[3].Text = cSiteData.stCh[n].ppp.ToString();
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900