473,698 Members | 2,635 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hi conversion piece of code data grid to grid view

7 New Member
Hi,

i am tried to convert below piece of code from data grid to grid view.
since grid view is not having item created event so i try to implement with row Created. i am unable to perform whole thing.


protected void dg_ItemCreated( object sender, DataGridItemEve ntArgs e)
{
switch (e.Item.ItemTyp e)
{
case ListItemType.Pa ger:
{
foreach (Control c in e.Item.Cells[0].Controls)
{
if (c is LinkButton)
{
LinkButton lb = c as LinkButton;
lb.OnClientClic k = "alert('you clicked this linkbutton');";
lb.CausesValida tion = true;
lb.ValidationGr oup = "valGrp";
}
}
break;
}
}
}


can any one know how to do it?
please help me
by
Nithi.
Feb 5 '08 #1
2 1293
radcaesar
759 Recognized Expert Contributor
RowCreated is for GridView only and ItemCreated for DataList, DetailsView, SiteMapPath, DataGrid, FormView, Repeater, ListView controls.

What is the problem you face with RowCreated ?
Feb 5 '08 #2
poornimanithya76
7 New Member
RowCreated is for GridView only and ItemCreated for DataList, DetailsView, SiteMapPath, DataGrid, FormView, Repeater, ListView controls.

What is the problem you face with RowCreated ?
i am unable to take link button collectuion present in grid view paging?
Feb 5 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
4116
by: Mike N. | last post by:
Hello to all: First let me apologize for the length of this question, I've made an attempt to include as much information as is needed to help with the question. I am having problems putting together a query to pull out an alternative hierarchical view of my data. The database is implemented under SQL Sever 2000 and I am writing the front end using VB.Net and ADO.net. The following is the portion of my database structure that I am...
3
1929
by: BigMan | last post by:
Here is a piece of code: #include <memory> using namespace std; template< typename SomeType > void f(auto_ptr_ref< SomeType >) { }
6
5507
by: Paolo Pignatelli | last post by:
I have an aspx code behind page that goes something like this in the HTML view: <asp:HyperLink id=HyperLink1 runat="server" NavigateUrl='<%#"mailto:" &amp; DataBinder.Eval(Container.DataItem,"StoreEmail") &amp; "&amp;Subject=" &amp; DataBinder.Eval(Container.DataItem,"ProductName") ....
7
1422
by: Brian Henry | last post by:
Ok how do I fix this... it worked in ASP.NET 1.1, in 2.0 it says Error 3 Option Strict On disallows implicit conversions from 'Object' to 'String'. here is the part of code it is giving this error on, its an item template from a data grid... the line that has the error underlined is "<%#Eval("filename")%>" which use to be <%#DataBinder.Eval(Container,DataItem,"filename")%> but in ASP.NET 2.0 you can shorten it to just eval of...
13
4175
by: nyt | last post by:
I have a problem of number and text field. I got the database file(mdb) that contains many combo boxes used and its list values are created by "value list" For eg field Field name= 'furniture' , data type='Number' ,Display Control='Combo Box', RowSource Type = 'Value List' and Row Source = ' 0;"chair";1;"Table";2;"Bed" ' Therefore, in data sheet view of table, if we select (1 : Table ) ,
2
1864
by: Stephan (Germany) | last post by:
Hello, maybe this qustion sounds silly but in VS2005, I'm looking for the same possibilty to entry data for a predefined XML schema in grid view. In VS2003, you were able to do it if you simply set the target schema of your new XML file (which contains nothing besides the xml version line) and switch to data view. This simple way of data entry seems to be gone in VS2005, or is it hidden somewhere else?
0
1598
by: zafar | last post by:
I don't know what property should be used for hiding colums in Data Grid, whereas in Data Grid View we have DataGridView1.Colums(index).Visible = False , But how can I hide Colums in Data Grid.. Secondly Can I make multiple bands in Data Grid View, mean parent and child table appearance in Data Grid View, If so then how.. because when I pass a DataSet (which have relationships between the table in it) to data grid view it only shows the...
0
2113
by: ronysk | last post by:
Hi, I am posting here to seek for help on type conversion between Python (Numeric Python) and C. Attachment A is a math function written in C, which is called by a Python program. I had studied SWIG and Python/C API a bit. I was able to pass numeric array (Numeric Python) into the C function and access/change these arrays. Problem I am having is that I couldn't quite get the array converted back to some PyObject or something that...
6
2942
by: insirawali | last post by:
Hi all, I have this problem, i need to know is there a way i cn use the data adapter's update method in this scenario. i have 3 tables as below create table table1{ id1 int identity(1,1) Constraint pk_table1 Primary Key,
0
8683
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8610
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8902
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7740
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4623
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.