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

Binding Datatable

2 Answers 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ritzie
Top achievements
Rank 1
Ritzie asked on 09 Feb 2009, 07:12 AM
Hello All,

         I am binding a datatable to a RadGrid through code behind.I am using a RadCombo also in my form.I have to change the items of the RadGrid on SelectedIndexChange of a RadCombo,but i am not able to do that,Can anyone help me for this.Please suggest me where am I going wrong or there are any special properties to change.

Thanking You in Advance,
Regards,
Ritzie

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Feb 2009, 11:38 AM
Hello Ritzie,

You can try binding your grid to the required datasource as shown below:
cs:
 protected void RadComboBox1_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e) 
    { 
        if (RadComboBox1.Text == "ComboText") 
        { 
            RadGrid1.DataSourceID = "SqlDataSource2"
            RadGrid1.AutoGenerateColumns = true
            RadGrid1.Rebind(); 
        } 
    } 

Thanks
Princy.
0
Ritzie
Top achievements
Rank 1
answered on 20 Feb 2009, 09:33 AM

Hello Princy,

                       Thank you for the answer.

I have one more query please will u help me for this,
I have a datalist in which i have taken a literal control in which i have to show the product image and name which I have binded through table using table.append
Now I want a modalpopup to be opened on click of every image and label.The images which are there in the literal control are in anchor tag.
Please help me for this.

Thnks in advance
Regards
Ritzie
Tags
Grid
Asked by
Ritzie
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ritzie
Top achievements
Rank 1
Share this question
or