Populating the values of subsequent columns in an Infragistics UltraWebGrid, based on the first column's selected value in a ValueList/Dropdownlist

I'm using a Infragistics UltraWebGrid.  I have a couple of columns in a grid, the first column has a dropdownlist in it.  When the user adds a new row, the row is empty which is correct, i want all the columns of the new row to be populated with the first column's default data which is found in it.

Steps that the user will perform when adding a new row to the grid:
1)  The user adds a new row to the grid, the row is now empty.
2)  The user clicks on the first column of new row, and dropdown appears with customer items.
3)  The user selects an cutomer item in the dropdown.
4)  After he selected an item from the dropdown, the rest of the columns must display the customer's default data, like CustomerID, Address, Telephone, etc based on the selected item.

The dropdown/valuelist is already populated in the new row, I don't know what event to use, to fill the subsequent columns based on the value of the first columns dropdownlist after the user chose an item.  The grid's "AddRow" event is not sufficient since this only gets fired once the user entered all the data and moves to another row, and in order for the user to add the data, he needs the default data in the cells, and then he can modify it.

I've considered using the Dropdownlist's "SelectedIndexChanged" event, but since the user is busy adding a new row, there is no way for me to find the new row being added, because the "code" does not know of this new row yet.

The dropdownlist in the first Column is a WebCombo control also from infragistrics.  So this will allow me to add all the neccessary customer data in it, since it is has a multicolumn grid.

I have seen some solutions solving this using a UltraWinGrid which is the Window Application version of Infragistics, but not for an UltraWebGrid which is used in ASP.Net.

I envision that some javascript will be neccessary to perform the following:
1) Find the selected row in the first columns dropdownlist
2) Get all the default data stored in that selected row (Since this is a row of a multicolumn grid)
3) Display the values in the the subsequent columns.

When the user finished with editing the default values, he can click on another row, and i can use the "AddRow" event to find all the data that he entered and submit it to my dataset.

I'm new to using the Infragistics control suite, and can't seem to find any good code references and solutions to programming questions.

thanks
Caroline_SwartAsked:
Who is Participating?
 
itsmeandnobodyelseConnect With a Mentor Commented:
I mean that if you can handle an event like SelectedIndexChanged that there are methods to find out which row and column the active combobox currently has. Normally this information was passed to the handler (or a handle was passed which could be used for a query).
0
 
itsmeandnobodyelseCommented:
>>>> I've considered using the Dropdownlist's "SelectedIndexChanged" event,
>>>> but since the user is busy adding a new row, there is no way for me to
>>>> find the new row being added, because the "code" does not know of this new row yet.

That seems a wrong conclusion for me. I don't know where the user added the new row but most likely it is below the other rows. Hence, retrieving the count of rows from the grid would tell you where the the new row was added. Moreover, when handling Dropdownlist's "SelectedIndexChanged", there will be methods - unfortunately I don't know UltraWebGrid but any grid would provide such methods - to find out where the current drop-down control was located within the grid. S, in any case you would be able to find out whether it was the new empty row hwhere the drop-down was made or whether it was a change for any of the other rows.

0
 
Caroline_SwartAuthor Commented:
You are correct that the new row gets added beneath the existing rows. The UltraWebGrid gives you almost the same functionality as the "grids" used in access, if you click on the last empty row, it inserts a new row into the grid.  However this new row gets added client side, so the server does not yet know that the row exists - Now i don't know if this is where my problem is - maybe the server does know, and it's me who don't know what method to use..

I was considering Javascript since the row was added clientside. I don't understand what you mean by "there will be methods - unfortunately I don't know UltraWebGrid but any grid would provide such methods - to find out where the current drop-down control was located within the grid", if you can maybe be more specific.

0
 
Caroline_SwartAuthor Commented:
thanks i never thought of that
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.