Select Datagrid row

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Mar 2008
Posts: 268
Reputation: Traicey is an unknown quantity at this point 
Solved Threads: 19
Traicey's Avatar
Traicey Traicey is offline Offline
Posting Whiz in Training

Select Datagrid row

 
0
  #1
Jun 17th, 2009
Hey Guys

I need to be able to select or hightlight datagrid row when a user place a mouse on certain record then, he/she can be able to click delete or edit button to delete the selected row or edit the selected row, can anyone tell me how to do that coz I cant select rows on my datagrid, in there anycode or property I need to set

Thanks in advance
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 64
Reputation: furqan219 has a little shameless behaviour in the past 
Solved Threads: 4
furqan219 furqan219 is offline Offline
Junior Poster in Training

Re: Select Datagrid row

 
0
  #2
Jun 17th, 2009
use 2 forms in any 2 cells and use Delete query.
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 268
Reputation: Traicey is an unknown quantity at this point 
Solved Threads: 19
Traicey's Avatar
Traicey Traicey is offline Offline
Posting Whiz in Training

Re: Select Datagrid row

 
0
  #3
Jun 17th, 2009
And just how do u do that?
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 205
Reputation: carobee is an unknown quantity at this point 
Solved Threads: 11
carobee carobee is offline Offline
Posting Whiz in Training

Re: Select Datagrid row

 
0
  #4
Jun 18th, 2009
why dont you add check boxes in the datagrid? for the rows whose checkboxes are checked, highlight the row
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,605
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 460
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: Select Datagrid row

 
0
  #5
Jun 18th, 2009
>I cant select rows on my datagrid..
Your data source might be empty or you disabled the datagrid or you haven't place select button.

Which version of .net framework are you using? If you code then show us.
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 268
Reputation: Traicey is an unknown quantity at this point 
Solved Threads: 19
Traicey's Avatar
Traicey Traicey is offline Offline
Posting Whiz in Training

Re: Select Datagrid row

 
0
  #6
Jun 18th, 2009
Its VS 2008, what I am doing is I am binding a table from Oracle to a datagrid and I wana be able to select/highlight a row from a datagrid and transfer the data from the selected row to another form where I can be able to edit the record and save and it is updated to the database again

for example on my datagrid, I have Name, Surname, DOB, City, etc and then I have a editwebform that is editing those attributes, in this editwebform I have NameTextbox, surnameTextbox, etc and I want to select the row on the datagrid and click edit button and edit button should open my editwebform with the data of the selected record then I can edit the record and save it and bind the datagrid again, I hope thats clear
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,605
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 460
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: Select Datagrid row

 
0
  #7
Jun 18th, 2009
Great! but where is your problem? I think you are unable to code. Isn't it?
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 268
Reputation: Traicey is an unknown quantity at this point 
Solved Threads: 19
Traicey's Avatar
Traicey Traicey is offline Offline
Posting Whiz in Training

Re: Select Datagrid row

 
0
  #8
Jun 19th, 2009
Yah ur right why I didnt think about that, I actually am, but I can write a code to edit and get the data from database what Im struggling to do is to make sure that the row is selected from the datagrid and only the values from the datagrid are brought foward to the edit form
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 2,605
Reputation: adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of adatapost has much to be proud of 
Solved Threads: 460
Moderator
adatapost's Avatar
adatapost adatapost is offline Offline
Posting Maven

Re: Select Datagrid row

 
0
  #9
Jun 19th, 2009
If you zip your code and upload it to this thread so I can help you.
Failure is not fatal, but failure to change might be. - John Wooden
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 268
Reputation: Traicey is an unknown quantity at this point 
Solved Threads: 19
Traicey's Avatar
Traicey Traicey is offline Offline
Posting Whiz in Training

Re: Select Datagrid row

 
0
  #10
Jun 19th, 2009
Well my code is in my laptop at home and at work w r using sql server whereas I used oracle for my project, coz I know in SQL is much easier than it is in Oracle, i could do it in SQL but in Oracle its quite a mission n the only reason I used oracle for my project is bcoz it was the only software I cud get hold of without any complications

What Im thinking is Im gona have a selectbutton on my DataGrid and then have a selectbuttoncommand which is gona be uploading the selected record on my edit form, but my problem is, I havent tried it, is it possible for a editcommandbutton in datagrid, or selectcommandbutton to open another form, I think it it but I will get back to u if I have trouble doing that

Thanks hey
Some people get so rich they lose all respect for humanity. That's how rich I want to be.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC