This is a migrated thread and some comments may be shown as answers.

[Solved] Get group ID from client side

2 Answers 157 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chenghan
Top achievements
Rank 1
Chenghan asked on 06 Jul 2009, 02:40 AM

Hi,

I have a radgrid, and set it as : 

QuotationLines.MasterTableView.GroupLoadMode = GridGroupLoadMode.Client

 

 

 

It performance better than GridGroupLoadMode.Server, it is good.
And now I want to let the interface can remenber the status of group. (It means remember which group is in expanding, which is in Collaping).
Then I set two client event to add or remove the group id from hidden filed. So that server side will know the group status from the hidden field.
My question is how to get group id from sender or eventArgs. (I've reader the help doc from telerik, but didn't find the answer...)
 

Aspx:

<telerik:RadScriptBlock>   
function OnGroupExpanding(sender, eventArgs) {  
     //How to put the current group code into hidden filed  
 }  
 function OnGroupCollapsing(sender, eventArgs) {  
     //How to remove the current group code from hidden field  
 }  
</telerik:RadScriptBlock> 
 
<asp:HiddenField ID="hidExpandGroupKeys" runat="server" /> 
<telerik:RadGrid runat="server" ID="ItemsList">  
    <MasterTableView DataKeyNames="code">  
        <GroupByExpressions> 
            <telerik:GridGroupByExpression> 
                <GroupByFields> 
                       <telerik:GridGroupByField FieldName="SubGroupCode"></telerik:GridGroupByField> 
                </GroupByFields> 
            </telerik:GridGroupByExpression> 
        </GroupByExpressions> 
        <Columns> 
            <telerik:GridBoundColumn DataField="code"</telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="SubGroupCode"</telerik:GridBoundColumn> 
        </Columns> 
    </MasterTableView> 
    <ClientSettings> 
        <ClientEvents OnGroupCollapsing="OnGroupCollapsing" OnGroupExpanding="OnGroupExpanding" /> 
    </ClientSettings> 
</telerik:RadGrid> 

May be my question is not very clear...
Hope the telerik support can help me, many thanks in advance.

 

2 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 08 Jul 2009, 12:46 PM
Hello Chenghan,

Unfortunately the functionality you request is not attainable. To achieve your goal you need to use Server-side events.

I hope this is not a show stopper for you.

Regards,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Chenghan
Top achievements
Rank 1
answered on 10 Jul 2009, 03:18 AM
Thanks for your reply anyway.
I'm looling forward to the functionality come true in the next version.

best regards
Tags
Grid
Asked by
Chenghan
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Chenghan
Top achievements
Rank 1
Share this question
or