|
Rank: Advanced Member Groups: Member
Joined: 8/26/2009 Posts: 64
|
I have my grid looking and operating just the way I want. It is databound to Internet-facing SqlDataSource and updates with each cell edit -- extremely fast -- less than 2 seconds per cell.
Two questions about the callback behavior. First, on each callback (cell edit), the footer move down one row during the callback then goes back to its original location at the bottom of the grid. This is the only visible "flicker" I get. How do I stop that?
Second, although I probably don't need it here because it's less than 2 seconds -- but I will elsewhere in my app, how do I get it to say "Processing..." at the bottom or, better yet, get the animation that comes up in your demo in the middle of the control (the one you see whenever you switch to a new demo in the tree menu of demos).
I also have some styling questions. I prefer the MM-DDD-YYYY format for dates, which I've deployed with the appropriate format string -- and I've center-aligned the column with text-align:center; -- works great, but how do I center that particular column's header text?
Same question as above for my amount field -- I aligned the cell text right, but want the header text to be right also.
Thanks.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
As to your questions:
1. We are not able to see such flickers in your test code. You can try a number of things: either put the CallbackPanel after the Grid, or place it inside a hidden div (<div style="display:none"></div>).
2. You can do that by setting the CallbackPanel's LoadingHTML and LoadingPanelID;
3. You would edit Grid.ColumnHeaderStyle & Grid.ColumnHeaderHoverStyle to include text-align:center;
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 8/26/2009 Posts: 64
|
On #2, I tried that but I don't know where the text is supposed to show up -- where the CallbackPanel control is? Also, how do I get the pop-up animation graphic that you use in your demos and see the sample code for that --which demo has an example and the actual graphic and shows how to make it come up in the middle of the page/control?
On #3, I didn't state the question right. I want a standard accounting presentation. Text columns are aligned left, date columns: aligned center, amount columns, aligned right. I've aligned the columns but your answer below would align all the column headers the same, not in coordination with the data below them? In regular HTML this is done in the <TH> tag, where/how do I set the alignment of individual columns in the EO grid?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
pghcpa wrote:On #2, I tried that but I don't know where the text is supposed to show up -- where the CallbackPanel control is? If you set LoadingPanelID, it goes to where your LoadingPanelID is. If you do not set LoadingPanelID, it goes to where CallbackPanel control is. pghcpa wrote:Also, how do I get the pop-up animation graphic that you use in your demos and see the sample code for that --which demo has an example and the actual graphic and shows how to make it come up in the middle of the page/control? The sample is able to that simply with LoadingHTML because all the sample reloads the Grid. So while the callback is in progress, the Grid is first removed, then the LoadingHTML is displayed, then the Grid is recreated. This simple apporach obviously does not work for you because you are not reloading the Grid. You can do whatever you would like to do while the callback is in progress by handling the CallbackPanel's ClientSideBeforeExecute and ClientSideAfterUpdate event. They are called before the AJAX call and after the call respectively. For example, you can place a DIV element inside your page and set the div's innerHTML to "updating..." inside your ClientSideBeforeExecute handler and then clear it inside your ClientSideAfterUpdate handler. From our experience we have noticed that showing status information for frequent user action such as merely editing a cell tends to be perceived as annoying by a lot of users. User expects to see the computer is "doing something" when they performed a "big action" such as click a button to submit a page, they do not expect the computer to be busy doing this and that all the time while they really want to focus on their data. It's distracting. Of course, this is just our opinion. pghcpa wrote:On #3, I didn't state the question right. I want a standard accounting presentation. Text columns are aligned left, date columns: aligned center, amount columns, aligned right. I've aligned the columns but your answer below would align all the column headers the same, not in coordination with the data below them? In regular HTML this is done in the <TH> tag, where/how do I set the alignment of individual columns in the EO grid? I see what you are trying to do. You would use HTML for column header text. For example, instead of setting the column header' text to "Amount", you would set it to "<div style='text-align:right'>Amount</div>". Hope this helps. Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 8/26/2009 Posts: 64
|
OK, understood all that, thanks.
Now, I mentioned in my original post I only need the animation for longer processes. In one case, my grid is in fullrowselect, when user clicks row it goes to another page (maybe even opens another browser window) and depending on the row and Internet connection, sometimes that can take long enough to show them its in progress.
I have previously done that with an Ajax progress panel and a little clock animation -- works fine.
But, just like the rest of my work compared to using EO controls, when I go to your demo it is much, much cooler. As I flip through your grid "features" in the tree -- just as you said, the grid disappears. But while I wait, right in the center of where the grid would be (and will be) is a small circular animation that looks sort of like a small wheel with spokes going around. I found it in your demos, it's called "Loading.Gif"
I want to know: (1) which demo shows me how to do that -- is it one of the menus?; (2) how do I get the panel with the loading.gif to show up in the same spot as the grid, until the grid renders? No need to explain it to me if you can just point me to a sample.
Also, back to question #1 about the "flicker" -- it's not really flicker, it's just that after I edit the cell and the server event is writing back the data (callback is executing), the footer with the page numbers literally moves down one row then replaces itself back to right below the last row. The grid doesn't flicker, only this page number row moves down then up -- nothing else on the page moves. I tried it on Firefox 3.5.2 -- and it DOES NOT do it there. It does do it on IE 7.0.
I will try your suggestions and also make sure I can replicate the behavior in test code, but before I start working on it, just wondered if the different browser behavior gives you any idea what it is.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
For the loading image it's better for you to try out by yourself:
1. Place a CallbackPanel in your page; 2. Set the CallbackPanel's Width and Height, this is important; 3. Set the CallbackPanel's LoadingHTML to something like "<img src='loading.gif' />"; 4. Place some other elements you want to update inside the CallbackPanel; 5. Complete other necessary code such as triggers, etc;
The key is #2 and #3. Setting LoadingHTML is a must and it is displayed at the center of the CallbackPanel. This is why you need #2.
We will be waiting for your test page on the flicker issue.
Thanks
|
|