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.
Unfortunately, activation email could not send to your email. Please try again.

Problem with QueryCellInfo Event

Thread ID:

Created:

Updated:

Platform:

Replies:

26374 Mar 22,2005 07:03 AM Mar 22,2005 08:23 AM Windows Forms 4
loading
Tags: GridControl
Jitendra
Asked On March 22, 2005 07:03 AM

Hi, In my GridDataBoundGrid,I have a Column of cell type "ComboBox".I want to make next Column ReadOnly/ Read-write by giving a value based on the SelectedValue of the Combo box.Fo this Im using QueryCellInfo Event.Its just like Table creation form in SQSL Server thru Enterprise Manager.When DataType is Selected, the corresponding Length will be populated automatically.This is working fine but the problem is if user selects Varchar in dataType im showing 50 as Length by default.but i must allow him to change the Length.But when 50 is changed to some other value and moving to next column its again calling QuerycellInfo Event Handler and restting the value to 50.How can i solve this Problem.Please help. Regards, Jitendra.

Administrator [Syncfusion]
Replied On March 22, 2005 07:12 AM

Are you also handling grid.Model.SaveCellInfo to save this value into something (some kind of data cache)? And then in QueryCellInfo, are you retrieving this value from the cache you used in saveCellInfo? If not, then QueryCellInfo will always provide the fixed value (and not the changed value). If you want it to change, then you have to handle both QueryCellInfo and SaveCellInfo.

Jitendra
Replied On March 22, 2005 08:00 AM

Hi Im not using SaveCellInfo.Shall I need to store the value in a variable and then use tht in querycellInfo? >Are you also handling grid.Model.SaveCellInfo to save this value into something (some kind of data cache)? And then in QueryCellInfo, are you retrieving this value from the cache you used in saveCellInfo? > >If not, then QueryCellInfo will always provide the fixed value (and not the changed value). If you want it to change, then you have to handle both QueryCellInfo and SaveCellInfo.

Jitendra
Replied On March 22, 2005 08:14 AM

hi, It has problem like: If in First Row Varchar is selected im showing 50 as Length.if he chages tht and set it as 100.In SaveCellInfo im storing this in a varable.And in QueryCellInfo im using tht.Its accepting the 100 as Length but the problem is, When he moves to next row and selects Varchar againg it shows 100 as Length.How to handle this. >Are you also handling grid.Model.SaveCellInfo to save this value into something (some kind of data cache)? And then in QueryCellInfo, are you retrieving this value from the cache you used in saveCellInfo? > >If not, then QueryCellInfo will always provide the fixed value (and not the changed value). If you want it to change, then you have to handle both QueryCellInfo and SaveCellInfo.

Administrator [Syncfusion]
Replied On March 22, 2005 08:23 AM

You have to save the value for each row in SaveCellInfo, and provide that saved value for the row in QueryCellInfo. Maybe you need an array or arraylist, and save the value in SaveCellInfo using the e.RowIndex to pick out the place in teh array to save it. Then in QueryCellInfo, you retrieve the saved value from the array using e.RowIndex as well.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;