IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Need some help with an ASP.Net form
I've created a Web page in ASP.Net that has a datagrid on it. The grid has two columns: one for an order number and the other is set up as an button. The grid displays 2000 numbers at one time, and has a parameter telling it to show 20 page number buttons in its footer.

I was having a problem getting the grid to correctly display sets of data for the blocks that appear on the 21st or higher page; however, the code properly reacted to the Click event when the user clicked on a button in the second column. That is, it went to the subroutine specified in the OnItemSelect="subroutine" parameter in the HTML for the grid definition.

I've discovered that I couldn't properly display the block of data above the 20th group because I had ViewStateEnable="False". Once I changed it to True pagination works fine. However, now when the user clicks on a button in the 2nd column (to select a specific order number) the code goes to the Page_Load event and appears to ignore the event of the button being clicked, meaning that it no longer goes to the OnItemSelect="subroutine" as before.

Suggestions as to why this is now occuring and how to get it to go to the subroutine listed in the OnItemSelect parameter?

Here's the grid definition is case it helps ("<" and ">" signs have been replaced by "[" and "]" characters):

[asp:datagrid id="GridTicketNumbers" style="Z-INDEX: 101; LEFT: 16px;
POSITION: absolute; TOP: 40px" runat="server"
OnPageIndexChanged="ChangeGridPage" PagerStyle-
HorizontalAlign="Left" AllowPaging="True"
\t\t AutoGenerateColumns="False" HorizontalAlign="Left"
Height="320px" Width="168px" EnableViewState="True"
\t\t AlternatingItemStyle-BackColor="#cccccc" itemstyle-
backcolor="#ffffff" HeaderStyle-BackColor="#cccc99"
\t\t HeaderStyle-Font-Bold="True"
OnItemCommand="GridTicketNumbers_ItemCommand"]
\t[columns]
\t\t[asp:BoundColumn HeaderText="Ticket Number"
DataField="TicketNumber"][/asp:BoundColumn]
\t\t[asp:ButtonColumn HeaderText="Select" Text="X"
CommandName="Select" ButtonType="PushButton"]
[/asp:ButtonColumn]
\t[/columns]
[/asp:datagrid]
lincoln

"Chicago to my mind was the only place to be. ... I above all liked the city because it was filled with people all a-bustle, and the clatter of hooves and carriages, and with delivery wagons and drays and peddlers and the boom and clank of freight trains. And when those black clouds came sailing in from the west, pouring thunderstorms upon us so that you couldn't hear the cries or curses of humankind, I liked that best of all. Chicago could stand up to the worst God had to offer. I understood why it was built--a place for trade, of course, with railroads and ships and so on, but mostly to give all of us a magnitude of defiance that is not provided by one house on the plains. And the plains is where those storms come from." -- E.L. Doctorow


Never apply a Star Trek solution to a Babylon 5 problem.


[link|mailto:bconnors@ev1.net|contact me]
Collapse Edited by lincoln Dec. 2, 2005, 09:22:44 AM EST
Need some help with an ASP.Net form
I've created a Web page in ASP.Net that has a datagrid on it. The grid has two columns: one for an order number and the other is set up as an button. The grid displays 2000 numbers at one time, and has a parameter telling it to show 20 page number buttons in its footer.

I was having a problem getting the grid to correctly display sets of data for the blocks that appear on the 21st or higher page; however, the code properly reacted to the Click event when the user clicked on a button in the second column. That is, it went to the subroutine specified in the OnItemSelect="subroutine" parameter in the HTML for the grid definition.

I've discovered that I couldn't properly display the block of data above the 20th group because I had ViewStateEnable="False". Once I changed it to True pagination works fine. However, now when the user clicks on a button in the 2nd column (to select a specific order number) the code goes to the Page_Load event and appears to ignore the event of the button being clicked, meaning that it no longer goes to the OnItemSelect="subroutine" as before.

Suggestions as to why this is now occuring and how to get it to go to the subroutine listed in the OnItemSelect parameter?
lincoln

"Chicago to my mind was the only place to be. ... I above all liked the city because it was filled with people all a-bustle, and the clatter of hooves and carriages, and with delivery wagons and drays and peddlers and the boom and clank of freight trains. And when those black clouds came sailing in from the west, pouring thunderstorms upon us so that you couldn't hear the cries or curses of humankind, I liked that best of all. Chicago could stand up to the worst God had to offer. I understood why it was built--a place for trade, of course, with railroads and ships and so on, but mostly to give all of us a magnitude of defiance that is not provided by one house on the plains. And the plains is where those storms come from." -- E.L. Doctorow


Never apply a Star Trek solution to a Babylon 5 problem.


[link|mailto:bconnors@ev1.net|contact me]
     Need some help with an ASP.Net form - (lincoln)

I promise you that if I am compelled to turn to the Dark Side on this issue you will come to yearn for the suave ripostes of CRConrad.
38 ms