Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

RowCommand: accessing ObjectDataSource from inside gridview inside a repeater?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
HockeyFan - 03 Jul 2007 23:16 GMT
protected void gvAuthorizedSigners_RowCommand(object sender,
GridViewCommandEventArgs e)
       {
           if (e.CommandName == "EmptyInsert")
           {
               odsAuthorizedSigners.Insert();
               return;
           }

           if (e.CommandName == "Insert")
           {
               odsAuthorizedSigners.Insert();
               return;
           }
       }

How do I findcontrol the ObjectDataSource for this gridview.
Normally, it wouldn't be necessary, but since this RowCommand event
can happen with any instance of the gridview, since that are multiples
(since it's inside a repeater), how do I find the ObjectDataSource?
Masudur - 04 Jul 2007 06:49 GMT
>         protected void gvAuthorizedSigners_RowCommand(object sender,
> GridViewCommandEventArgs e)
[quoted text clipped - 16 lines]
> can happen with any instance of the gridview, since that are multiples
> (since it's inside a repeater), how do I find the ObjectDataSource?

Hi...

According to your description ,, i can see that you have a repeater
control and inside the repeater control in item template you have a
gridview with objectdatasource... .("correct me if i am wront")...
when you clicked on  the grid you want to okay... if you can findgrid
view why not the objectdatasource then...
Gridview have a property named "DataSourceID" ... didn't you tried
that...

Thanks
Masudur
www.kaz.com.bd
http://munnacs.110mb.com

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.