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

RadGrid NeedDatasource & PageIndexChanged

1 Answer 128 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ramesh kumar Kuppusamy
Top achievements
Rank 1
Ramesh kumar Kuppusamy asked on 23 Jul 2011, 01:29 PM
Proble:
In NeedDataSourece event I need to find the source event which has trigerred the NeedDataSource.

Senario :
Steps:
1. In my Radgrid I have set the EnableViewState="false",  then I set the AllowRowSelect="true" in <clientsettings>

2. In code behing I have written a custom function to identify a the selected rows

3. After selecting a page number in my Radgrid pager, it is triggering the NeedDatasource event.

4. I need to Identify whether the NeedDatasource is trigerred from the PageItemChanged Event

5. Before moving to the another page, I have to get the selected rows from the current page.



 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Jul 2011, 08:16 AM
Hello Rameshkumar,

You can attach ItemCommand and check for the CommandName and set a flag variable and check for the variable in NeedDataSource event.

C#:
int flag = 0;
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
    {
        //check for the condition here
    }

Thanks,
Shinu.
Tags
General Discussions
Asked by
Ramesh kumar Kuppusamy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or