We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GridDataBoundGrid GridListControl

Hi All,

Thank you for this great product i have the following question

i am using GridDataBoundGrid Control with the following Columns

Item Name GridList

Item Price Currency

Item Unit Of Measure GridList

When i select an Item from the GridDataBoundGrid i need to Fill the Unit of measure from a table when i select a different item in my current row i want to display other type of items without affecting other rows



other example:

i have a journal entry form and using the GridDataBoundGrid with GridList Cell Type with the following Columns



Type GridList

Name GridList

and other Columns

i need to select from the type column Customer,Vendor,Account then Fill the Name Column With Customers From Customers Table if i select Vendor From the type i need to Fill the name Column with List of vendors form vendors table without affecting other rows

i need your help with this one because when i change an item from the first column it will affect other rows choice list

Thank you.....



5 Replies

NA Nisha Arockiya A Syncfusion Team February 4, 2009 11:19 AM UTC


Hi Firas,

Thanks for your interest in Syncfusion Products.

The DataSource for a specific cell can be changed dynamically by handling the Model.QueryCellInfo event only.Querying the style info of a cell using grid[rowindex, colindex].text in the QueryCellInfo will fire the event again and will lead to a recursive call. You should adopt a logic not to Querycellinfo inside this event.

One way of acheving this would be to change the DataSource in the ClosedCellDropDown event when a particular value is selected and assign the datasource into HashTable .

Please take look at the attached sample for more information.
Here is a Attached sample.
boundcolumn.zip

Let me know if you need any further assistance.

Regards,
Nisha.



FI firas February 4, 2009 11:40 AM UTC

Thanks Alot
I Will Try it
Thanks...........



NA Nisha Arockiya A Syncfusion Team February 4, 2009 11:43 AM UTC

Hi Firas,

Thanks for the Update.

We are waiting to hear from you.

Regards,
Nisha.



FI firas February 4, 2009 04:23 PM UTC


Hi,
I Need to know how about fill each cell in same column from diffrent Tables

Thanks




NA Nisha Arockiya A Syncfusion Team February 13, 2009 01:54 PM UTC

Hi Firas,

Thanks for the update.

You should override QueryCellInfo and and assign the new calculated datasource to e.Style.DataSource there.


If necessary you could do some optimization by caching the datasources for each row in an external array of tags collections and reset that array when the tags need to be recaculated.

Please try this and let me know if you can able to bound multiple tables in a column accordingly.

Regards,
Nisha.


Loader.
Live Chat Icon For mobile
Up arrow icon