Click here to Skip to main content
15,911,711 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionWeb Site Administration Tool Pin
Member 391904912-Sep-08 8:59
Member 391904912-Sep-08 8:59 
AnswerRe: Web Site Administration Tool Pin
Jason Lepack (LeppyR64)12-Sep-08 9:03
Jason Lepack (LeppyR64)12-Sep-08 9:03 
GeneralRe: Web Site Administration Tool Pin
Member 391904912-Sep-08 9:49
Member 391904912-Sep-08 9:49 
GeneralRe: Web Site Administration Tool Pin
Jason Lepack (LeppyR64)12-Sep-08 9:55
Jason Lepack (LeppyR64)12-Sep-08 9:55 
GeneralRe: Web Site Administration Tool Pin
Member 391904912-Sep-08 10:10
Member 391904912-Sep-08 10:10 
Questionhandle button click event within GridView Pin
Meax12-Sep-08 8:53
Meax12-Sep-08 8:53 
AnswerRe: handle button click event within GridView Pin
Meax12-Sep-08 11:30
Meax12-Sep-08 11:30 
AnswerRe: handle button click event within GridView Pin
Linda1st16-Sep-08 10:23
Linda1st16-Sep-08 10:23 
I created and referenced the following gridview dynamically
which provides more flexibility. Consequently, you have an onclick attribute that gets the value and reset the function/procedure

protected void Page_Load(object sender, EventArgs e)
{
grid1.Visible = true;
setGridValues();
}


private void setGridValues()
{

grid1.Visible = true;

grid1.AutoGenerateColumns = true;

DataTable dt = new DataTable(); // dataTable
// column names ...
dt.Columns.Add("ID");
dt.Columns.Add("DateRequested");
dt.Columns.Add("ServicePartNo");
dt.Columns.Add("qty.");
dt.Columns.Add("VIN");
dt.Columns.Add("RoNo");
dt.Columns.Add("GCQIS");
dt.Columns.Add("Status");


// add hyper link to add to grid1........................
HyperLinkField linkX = new HyperLinkField();
string[] fldS = { "ID","Status" };
linkX.HeaderText = "ReqID";
linkX.DataTextField = "ID";
linkX.DataNavigateUrlFields = fldS;
linkX.DataNavigateUrlFormatString = "summaryReqNo.aspx?reqNo={0}&status={1}";
linkX.Target = "_self"; // = "_blank"

grid1.Attributes.Add("BackColor", "#CCCCCC"); // add attributes to grid
grid1.Attributes.Add( "BorderColor", "#000099");
grid1.Attributes.Add("BorderWidth", "3px");
grid1.Attributes.Add("ForeColor","#333399");
grid1.Attributes.Add("Width", "7in");

grid1.Columns.Add(linkX); // adding hyper link devined above to grid

cRequests reqS = new cRequests(userX); // values from classto loade into grid


// adding rows to grid1 ......................................
foreach (cRequest item in reqS)
{
object[] aryX = new object[8];

aryX[0] = (item.reqID);
aryX[1] = (item.reqDate).Value.ToShortDateString();
aryX[2] = (svcPN.prefix) + "-" + (svcPN.basePart) + "-" + (svcPN.suffix);
aryX[3] = (svcPN.svcQty);
aryX[4] = (item.reqVIN);
aryX[5] = (item.reqOrdNo);
aryX[6] = (item.reqGCQISNo);
aryX[7] = item.status;
dt.Rows.Add(aryX);

}
grid1.DataSource = dt;
grid1.DataBind(); // gridX.DataSource = arryLstX;

}


hope this helps; Signed... Linda

xxx

QuestionMailing thru Asp.net Pin
Satish_S12-Sep-08 6:51
Satish_S12-Sep-08 6:51 
AnswerRe: Mailing thru Asp.net Pin
Manas Bhardwaj12-Sep-08 6:58
professionalManas Bhardwaj12-Sep-08 6:58 
GeneralRe: Mailing thru Asp.net Pin
Satish_S12-Sep-08 7:03
Satish_S12-Sep-08 7:03 
GeneralRe: Mailing thru Asp.net Pin
MidwestLimey12-Sep-08 7:54
professionalMidwestLimey12-Sep-08 7:54 
AnswerRe: Mailing thru Asp.net Pin
Steven A. Lowe12-Sep-08 18:18
Steven A. Lowe12-Sep-08 18:18 
GeneralRe: Mailing thru Asp.net Pin
Satish_S12-Sep-08 21:54
Satish_S12-Sep-08 21:54 
QuestionServer Status Pin
balu1234512-Sep-08 4:12
balu1234512-Sep-08 4:12 
AnswerRe: Server Status Pin
Ashfield12-Sep-08 4:44
Ashfield12-Sep-08 4:44 
AnswerRe: Server Status Pin
Paul Conrad12-Sep-08 5:33
professionalPaul Conrad12-Sep-08 5:33 
AnswerRe: Server Status Pin
Steven A. Lowe12-Sep-08 18:22
Steven A. Lowe12-Sep-08 18:22 
QuestionHight on a tablecell with linkbuttons problem Pin
thomasa12-Sep-08 4:07
thomasa12-Sep-08 4:07 
AnswerRe: Hight on a tablecell with linkbuttons problem Pin
ToddHileHoffer12-Sep-08 7:04
ToddHileHoffer12-Sep-08 7:04 
QuestionFrom Server to UserPC Under WAN Pin
balu1234512-Sep-08 4:06
balu1234512-Sep-08 4:06 
Questionsending mail through local host [modified] Pin
UD(IA)12-Sep-08 3:37
UD(IA)12-Sep-08 3:37 
AnswerRe: sending mail through local host Pin
MidwestLimey12-Sep-08 7:57
professionalMidwestLimey12-Sep-08 7:57 
QuestionVariable delcare in aspx.vb not shown in .aspx page Pin
dhumplopoka12-Sep-08 3:29
dhumplopoka12-Sep-08 3:29 
AnswerRe: Variable delcare in aspx.vb not shown in .aspx page Pin
Manas Bhardwaj12-Sep-08 3:59
professionalManas Bhardwaj12-Sep-08 3:59 

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.