or
dgrdSubCategory.AutoGenerateHierarchy = true; SqlDataAdapter sdaCatid = null; DataSet dsCatid = new DataSet(); DataSet dsGrid = DBFunctions.FillRadDataGirdReturnDS("category where parentcatid IN (select catid from category where catname='" + TV1.SelectedNode.Text + "')", dgrdSubCategory); for (int i = 0; i < dsGrid.Tables[0].Rows.Count; i++) { DataRow drow = dsGrid.Tables[0].Rows[i]; sdaCatid = FillDataset("category where parentcatid='" + drow["catid"] + "'"); sdaCatid.Fill(dsCatid); } GridViewTemplate template = new GridViewTemplate(); template.DataSource = dsCatid.Tables[0];
//i get values in the template variable dgrdSubCategory.MasterGridViewTemplate.ChildGridViewTemplates.Add(template); GridViewRelation relation = new GridViewRelation(dgrdSubCategory.MasterTemplate); relation.ChildTemplate = template; relation.RelationName = "SubCategory"; relation.ParentColumnNames.Add("catid"); relation.ChildColumnNames.Add("catid"); dgrdSubCategory.Relations.Add(relation); radGrid1.DataSource = template;
///But though i have done this i dont get the corresponding result.
//It shows a "+" sign but nothing comes under it when clicked on "+"
public static SqlDataAdapter FillDataset(string strTableName) {
ds = new SqlDataAdapter();
sda=new SqlDataAdapter();
conn = new SqlConnection();
conn.ConnectionString = ConfigurationSettings.AppSettings["conString"];
string strCmd = "select * from " + strTableName;
sqlcommand sqlCmd = new SqlCommand(strCmd, conn);
sda = new SqlDataAdapter(sqlCmd);
//sda.Fill(ds);
//dgrdv.DataSource = ds.Tables[0];
}
void radGridView1_CellFormatting(object sender, CellFormattingEventArgs e) { if (e.CellElement.RowInfo.Cells[0].Tag != null && e.CellElement.RowInfo.Cells[0].Tag.Equals(true)) { e.CellElement.BackColor = Color.Red; e.CellElement.DrawFill = true; } else { e.CellElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local); e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local); } } void radGridView1_DataBindingComplete(object sender, GridViewBindingCompleteEventArgs e) { foreach (var row in radGridView1.Rows) { if (row.Index % 2 == 0) { row.Cells[0].Tag = true; } } } Hi
I tried to hide the GroupPanel and for that I set the ShowGroupPanel property to fasle but nothing change.
I'm using version Q2 2010
Can someone help me with that ?

HI, could you please give some more explanantion about your previous reply....am new to telerik . i have created and loaded the raddropdownbutton with checkbox columns, i have written code as below public partial class DropDownButton : Telerik.WinControls.UI.RadForm { RadGridView grid; RadHostItem hostItem; string str = string.Empty; Workaround.childtemplate.GridMenuItem item = new Workaround.childtemplate.GridMenuItem(); public DropDownButton() { InitializeComponent(); } private void DropDownButton_Load(object sender, EventArgs e) { SqlConnection con = new SqlConnection("Data Source=ISDTP0026;Initial Catalog=LibraryManagement;Integrated Security=True"); con.Open(); DataSet ds = new DataSet(); SqlDataAdapter adp = new SqlDataAdapter("select CallNumber,Author from Books", con); adp.Fill(ds); item.Grid.DataSource = ds.Tables[0].DefaultView; GridViewCheckBoxColumn chk = new GridViewCheckBoxColumn(); chk.DataType = typeof(bool); chk.HeaderText = ""; chk.ReadOnly = false; item.Grid.Columns.Insert(0, chk); item.Grid.Columns[0].HeaderText = "Select"; item.Grid.Columns[1].ReadOnly = true; item.Grid.Columns[2].ReadOnly = true; item.Grid.ReadOnly = false; item.Grid.ShowGroupPanel = false; item.Grid.AutoSizeRows = true; item.Grid.SelectionMode = GridViewSelectionMode.FullRowSelect; item.Grid.MultiSelect = true; item.Grid.SelectionMode = GridViewSelectionMode.FullRowSelect; item.Grid.MultiSelect = true; item.Grid.MasterGridViewTemplate.AllowAddNewRow = false; item.Grid.MasterGridViewTemplate.AllowDeleteRow = false; item.Grid.MasterGridViewTemplate.AllowEditRow = true; item.Grid.MasterGridViewTemplate.ShowRowHeaderColumn = false; item.Grid.MasterGridViewTemplate.AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill; item.Grid.MasterGridViewTemplate.BestFitColumns(); item.Grid.Size = new Size(400, 300); radDropDownButton1.Items.Add(item);} private void radDropDownButton1_DropDownClosed(object sender, EventArgs e) {// here only i need to store the selected value foreach (GridViewRowInfo rowInfo in item.Grid.Rows) { for (int row = 0; row < item.Grid.Rows.Count; row++) { if (item.Grid.Rows[row].IsSelected) { string str = item.Grid.Rows[row].Cells[0].Value.ToString(); }}}
while dropdown closed event , how to get the selected rows and values....???Please guide me it very urgent.... thanks in advance...ThanksDev. Hello,
I have a RadGridView that is bind from a datatable. How do I turn on screen tips with images assign to the rows when user hover mouse over a row? Of course I would have to determine which images to use by the column and row index. But how do I assign a pop up screen tips with a image? My images are in a folder in my local drive.
Thanks.