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
10
Adding New row in webcombo inside Ultrawebgrid
posted

Hi,

I am trying to add new row in webcombo thru javascript. Webcombo is inside  Ultrawebgrid.

Ultrawebgrid is inside WARP and all these controls are part of User Control which is loaded dynamically.

I was using the same code given at http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=7700

In Page_Load og User Control:

Infragistics.WebUI.UltraWebGrid.UltraWebGrid comboGrid = (Infragistics.WebUI.UltraWebGrid.UltraWebGrid) this.WebCombo1.Controls[0];
if(comboGrid != null)
{
    comboGrid.DisplayLayout.AllowAddNewDefault = Infragistics.WebUI.UltraWebGrid.AllowAddNew.Yes;
    comboGrid.DisplayLayout.AllowUpdateDefault = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes;
}

In BLOCKED SCRIPT

function AddNewRow()
{
    var cbo = igcmbo_getComboById('WebCombo1');
    var row = igtbl_addNew(cbo.grid.Id, 0);
    row.getCell(0).setValue(11);
    row.getCell(1).setValue("Name11");
    row.getCell(2).setValue(new Date());
}

I am able to get combo object cbo. But igtbl_addNew(cbo.grid.Id, 0)always returns me null.

If I try this code on normal webform, it works fine.

Please help.

 

Thanks & Regards,

Rasika.