473,387 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Datagrid ItemCreated happens Before Postback???

Hi! I'm so confused right now..

I have a Page that load a datagrid with a a bunch of radiobuttons in three
columns which are then checkes or uncheck in the ItemCreated.(it's supposed
to be a permission setting for different things in my application)
There is a save button on the page to save the permissions set in the grid.

The BindGrid() is called if it is NOT a postback in the PageLoad.

Then, in debugging, when the User presses the Save button update the
permissions, for some reason.. the ItemCreated is breaking before I have
even gotten to the PageLoad... and in there the Radiobuttons are set so that
the radiobutton for "no access" is checked, this means the selection of
Radiobuttons the user made is overwritten.

THEN is goes to the PageLoad and THEN is updates the Permissions... thru the
btnSave_Click()

Why on Earth is the ItemCreated Happening before the PageLoad...??? I see no
point in this and is there a way to stop it from happening?

Best Regards/
Lars
Nov 18 '05 #1
1 1359
I believe I fought with this before too. I think I moved my stuff to the
ItemDataBound event to make it happy.

Greg

"Lars Netzel" <[stop_spam]@host.topdomain> wrote in message
news:ev***************@TK2MSFTNGP14.phx.gbl...
Hi! I'm so confused right now..

I have a Page that load a datagrid with a a bunch of radiobuttons in three
columns which are then checkes or uncheck in the ItemCreated.(it's
supposed
to be a permission setting for different things in my application)
There is a save button on the page to save the permissions set in the
grid.

The BindGrid() is called if it is NOT a postback in the PageLoad.

Then, in debugging, when the User presses the Save button update the
permissions, for some reason.. the ItemCreated is breaking before I have
even gotten to the PageLoad... and in there the Radiobuttons are set so
that
the radiobutton for "no access" is checked, this means the selection of
Radiobuttons the user made is overwritten.

THEN is goes to the PageLoad and THEN is updates the Permissions... thru
the
btnSave_Click()

Why on Earth is the ItemCreated Happening before the PageLoad...??? I see
no
point in this and is there a way to stop it from happening?

Best Regards/
Lars

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: vinayak | last post by:
Hi I am displaying data in Datagrid in ASP.NET with Edit/Update functionality for each row. On the same page I have 2 Button controls which submits the request to server. These button controls...
2
by: Jason | last post by:
I have a datagrid inside a user control. I use the itemcreated event to manipulate column values. I then add those values up and place the total in the footer of the datagrid. I have wrapped the...
2
by: kgs | last post by:
I dynamically added a DropDownListBox to a footer of datagrid on itemcreated event. In which event in postback can i access the selected item. Interesting thing i noted that even though i create...
2
by: Bruce W.1 | last post by:
There's something I can't figure out. I added some javascript behavior to my datagrid, just like in this article, except in C# instead of VB: ...
9
by: Manuel | last post by:
I have a Datagrid with 9 elements. The problem is that when I sort the grid by a column, it present more columns than there are. This is my code for the ItemCreated event: Private pNo As...
1
by: wh1974 | last post by:
I'm not sure if i'm heading in the right direction so would appreciate any comments on what I'm trying to do. Basically I have a DataGrid on a page which has columns whose width's I set in the...
5
by: Richard Myers | last post by:
Hello I have a datagrid that has a TemplatedColumn containing a dropdown list (DDL). This DDL is filled for each datagrid row via the itemcreated created event. The first time i postback none...
9
by: Steve | last post by:
How I can remove an AutoGenerated column? I wnat to inlcude the primary key in the resultset for creating some custom LinkButtons, but I don't want it (the PK) displayed in the DataGrid. I tried...
2
by: DC | last post by:
Hi, I am doing something like this in the ItemCreated event (ASP.Net 1.1): DataGridItem pagerRow = e.Item; TableCell pagerCell = pagerRow.Cells; Control addedControl = new Control();...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.