473,396 Members | 1,938 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,396 software developers and data experts.

RowCommand: accessing ObjectDataSource from inside gridview inside a repeater?

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?

Jul 3 '07 #1
1 4667
On Jul 4, 4:16 am, HockeyFan <les.stock...@gmail.comwrote:
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?
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

Jul 4 '07 #2

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

Similar topics

0
by: csockwell | last post by:
I love the objectdatasource conrtol but I'm having trouble using the paging controls. I'm trying to create a user control to which I can bind a objectdatasource control. I've been successful at...
0
by: Eiriken | last post by:
Hello everyone, I am using ASP.NET 2 and trying to bind a objectdatasource to a gridview. By doing this the most common way by adding an objectdatasource to the page and by using the wizard to...
1
by: Zule | last post by:
Hi, I am creating a Composite Control within which I have a GridView. In this GridView, I have three TemplateFields, the last one being a template with a LinkButton which is meant to be clicked...
0
by: Dom | last post by:
Hello This should work I know ... but.. with your help perhaps.. Trying to assign a 'selectparameter' to an objectdatasource nested within a gridview EditItemTemplate. When I try to access...
6
by: Kevin Attard | last post by:
I am using a GridView inside a UserControl which has a template column for deleting the rows. Before databinding the gridview i am attaching the RowCommand and RowDataBound event. I am using the...
5
by: Randy Smith | last post by:
Hi ALL, I wonder if anyone has been using n-tier to bind to a GridView control by using the ObjectDataSource. This is our first OOP web application, and we have no tables. Right now we are...
7
by: =?Utf-8?B?cGF0cmlja2RyZA==?= | last post by:
Hi all! I have a gridview inside a datagrid (nested) for which (gridview) the rowcommand is not raised in order to delete a row from the grid! I also tried OnRowCommand="method", didn't work...
0
by: Phillip Ian | last post by:
Tried this over in CSharp.General and didn't get anything, so I thought I'd try again here. If there's an AJAX specific group I could ask this in, please let me know...I did look. I'm trying to...
0
by: jrnail23 | last post by:
I have a user control which contains an UpdatePanel, which contains a MultiView inside, with a GridView in one of the views. In my GridView, I have a ButtonField which is supposed to trigger a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.