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
275
Editing a UltraWebGrid(UWG) which is populated dynamically
posted

To all Infragistics GURU.

I am new to infragistics. My requirement is to populate the UltraWebGrid(will call UWG) dynamically from database and then

edit it. The number and name of columns will be determined by database. I accomplished the data populating part without any

hiccups.

I am unfortable while editing the UVG. Firstly, I learnt about RowEditTemplete(from my wife) and implemented it. I have used

InitializeLayout event to populate the required controls dynamically for the RowEditTemplate. I have also two buttons "OK"

and "Cancel" inside it.
The code is as follows :-

     HtmlInputButton btnOK = new HtmlInputButton();
            btnOK.ID = "igtbl_reOKBtn";
            btnOK.Value = "OK";
            btnOK.Attributes.Add("type","button");
            btnOK.Attributes.Add("onclick","igtbl_gRowEditButtonClick(event)");

            HtmlInputButton btnCancel = new HtmlInputButton();
            btnCancel.ID = "igtbl_reCancelBtn";
            btnCancel.Value = "Cancel";
            btnCancel.Attributes.Add("type", "button");
            btnCancel.Attributes.Add("onclick", "igtbl_gRowEditButtonClick(event)");
 
I also wrote the following function in the javascript

function grdTrade_AfterRowTemplateCloseHandler(gridName, rowId, bSaveChanges)
{
    var row = igtbl_getRowById(rowId);   
    if(bSaveChanges)
    {
        row.processUpdateRow();
    }
}
This event fires as soon as I double-click on a row, whereas the name suggests otherwise.

When I doubleclick on any row on the UWG, RowEditTemplate opens up. I can very well change the data and clicking anywhere

else updates the new data inside the UWG(without posting to the server). Till this point, its fine but my problem starts when

I click on some other row, the corresponding server-side events get fired, which is weird.

   protected void grdTrade_UpdateRow(object sender, RowEventArgs e)
        {
           
        }

Can someone tell me keeping my scenario in mind, what would be the ideal way to edit an UWG in a step-by-step manner.
Thanks for reading my post. Please ask me questions.