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

[Solved] Radgrid with Combobox-checkbox

4 Answers 171 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mauricio
Top achievements
Rank 1
Mauricio asked on 17 Apr 2013, 05:52 PM
i need to fill a radgrid with the checked items on the combobox checkbox, but i dont know what event or function can me help to do this.
PLEASE HELP

4 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Apr 2013, 04:10 AM
Hi,

I suppose you want to bind the combobox on checking items in it. You can bind the grid in ItemChecked event as shown below.
C#:
protected void RadComboBox1_ItemChecked(object sender, RadComboBoxItemEventArgs e)
    {
//bind the grid here
    }

Thanks,
Shinu
0
Mauricio
Top achievements
Rank 1
answered on 18 Apr 2013, 01:28 PM
Thank you very much!.

At the same time I need to know the values of thats items, to get its data of my DB do you know about a function to do that? 

Thanks
0
Shinu
Top achievements
Rank 2
answered on 19 Apr 2013, 04:55 AM
Hi,

You can bind the grid in its needdatasource event as shown below.
C#:
protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
  {
      SqlConnection con1 = new SqlConnection(WebConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString);
      SqlCommand cmd = new SqlCommand("SELECT top 10 * FROM [Orders]", con1);
      SqlDataAdapter ad = new SqlDataAdapter(cmd);
      DataSet ds = new DataSet();
      ad.Fill(ds);
     RadGrid1.DataSource = ds;
  }

Thanks,
Shinu
0
Mauricio
Top achievements
Rank 1
answered on 13 May 2013, 04:50 PM
thks you help me a lot with this sample.
Tags
Grid
Asked by
Mauricio
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mauricio
Top achievements
Rank 1
Share this question
or