943,948 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Marked Solved
  • Views: 2536
  • ASP.NET RSS
You are currently viewing page 1 of this multi-page discussion thread
Jun 17th, 2009
0

Select Datagrid row

Expand Post »
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
Similar Threads
Reputation Points: 26
Solved Threads: 19
Posting Whiz in Training
Traicey is offline Offline
283 posts
since Mar 2008
Jun 17th, 2009
0

Re: Select Datagrid row

use 2 forms in any 2 cells and use Delete query.
Reputation Points: 2
Solved Threads: 4
Junior Poster in Training
furqan219 is offline Offline
89 posts
since Jun 2009
Jun 17th, 2009
0

Re: Select Datagrid row

And just how do u do that?
Reputation Points: 26
Solved Threads: 19
Posting Whiz in Training
Traicey is offline Offline
283 posts
since Mar 2008
Jun 18th, 2009
0

Re: Select Datagrid row

why dont you add check boxes in the datagrid? for the rows whose checkboxes are checked, highlight the row
Reputation Points: 10
Solved Threads: 12
Posting Whiz in Training
carobee is offline Offline
209 posts
since Dec 2007
Jun 18th, 2009
0

Re: Select Datagrid row

>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.
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008
Jun 18th, 2009
0

Re: Select Datagrid row

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
Reputation Points: 26
Solved Threads: 19
Posting Whiz in Training
Traicey is offline Offline
283 posts
since Mar 2008
Jun 18th, 2009
0

Re: Select Datagrid row

Great! but where is your problem? I think you are unable to code. Isn't it?
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008
Jun 19th, 2009
0

Re: Select Datagrid row

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
Reputation Points: 26
Solved Threads: 19
Posting Whiz in Training
Traicey is offline Offline
283 posts
since Mar 2008
Jun 19th, 2009
0

Re: Select Datagrid row

If you zip your code and upload it to this thread so I can help you.
Moderator
Reputation Points: 2136
Solved Threads: 1228
Posting Genius
adatapost is offline Offline
6,527 posts
since Oct 2008
Jun 19th, 2009
0

Re: Select Datagrid row

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
Reputation Points: 26
Solved Threads: 19
Posting Whiz in Training
Traicey is offline Offline
283 posts
since Mar 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: login page .reader(visual basic)
Next Thread in ASP.NET Forum Timeline: hello ppl ....!!!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC