row focus / check / scroll into view from server side

3 replies. Last post: October 25, 2010 2:34 AM by Handy Surya
Tags :
  • (None)

Hello,

I'm continuing my evaluation of your products and there are several features I need that are not obvious to configure.

I need the ability to focus and check certain rows from code behind.

Do you have a way to scroll certain row into view when the grid is scrollable(and go to the page containing this row, if needed)?

When in OnTheFlyPostback, can I update parts of the page outside the grid using UpdatePanel?

Thanks.

Answers

Hello,

My sample is using Northwind database. You can find it inside our WebGrid sample.
If you want to restore selected row or checked rows from another page, you can use properties RestoreRowSelection properties. When navigate into the other WebGrid page and back into the first page, it would save and restore your last selected rows.
Also, It is not possible to select a row in the other WebGrid page because WebGrid loads the data partially. The rows in the other WebGrid page have not created yet.

For your last question:

I think you still need to do it via FullPostBack because you were loading ascx.
You can also integrated it with UpdatePanel to avoid FullPostBack the page.

Regards,
Handy

All Replies

Hello,

Please find my attached sample. I can check a row and focus into the rows via button click (server side)
Hope this helps.
Also, would you mind to let me know more details about your last question?

Regards,
Handy

Hi Handy,

Thanks for the sample. I can't run it as I don't have the DB at the moment but I get the idea. However, I guess that your grid is not paged. My scenario is as follows.

I have a grid that might contain several pages of data. When the user selects or checks a row I save his selection into a local database. At the next login I want to restore and show the selected row. I want to do it based on the row key field value. I can't just save the page index and row index because user's screen size and grid page size might be different next time or the underlying dataset could change. I wonder if there's an easy way to select the row based on its key value, go to the grid page containing this row, and if the grid is scrollable then scroll the selected row into view.

Another question is about FlyPostBack technology. I'd like to know if it can be used instead of UpdatePanel in the following scenario. My application has a grid used for navigation which is placed inside an UpdatePanel. When the user selects a row the grid performs full postback (which is converted to callback by UpdatePanel). Based on the user's selection I'm dynamically loading different ASCX controls into another UpdatePanel. I have to use ASCX because I need to raise events between all parts of the application. Note that only one ASCX control at a time is added to the page controls tree. Is it possible to change the grid to FlyPostBack mode but still enjoy partial rendering of dynamically loaded ASCX controls (with some additional markup around them)?

Best regards,

Artem Pushkin

Hello,

My sample is using Northwind database. You can find it inside our WebGrid sample.
If you want to restore selected row or checked rows from another page, you can use properties RestoreRowSelection properties. When navigate into the other WebGrid page and back into the first page, it would save and restore your last selected rows.
Also, It is not possible to select a row in the other WebGrid page because WebGrid loads the data partially. The rows in the other WebGrid page have not created yet.

For your last question:

I think you still need to do it via FullPostBack because you were loading ascx.
You can also integrated it with UpdatePanel to avoid FullPostBack the page.

Regards,
Handy

All times are GMT -5. The time now is 1:29 PM.
Previous Next