CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 4/7/2004 1:14:06 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 4 Views: 62 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
5 Items, 1 Pages 1 |< << Go >> >|
Scotty Boy
Asp.Net User
Custom Control for DataGrid. OnSelectedIndexChanged event problem.4/7/2004 1:14:06 PM

0/0

Hi All,

I am currently developing a custom control to encapsulate the DataGrid. All was going smooth (ish) until I tried to override the OnSelectedIndexChanged event.
For some reason, this event just does NOT fire.

FYI:
The first column is a select column.
Paging events are working fine.
Sorting events are working fine.

Any ideas?
Kind regards
Scott
joteke
Asp.Net User
Re: Custom Control for DataGrid. OnSelectedIndexChanged event problem.4/8/2004 7:16:34 PM

0/0

Did you really try to override the event, or just override the OnSelectedIndexChange method which is used to raise the event?
Thanks,

Teemu Keiski
Finland, EU
scotty boy
Asp.Net User
Re: Custom Control for DataGrid. OnSelectedIndexChanged event problem.4/8/2004 7:30:21 PM

0/0

Hi joteke - thanks for your reply.

In the class of my Custom Control i tried using the following code:

protected override void OnSelectedIndexChanged(EventArgs e)
{
base.OnSelectedIndexChanged (e);
... my code ...
}

any ideas?
kind regards
Scott
joteke
Asp.Net User
Re: Custom Control for DataGrid. OnSelectedIndexChanged event problem.4/8/2004 7:44:14 PM

0/0

And you inherit from the DataGrid. Post some more code to show what you are doing.
Thanks,

Teemu Keiski
Finland, EU
scotty boy
Asp.Net User
Re: Custom Control for DataGrid. OnSelectedIndexChanged event problem.4/8/2004 7:59:08 PM

0/0

Hi joteke - thanks for your reply.

Custom Control
*************

namespace DataGridDisplay
{
// A delegate type for hooking up change notifications.
public delegate void DataGridSelectedIndexChanged(object sender, EventArgs e);

public class Display : System.Web.UI.WebControls.DataGrid
{ ...

/// <summary>
/// Public method to allow the binding of data to the grid.
/// After the caller has set all the relevant properties, this method should be called to bind the data.
/// This method calls out to private methods to perform the processing.
/// </summary>
public void BindTheDataGrid()
{ ...works fine ...}

#region Paging Event
/// <summary>
/// Handles the event when the user clicks paging.
/// </summary>
/// <param name="e">DataGridPageChangedEventArgs e Standard System argument</param>
protected override void OnPageIndexChanged(DataGridPageChangedEventArgs e)
{
// Clear any selections
this.SelectedIndex=-1;

// Assign the DataGrid page to the clicked number
this.CurrentPageIndex = e.NewPageIndex;

// Rebind the data to the DataGrid
BindDataGrid();
}

#endregion // Paging Event

protected override void OnSelectedIndexChanged(EventArgs e)
{
base.OnSelectedIndexChanged (e);
... now i would like to capture when the SelectedIndex changes ...
}

} // End class Display

A cut down snippet. As you can see, the OnPageIndexChanged override is working fine. I would like to perform some processing when the user changes their row selection. But the SelectedIndexChanged is just NOT firing.

The custom control is placed on a webform.

any ideas?
kind regards
Scott
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning Visual Web Programming in VB .NET: From Novice to Professional Authors: Daniel Cazzulino, Craig Bowes, Victor Garcia Aprea, Mike Clark, James Greenwood, Chris Hart, Pages: 648, Published: 2005
ADO.NET Cookbook Authors: Bill Hamilton, Pages: 605, Published: 2003
OOP: Building Reusable Components with Microsoft Visual Basic . NET Authors: Ken Spencer, Tom Eberhard, John Alexander, Pages: 500, Published: 2002
ASP.NET Website Programming: Problem - Design - Solution Authors: Marco Bellinaso, Kevin Hoffman, Pages: 576, Published: 2002
The Definitive Guide to the .NET Compact Framework Authors: Larry Roof, Dan Fergus, Pages: 1009, Published: 2003
Programming ASP.NET: Building Web Applications and Services Using C and VB.NET. Authors: Jesse Liberty, Dan Hurwitz, Pages: 988, Published: 2003
Building an ASP.NET Intranet Authors: Jonathon Walsh, Kourosh Ardestani, Matt Gibbs, Chandu Thota, Chad Hutchison, Brian Patterson, John Roth, Brian Boyce, Andy Elmhorst, Saurabh Nandu, Pages: 460, Published: 2002

Web:
selectedindexchanged event not firing in custom control derived ... Jun 28, 2006 ... I am adding a row of dropdownlist controls to my datagrid in a custom control - i am adding a selectedindexchanged event to each of these ...
Web Custom Control - Datagrid Event Handling Problem - .NET VB Web Custom Control - Datagrid Event Handling Problem. ... Private Sub DataGrid1 SelectedIndexChanged(ByVal source As Object, ...
Cutting Edge: Build a Variety of Custom Controls Based on the ... The custom DataGrid would have to expose two new properties; let's call them .... The code that does this runs after the SelectedIndexChanged event fires. ...
DataGrid Foreign Event Handling Events like OnSelectedIndexChanged found in controls like the RadioButtonList and CheckBoxList can't be wired into the ItemCommand event of the Datagrid. ...
How to access datagrid seleted index change event inside an ... Create the DataGrid and its SelectedIndexChanged event outside, .... Silverlight : Skinnable Custom Controls – Change to generic.xaml ...
CodeProject: Handling events of child controls inside a DataGrid ... How to hook up on an event of a web control residing inside a DataGrid ... when the DataGrid was a part of the user custom control and that user control was ...
RE: How to capture SelectedIndexchanged event of dropdownlist in Datag OnSelectedIndexChanged (e); } #endregion } The RaiseBubbleEvent methods allows you to propagate the Command event to the DataGrid control ...
Re: RE: Where to write event for dropdownlist in d: msg#00031 My problem is because the second dropdownlist control is created > dynamically in a datagrid I cannot directly reference the > selectedindexchanged event. ...
CodeProject: How to place a DropDownList in DataGrid and fire ... How to place a DropDownList in DataGrid and fire SelectedIndexChanged for each .... To handle the event of that control, you have to write a procedure which ...
Custom build DataGridColumn event problem - .NET ASP might create each as separate control inherited from the datagrid and have to bubble events from the child grid to the parent and then from ...




Search This Site:










search algorithm with suggestions (imdb like)

aspx page that acts like a web server?

error [im006] [microsoft][odbc driver manager] driver's sqlsetconnectattr failed

what happened to the style wizard in visual web developer 2008?

non-vs.net development enviroment.

vb image upload / download mssql server

where are roles stored?

xml - xslt transformations

asp 2.0 - final release?

e-commerce security

debug global.asax

need help

problem decrypting connection string on server

multiple module page refresh

really simple url/filename question...

time formats & substracting times

ajax ghost keeps adding <add assembly..... to my web.config file

server application unavailable

recreation of formview with imagebutton commands first, prev, next, last not working

checkboxlist / radiobuttonlist

curious why there is a portal skin and admin skin

help with single login across multiple asp websites

unable to enable cache notification for sql server

updating webparts between guest and login in user (personalisation)?

2 build errors on dnn3.0.10 - fresh install

folders in stored procedures folder pls help

no data display when run the form

user-based tabs

could not load type 'dotnetnuke.modules.announcements.announcements'

radiobutton ?

 
All Times Are GMT