Welcome Guest Search | Active Topics | Sign In | Register

how to implement auto postback for grid Options
Aspire
Posted: Tuesday, June 1, 2010 1:00:57 PM
Rank: Newbie
Groups: Member

Joined: 6/1/2010
Posts: 3
I want to edit my cells excel style and as I understand grid needs postback. How to implement auto postback after I finish editing of the cell
eo_support
Posted: Tuesday, June 1, 2010 2:03:12 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

The Grid does not do auto postback for you. However you can handle the GridColumn's ClientSideEndEdit with JavaScript. Inside your handler you can do anything possible with JavaScript, including a post back. The code will be something like this:

Code: HTML/ASPX
<eo:Grid .....>
    <Columns>
        ....
        <eo:TextBoxColumn ClientSideEndEdit="end_edit_handler" ....>
        </eo:TextBoxColumn>
        ....
    </Columns> 
</eo:Grid>


Code: JavaScript
function end_edit_handler(cell, newValue)
{
    //Use a timer to delay the post back so that the
    //new value got saved by the Grid first
    setTimeout(function()
    {
       //Raising post back
        __doPostback(....);

    }, 10);
}


You can also uses a ScriptEvent control and call eo_TriggerServerEvent instead of __doPostBack to trigger post back. eo_TriggerServerEvent triggers a post back and fires the corresponding ScriptEvent's Command event.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.