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

Gridview Summary form with Excel features

3 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jonathan
Top achievements
Rank 1
jonathan asked on 30 Mar 2009, 02:46 PM
Hi

I have been given a task whereby the business want  a Summary form which has excel like features(header freezing, column freezing, export to excel). So this component sounds a good fit. They also want the gridview populating depending on what is selected on a seperate dropdown, checked combo box and search textbox. These 3 controls control what data is displayed in the gridview. Can this be done?  

Also, do you support date range filtering ie. Start and To dates?

Regards

Jonathan Walker

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 31 Mar 2009, 05:18 AM
Hi Jonathan,

In the SelectedIndexChanged event of the DropDownList you can access the SelectedItem and populatethe Grid accordingly. You can also refer the following code library submission which explains how to Search key words in Grid.
SearchAndHighLightKeyWords

Shinu
0
jonathan
Top achievements
Rank 1
answered on 31 Mar 2009, 07:55 AM
Hi

No, sorry I meant client controls outside of the grid to control how the grid is initially populated.


Regards

Jonathan
0
Princy
Top achievements
Rank 2
answered on 31 Mar 2009, 10:33 AM
Hello Jonathan,

You can populate your grid based on the selected item in the DropDown. Check out the sample code below, to implement the same:
aspx:
<asp:DropDownList ID="DropDownList1" AutoPostBack="true" runat="server" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
    <asp:ListItem Text="text1">         
    </asp:ListItem> 
    <asp:ListItem Text="text2">         
    </asp:ListItem>            
</asp:DropDownList> 

cs:
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e) 
    { 
        if (DropDownList1.Text == "text2"
        { 
            RadGrid1.DataSourceID = "SqlDataSource2"
        } 
        else 
        { 
            RadGrid1.DataSourceID = "SqlDataSource1"
        } 
         
    } 

Thanks
Princy.
Tags
Grid
Asked by
jonathan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
jonathan
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or