Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


hi i have a problem regarding to datagrid in aspdotnet.i
have a datagrid in my application.i have to place
add,edit,delete buttons or links what ever it may be.
now the problem is if i click on add button then the page
has to redirected to another form called "xyz.aspx" and if
i click on edit button the page has to redirected to
another form called "abc.aspx".i am phasing the problem
that if where ever i click on the datagrid the cursor goes
to gv1_SelectedIndexChanged event.please tell me the
solution about the code.

Answers were Sorted based on User's Feedback



hi i have a problem regarding to datagrid in aspdotnet.i have a datagrid in my application.i have ..

Answer / anant anand gupta

You can use the ItemCommand event of the datagrid.
give each command button a 'CommandName'
And 'CommandArgument' if required. CommandArgument you can
assign at the time of ItemDataBound (or RowDataBound) event
of the DataGrid. In the event handler method you can check
for the command name and perform the required task.

Is This Answer Correct ?    2 Yes 0 No

hi i have a problem regarding to datagrid in aspdotnet.i have a datagrid in my application.i have ..

Answer / vipal

For this grid have item bound property. in that you find
the control linkbutton used for add. And register script
for add button click event and call javascript function and
use window.location to redirect to the new page xyz.aspx.

protected void DataGrid_itemBound(Sender s,EventArgs e)
{
LinkButton LnkBtn = (LinkButton)DataGrid.item.FindControl
("LnkAdd");
LnkBtn.Attributes.Add("onclick","OpenNewPage();");
}

---in aspx page use script---
function OpenNewPage()
{
window.location = "xyz.aspx";
}

similarly find link button for edit and follow same process

Is This Answer Correct ?    0 Yes 0 No

hi i have a problem regarding to datagrid in aspdotnet.i have a datagrid in my application.i have ..

Answer / sasireddy

Hey,

There is one more option do that.i.e. Take one
Tepletecolumn,in that u should like this

<asp:TemplateColumn HeaderText="Add/Edit/Delete">

<ItemTemplate>

<font face="verdan" size="2"><a href="Add.aspx"
runat="server" ID="A1">Add</a>&nbsp;&nbsp;<a
href="Edit.aspx" runat="server"
ID="A2">Edit</a>&nbsp;&nbsp;<a href="Delete.aspx"
runat="server" ID="A3">Delete</a>

</font>

</ItemTemplate>

</asp:TemplateColumn>

from this you can do Process.......

Is This Answer Correct ?    0 Yes 0 No

hi i have a problem regarding to datagrid in aspdotnet.i have a datagrid in my application.i have ..

Answer / sudhir kunnure

Just i want to say you that remove server side code for
page redirect when link click instead that write client
side code.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

Define transparent caching with aop?

0 Answers  


What is latest version of asp.net mvc? : Asp.Net MVC

0 Answers  


What is a swagger in web api?

0 Answers  


What is view state and use of it ?

1 Answers  


What is difference between ispostback and autopostback in asp net?

0 Answers  


Is it possible for me to change my aspx file extension to some other name?

0 Answers  


What is X-Path?

2 Answers   Sherston,


How to manage different kinds of sessions in ASP.NET?

0 Answers   Cap Gemini,


1.what is the application pool. 2.what is the HttpModile and Http Handler. 3.C# 3.0 Features ? 4.Anonoymous Type,methopd and claas in 3.0? 5.difference between statsic and const ? 6.session vs application 7.state management clint side and server side ? 8.Genric list 9.c# 3.0 vs 3.5

0 Answers   TCS,


Describe Segmentation With Paging?

0 Answers   MaxSolPro,


when user is logged on the information is saved in a cookie, what is the name of that cookie?

5 Answers   Mind Tree,


What is Fragment Caching in ASP.NET?

2 Answers   MCN Solutions, pspl, Wipro,


Categories