Click here to Skip to main content
16,010,427 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionHow to handle multiple browsers in ASP.NET Pin
swapnilbhavsar4-Aug-07 2:28
swapnilbhavsar4-Aug-07 2:28 
AnswerRe: How to handle multiple browsers in ASP.NET Pin
Christian Graus4-Aug-07 3:12
protectorChristian Graus4-Aug-07 3:12 
Questionhow to access one java scrpt in multiple forms Pin
biswa474-Aug-07 1:02
biswa474-Aug-07 1:02 
AnswerRe: how to access one java scrpt in multiple forms Pin
Christian Graus4-Aug-07 3:03
protectorChristian Graus4-Aug-07 3:03 
AnswerRe: how to access one java scrpt in multiple forms Pin
Eliz.k4-Aug-07 4:43
Eliz.k4-Aug-07 4:43 
QuestionIntegration of blogs with asp.net 2.0 Pin
SameerTaha4-Aug-07 0:58
SameerTaha4-Aug-07 0:58 
AnswerRe: Integration of blogs with asp.net 2.0 Pin
Christian Graus4-Aug-07 3:13
protectorChristian Graus4-Aug-07 3:13 
QuestionPostback problem in ItemCommand event of Datagrid Pin
Anees Mitha3-Aug-07 23:30
Anees Mitha3-Aug-07 23:30 
Hi,

Case:
1) Datagrid Bound columns generated at runtime and populated from the dataset.
2) Datagrid contains a select button. When the select button is pressed a new report is generated.

Language: Visual Studio 2.0, ASP.Net, C#

Problem: During the first page_load grid is populated properly but when it is postback Datagrids items and cells are not visible in the select buttons itemcommand method.

By referring the articles in the google i came to know that i should not be using page_load, instead i should call the method in the initializecomponent() , but since i am working on .Net 2.0 it does not have initializecomponent method. I have also tried PreLoad and its not working.

Please find below my sample code so that u get a better idea.

--Sample Code Starts Here
protected void Page_PreLoad(object sender, EventArgs e)
{
if (!IsPostBack)
{ getdata(); }
.....
}

public virtual void grdvwCheckbox_ItemCommand(object s, DataGridCommandEventArgs e)
{
if (e.CommandName == "Select")
{
e.Item.BackColor = System.Drawing.Color.Wheat;
DataGrid dg = (DataGrid) s;
.........
}
}

public void getdata()
{
DataSet ds = new DataSet();
string rptDetails;
rptDetails = txtRptDetails.Text;

GridReports objBO = new GridReports();
ds = (DataSet)objBO.GridData(rptDetails);

grdvwCheckbox.AutoGenerateColumns = false;

foreach (DataColumn c in ds.Tables[0].Columns)
{
grdvwCheckbox.Columns.Add(CreateBoundColumns(c));
}

...................
}
--Sample Code Ends Here

Hope this helps u to help me.

If u have any working sample code in .Net 2.0 where Bound columns are created at runtime and ItemCommand event is fired then please forward it to me.

A quick reply will be really helpful.
Please feel free to revert in case of any clarification.

Thanks!

AnswerRe: Postback problem in ItemCommand event of Datagrid Pin
N a v a n e e t h3-Aug-07 23:52
N a v a n e e t h3-Aug-07 23:52 
GeneralRe: Postback problem in ItemCommand event of Datagrid Pin
Anees Mitha4-Aug-07 0:02
Anees Mitha4-Aug-07 0:02 
GeneralRe: Postback problem in ItemCommand event of Datagrid Pin
N a v a n e e t h4-Aug-07 0:20
N a v a n e e t h4-Aug-07 0:20 
GeneralRe: Postback problem in ItemCommand event of Datagrid Pin
Anees Mitha5-Aug-07 0:30
Anees Mitha5-Aug-07 0:30 
GeneralRe: Postback problem in ItemCommand event of Datagrid Pin
N a v a n e e t h5-Aug-07 22:27
N a v a n e e t h5-Aug-07 22:27 
GeneralRe: Postback problem in ItemCommand event of Datagrid Pin
Anees Mitha7-Aug-07 0:26
Anees Mitha7-Aug-07 0:26 
QuestionSession Checking In Class File Pin
N a v a n e e t h3-Aug-07 22:58
N a v a n e e t h3-Aug-07 22:58 
AnswerRe: Session Checking In Class File Pin
Nicejith4-Aug-07 0:35
Nicejith4-Aug-07 0:35 
GeneralRe: Session Checking In Class File Pin
N a v a n e e t h4-Aug-07 0:43
N a v a n e e t h4-Aug-07 0:43 
AnswerRe: Session Checking In Class File Pin
_mubashir4-Aug-07 0:41
_mubashir4-Aug-07 0:41 
GeneralRe: Session Checking In Class File Pin
N a v a n e e t h4-Aug-07 0:47
N a v a n e e t h4-Aug-07 0:47 
QuestionDisplaying Binary data with Response.Write() [modified] Pin
ASPnoob3-Aug-07 22:19
ASPnoob3-Aug-07 22:19 
AnswerRe: Displaying Binary data with Response.Write() Pin
Christian Graus3-Aug-07 22:24
protectorChristian Graus3-Aug-07 22:24 
GeneralRe: Displaying Binary data with Response.Write() [modified] Pin
ASPnoob3-Aug-07 22:54
ASPnoob3-Aug-07 22:54 
GeneralRe: Displaying Binary data with Response.Write() Pin
Christian Graus4-Aug-07 0:45
protectorChristian Graus4-Aug-07 0:45 
QuestionOut of memory or system resources problem Pin
pjc*3-Aug-07 22:14
pjc*3-Aug-07 22:14 
QuestionImage gallery Pin
Vipin.d3-Aug-07 21:28
Vipin.d3-Aug-07 21:28 

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.