Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datagrid client-side problem

Status
Not open for further replies.

jrl237

IS-IT--Management
Joined
Jan 29, 2002
Messages
61
Location
US
I have a datagrid that has two templated columns. One is a label containing the RecordID, and the other is a checkbox. On the same page I also have a textbox. Ideally, the user would be able to enter the RecordID into the textbox and client-side script would set the corresponding checkbox.

I have this almost working, but for one item. I do not know how to tell how many rows are in the datagrid. I check the value of the label in a for loop. If the value matches what's in the textbox, I can set the checkbox. I just don't know when to stop.

I realize this is really a client-side scripting problem, but I thought someone who has worked with datagrids may have done this before. Can anyone explain this to me or point me to a good tutorial?

Any help would be greatly appreciated.

Thanks,

jrl
 
Is there any particular reason you want to do this client side? If not, you could do it in the ItemCreated event.

You would just see what the Text was in Cell 1 and if it matched what the user typed in, set the checkbox in Cell 2 to be checked.

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
You need to get the prefix of the Id of the labels somehow and it should increment the ID value. you can then test if a valid object exists with the next ID and if not stop looping.

I don't know just a guess.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top