Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
Add New Row: Populate columns based on a selected column
posted

Hi evryone,

 I am facing this problem from quite some time Please help me out.

 I have a Page with a webgrid i have 5 columns 2 uneditable and 3 are populated with dropdowns on selection of an employee from the first dropdown i have to populate his name and his job description in the remaining two columns.

I am using this in the javascript to update the cell but i couldnt figure out how to do . 

function cellUpdate(gridID, valueListID, cellID) 

     {

 var col = igtbl_getColumnById(cellID);

if (col.Key != "Personal_Number") return;

var list = igtbl_getElementById(valueListID);

 var row = igtbl_getRowById(cellID);

var name=list.selectedIndex.innerText;

 if (row != null)

 {alert("Hello");

 row.getCell(49).setValue(name); row.getCell(51).setValue(name);

 } }

so i Want to set cell 49 and 51 with the respective values but i dont know how to do it .

I also have another idea to open a popup window as a button is clicked in the grid and in the popup am going to show the grid where they can select a Row and on double click I thought i wud capture that data in a hidden variable and close the popup and reload the opener but as i reload the opener the hidden variable is gone and the value cannot be persisted .

Also if anybody know how to assign a value to a a ultrawebgrid column in the child window which is present in the parent window , please post their comments.

Please Help me out from this situation either one of the methods any help would be kindly appreciated.

 

Thanks in Advance.

Krishna.

Parents
No Data
Reply
  • 28464
    posted

    Hello,

    I think there an online example that is very close to what you need - three column grid, three combos in each column that are related -- selection of second depends on selection of first, selection of third depends on the second.

    The example (with full C# / VB.NET source code) is located here.

    Hope this helps.

Children