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

After out of focus or another row clicked, which event fired?

Hi,

I am having the problem with the selection of row. After modified the row user moves the focus out of row Or click in another row, at that particular time i need updated data. To do this which event I have to use? I used custom collection to set the DataSource and setted the primary key. Also, PostBackOnFocusChanged=true. I tried the SelectedRecordChanged event, but this event gives the each individual records, but not at a time. So again I have to prepare collection and send back to server.

If you have any worked example please provide me.

9 Replies

RA Ramesh April 2, 2007 09:17 PM UTC

Hi,

Like the BarButton control events are raising and handling, I need without BarButton control which event is used?

Regards,
Ramesh


VA Valli Syncfusion Team April 3, 2007 09:32 AM UTC

Hi Ramesh,

I have created a sample as per your requirement and you can download it from the following link:

http://websamples.syncfusion.com/samples/Grid.Web/4.4.0.51/F58968/main.htm

In the above sample instead of ButtonBars, the save function for the changes that are made in the collection of records are written in the click event of the ASP.Net buttons.

Please let us know if you have any further queries.

Regards,
Valli


RA Ramesh April 3, 2007 10:09 AM UTC

Hi Valli,

I want to say very quickly, the attached zip file contains some virus. So can you send me as a attachment to my mail-id. Or else clean the file and reattach the same zip file.

Regards,
Ramesh T
ramesh.tamma@uk.bp.com,
ramesh.tamma@wipro.com


RA Ramesh April 3, 2007 11:32 AM UTC

Hi Valli,

I have one more query, after editing the row is passed for validation to server. Here if any error(s) is present (based on my business rules) in the edited row, I have to retain the state in edited row in edit mode and fouces to that row. To do that what info I need to save and how to set the state in edit mode.

Regards,
Ramesh


VA Valli Syncfusion Team April 3, 2007 02:15 PM UTC

Hi Ramesh,

Could you please download the sample from the following link,

http://www.syncfusion.com/Support/user/uploads/Grid_c36948c7.zip

Regards,
Valli


RA Ramesh April 3, 2007 03:41 PM UTC

Hi Valli,

This is not my problem solution, I'll explain you the problem clearly.
I am doing the binding at run-time and assigning the IList object and Typed entity I am binding to grid. At run-time user will edit the single record at a time and whenever user finishes editing I need the edited record to validate the data. To solve the above problem I tried with the following events.
1. SelectedRecordsChanged: This event is firing one time, but say for example in record I edited 3 columns out of 4 columns; The SelectedRecordsChanged event is giving the first column value not all the updated column values.
2. RecordValueChanging & RecordValueChanged: Both are working for each column, not an entire record. Take the above example(Specified at #1), it loops 3 times from client to server and one more problem I found is, again I have to prepare my custom entity and fill each individual column and then refer in "SelectedRecordsChanged" to validate. Because I don't know exactly how many columns edited in my row.
3. SourceListRecordChanged: I tried with this event too; it's also behaving same as #1.
Problem #1, what was the event I need to use to do the above operation?

One more questions are, at run-time how to edit the row based on the record position? Say for example I need to edit 2 rows in my grid how to do at run-time. As I said in my previous post, if error present in edited row I have to set in edit mode only of that record.

So, please provide some sample for the above requirements.
Note: I am not using any templates or SQL/OLEDB datasources, some other way I am retrieving the data and binding to grid.


RA Ramesh April 4, 2007 08:32 AM UTC

Hi Valli,

We found the problem with our CustomCollection, Please excuse us.

Regards,
Ramesh T


RA Ramesh April 4, 2007 12:05 PM UTC

Hi Valli,

Anyway we resolved that issue, but I need help on the 2nd question which I raised earlier. ie., At run-time how to edit the row based on the record position? Say for example I need to edit 2 rows in my grid how to do at run-time.

Regards,
Ramesh


GB Gokul B Syncfusion Team April 4, 2007 03:44 PM UTC

Hi Ramesh,

Thanks for your update.

Attached is the sample in which GridGrouping record has been editied based on the Record row position.

Editing Grid Row based on Index

In our sample, we edited the record based on row position entered in the textbox.

Kindly have a look at our sample and Let us know if it helps.

Regards,
Gokulkumar.B

Loader.
Live Chat Icon For mobile
Up arrow icon