RadTreeNode tnAttr = new RadTreeNode(attr.Name); // Here attr.Name is "Category<ID"tnAttr.ToolTip = attr.LongDescription;
treeViewDimension.Nodes.Add(tnAttr);
((sender as CheckBox).NamingContainer as GridItem).Selected = (sender as CheckBox).Checked; foreach (GridDataItem row in RadGrid1.SelectedItems) RadlstOLDest.Items.Add(new RadListBoxItem(row["OrderLineId"].Text, row["OrderLineId"].Text));
New Code
foreach (GridDataItem row in RadGrid1.MasterTableView.Items) { if ((row.FindControl("CheckBox1") as CheckBox).Checked) { RadlstOLDest.Items.Add(new RadListBoxItem(row["OrderLineId"].Text, row["OrderLineId"].Text)); row.Selected = true; } } Thanks,
Vikas
I am Using a editform popup to display some hyperlinks. to position the popup I am using the clientevent
<
ClientEvents OnPopUpShowing="PopUpShowing" />
var
popUpHeight = popUp.style.height.substr(0, popUp.style.height.indexOf("px")); is coming empty.
I am not sure why? can someone please help me in here.
what i am doubting is that i am having a usercontrol binded to the popup and it gets build up after the script is trigered. so is causing the height to be empty.
StyleElement timeStyle = new StyleElement("timeItemStyle");timeStyle.NumberFormat.Attributes["ss:Format"] = "hh:mm:ss";//timeStyle.NumberFormat.FormatType = NumberFormatType.LongTime;timeStyle.FontStyle.Color = System.Drawing.Color.Red;e.Styles.Add(timeStyle);StyleElement alternatingTimeStyle = new StyleElement("alternatingTimeItemStyle");alternatingTimeStyle.NumberFormat.Attributes["ss:Format"] = "hh:mm:ss";//timeStyle.NumberFormat.FormatType = NumberFormatType.LongTime;alternatingTimeStyle.FontStyle.Color = System.Drawing.Color.Red;e.Styles.Add(alternatingTimeStyle);grid.MasterTableView.TableLayout =
GridTableLayout.Auto;
I am at wits end as to why the markup based one would work but the one created from code behind does not honor the auto table layout. I have noticed that the page source between the two has some differences.
1) In the working (markup based) app, the <div> for the GridHeader has style="overflow: hidden; width: 100%", whereas in the code-behind based app the <div> for the GridHeader has style="overflow: hidden; padding-right: 17px;". I don;t know if that width: 100% in the header is making the difference, but I can't figure how to force it in the code behind based app to test it out.
2) In the working app, the ctl00_Header <div> has a width in it's style setting whereas in the code-behind based one there is not.
3) In the working app, the header has a colgroup that looks like this:
whereas in the code-behind based app it clooks like this:
Note that one significant difference between the two aps is that the code-behind based app also uses a detail table (so the first visible column, corresponding the the first column in the colgroup above, is the expand/collapse icon for the detail table.)
Any ideas for what might cause a non-markup based app to not honor the TableLayout set to Auto would be aprciated.
-Ed Hinton
Hi,
Could anyone please tell me - How to get the following dynamically in code behind (i was able to set values for these ...)
1. RadGrid's each row height (Row height of each row in MasterTableView)
2. Height of MasterTableView .
Why I need this:
One column in my radgrid is description. It can grow to huge size. I cant parse and give tool tip as I need to print and export(it exports/prints only the data on the grid)
So I gave scrolling to grid even though pagination is there .
Since the description can grow and shrink the following code inside DataBound Event is also not working
if (gridItems < 4)
{
grid.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(gridItems * 28);
}
So I tried instead of hard coded "28", the following
if (grid.MasterTableView.Height.Value >= 150)
{
grid.ClientSettings.Scrolling.ScrollHeight = Unit.Pixel(150);
}
else
{
grid.ClientSettings.Scrolling.ScrollHeight = grid.MasterTableView.Height;
}
But grid.MasterTableView.Height is always 0.0 :(