Netnoobie
Well-known member
This might be hard to explain, but Ill try the best I can.
I have a DataGrid that can contain X number of rows. Going into the edit mode, three dropdown lists also have an INPUT box associated with them for use (for the most part) with Dennis Wests "fastkey" method (http://www.aspalliance.com/dotnetsolutions/Article2tmpl.aspx).
The problem Im having is that in the HTML portion of the page I create the INPUT box and assign the KeyUp event to go to the JScript function like:
Now you can see that in creating this even I have to tell the INPUT what item is getting passed into the function (DataGrid__control_DDL). This is where the problem is. The entire thing works great for the first row because I have told the INPUT to go to the first row. However, any row after that fails because I need to be at row 3 (ctl3), for example, and the INPUT is still looking at the hard coded row and item.
My question is, how can I create a way for the INPUT code to increment for each row created. This would give me the way to have the ctl numbers reflect the DataGrid rows in which they are tied to.
Im not sure thats a good explanation, so I can go into more detail if needed. I just cant seem to think of a way in which I can create the INPUTS for each item and have the ctl number reflect the proper DataGrid row that I need.
If you have done anything like this please let me know. I just need to be pointed in the right direction because Im just spinning my wheels on this right now.
Many Thanks!
Bryan
I have a DataGrid that can contain X number of rows. Going into the edit mode, three dropdown lists also have an INPUT box associated with them for use (for the most part) with Dennis Wests "fastkey" method (http://www.aspalliance.com/dotnetsolutions/Article2tmpl.aspx).
The problem Im having is that in the HTML portion of the page I create the INPUT box and assign the KeyUp event to go to the JScript function like:
Code:
<EditItemTemplate>
<INPUT type="text" ID="txtfind" name="txtfind" size="9" [b]onKeyUp="findText(this, DataGrid1__[i]ctl2_[/i]selContainerName);"[/b]>
<asp: DropDownList id="selContainerName" [i]...rest of stuff...[/i] />
</EditItemTemplate>
Now you can see that in creating this even I have to tell the INPUT what item is getting passed into the function (DataGrid__control_DDL). This is where the problem is. The entire thing works great for the first row because I have told the INPUT to go to the first row. However, any row after that fails because I need to be at row 3 (ctl3), for example, and the INPUT is still looking at the hard coded row and item.
My question is, how can I create a way for the INPUT code to increment for each row created. This would give me the way to have the ctl numbers reflect the DataGrid rows in which they are tied to.
Im not sure thats a good explanation, so I can go into more detail if needed. I just cant seem to think of a way in which I can create the INPUTS for each item and have the ctl number reflect the proper DataGrid row that I need.
If you have done anything like this please let me know. I just need to be pointed in the right direction because Im just spinning my wheels on this right now.
Many Thanks!
Bryan