User Profile & Activity

Sachin Jain Member
Page
of 5
Posted: February 29, 2016 11:08 AM
achieved the required solution by other way.
Posted: February 9, 2016 12:34 PM
found a workaround.
Posted: December 31, 2015 7:36 AM
Hi Yudi,
Thanks for your support. The suggested solution worked perfectly. I appreciate your detail explanation .
 
regards
Sachin
Posted: December 23, 2015 12:41 PM

Hi,

your code snippet is not working for me.

Here is my code which i added:

  function WebGrid1_OnAfterExitEditMode(controlId, tableName, editObject) {

           var grid = ISGetObject(controlId);

           var RowObject = grid.GetSelectedObject().ToRowObject();          

           var ItemId = RowObject.GetCells().GetNamedItem("ItemId");

           if (CheckValue(ItemId.Value)) {//Here Checkvalue is function, to validate the Item Value

                   RowObject.UndoChanges();

               }

  }


  RowObject.UndoChanges(); is not working.


Regards

Sachin Jain

Thanks Yudi ! It works perfectally ! Sorry for delay in replying.

regards
SJain
Hi Yudi,
Sorry for delay reply. Thanks for detail explanation behind reasons of reported issues. The solution and explantions worked as expected.
There was a pending request for suggestion for using webrid event for autofill a textBox column on selection of webcombo's option during new row addition. Requested on 28th Oct's post as

On Selection of ProductName need to autofeel 10 and some custom Text in QuantityPerUnit new row's cell.

Is it possible to remove an product name from webcombo temporary once it added to new row. If row addition is cancelled then it should be put back in optionlist.

thanks and regards

Sjain
Hi Yudi,
            I create a sample. Please look on it.
            I created 3 datatable to bind webgrid and 2 webcombos.
            ProductName combo is bind on basis of SupplierId combo.
            Problems in sample are
  1. First I have to click on ProductName new row column and then select SupplieId from webcombo then onlyProductName combo shows filter data. If I try to select SupplierId first then ProductName shows empty rows.
  2. Once the selection from both combo is done then I can only change data after deleting the text inside otherwise in list  only selected text is shown.

          Requests are 

  1. On Selection of ProductName need to autofeel 10 and some custom Text in QuantityPerUnit new row's cell.
  2. On selection of SupplierId ProductName combo must be empty. Currently It is showing earlier selected value.


Please modiy the sample such a way that all data-bound features would be available. Hope the sample would be able to explain the problem we are facing.

thanks and regards

Sjain


Hi Yudi,
I got success to bind using your given sample. (LinkWebComboIntegratedIntoWebGridSample.zip)

I was using "OnInitializeDataSource" and "OnPrepareDataBinding" events for declartive columns in aspx page. Once I removed both events and bind grid on page load , it starts working. I believe that I can bind grid on "OnInitializeDataSource" event by using columns setting in event also. Thanks for your help.

1) One thing I noticed that once I select any Product (taking example of your sample Product-supplier case) then I can not change it."

2) I also want to add some data in another textBox column on basis of selected Product for example if Product "Chai" is selected then in column of description "Chai From China" would be add. Which event is available for this purpose and how !

3) Is any way that I could clear Product TextBox when user select different Supplier so that he/she can be force to select new Product. Currently old added product is displaying in row. Also, If I change supplierId which do not have any Products then already selected Product does not remove from textBox although it shows "No records found.

4) Currently I am referring Webgrid 8 documentation available as CHM file. Is any new version available and if so then from where I can download it ?


All mentioned request are for during adding new row and before storing those data temporary in webgrid before batch update.


thanks and regards
Sjain
Hi Yudi,
This sample does not work in our scenario. We are not using ISDataSource .
Allow me to explain scenario.
 Suppose Grid is binded by  Products table . 
A XML file exists which have all distinct Supplier Id and Supplier Name . Supplier Combo of grid is binded using this xml file reading from codebehind. 

On selection of particular Supplier; some data will fetch from different database which have all information of Products realted with supplier.

In my case filtering is not working. It shows all the Products.

thanks and regards

Posted: October 21, 2015 12:05 PM

Hi Yudi,

Thanks for the  immediate reply.

your code snippet helped me a lot. 

I need to find event of webcombo when the value is changed in Jquery(Javascript).

Could you please help me?


Regards

Sachin Jain

All times are GMT -5. The time now is 3:20 AM.
Previous Next