<
telerik:RadGrid
ID
=
"gvDefleetCapIds"
runat
=
"server"
AllowSorting
=
"True"
AutoGenerateColumns
=
"False"
CellSpacing
=
"0"
Font-Names
=
"Verdana"
Font-Size
=
"X-Small"
GridLines
=
"None"
ondetailtabledatabind
=
"gvDefleetCapIds_DetailTableDataBind"
oneditcommand
=
"gvDefleetCapIds_EditCommand"
onitemcommand
=
"gvDefleetCapIds_ItemCommand"
onneeddatasource
=
"gvDefleetCapIds_NeedDataSource"
onupdatecommand
=
"gvDefleetCapIds_UpdateCommand"
Width
=
"1200px"
AllowPaging
=
"True"
PageSize
=
"30"
AllowCustomPaging
=
"True"
>
<
headercontextmenu
cssclass
=
"GridContextMenu GridContextMenu_Default"
>
</
headercontextmenu
>
<
mastertableview
autogeneratecolumns
=
"False"
cellspacing
=
"0"
datakeynames
=
"CapID,Year,Plate"
font-names
=
"Verdana"
font-size
=
"X-Small"
>
<
DetailTables
>
<
telerik:GridTableView
AutoGenerateColumns
=
"False"
DataKeyNames
=
"RegNumber"
Font-Names
=
"Verdana"
Font-Size
=
"X-Small"
Name
=
"TheVehicles"
ShowFooter
=
"true"
>
<
HeaderStyle
ForeColor
=
"White"
BackColor
=
"Black"
HorizontalAlign
=
"Justify"
/>
Hi:
I am building a RadGrid programatically from data read from a backend CRM system. The codebehind file builds a dataset and binds to the Radgrid. Can anyone provide an example on how I can set the format of the columns in the Codebehind file? I need some columns formatted as currency, some as percentage, etc. I tried using
RadGrid1_ColumnCreated
RadGrid1_ItemDataBound
but neither worked.
Thanks for any and all input.
John.
Following this post suggestion and for performance purposes I’ve changed RadComboBox by RadDropDownList:
The component is located in a responsive grid and its width is set to 100%. That works fine with RadCombobox and either the textbox and the list of items adjust their width to 100%. But with RadDropDownList the list width is not adjust to 100%, is adjusted to width of the max length item.
<
div
class
=
"container_16"
>
<
div
class
=
"grid_4"
>
<
asp:Literal
runat
=
"server"
Text="<%$Resources:htmlContadorPedidos %>" />
<
div
>
<
div
class
=
"grid_3"
>
<
telerik:RadDropDownList
ID
=
"ContadorPedidos"
runat
=
"server"
Width
=
"100%"
DropDownWidth
=
"100%"
Culture
=
"es-ES"
RenderMode
=
"Lightweight"
>
</
telerik:RadDropDownList
>
</
div
>
</
div
>
<
div
class
=
"clear"
>
</
div
>
HI Community
does anyone have an example of using a RadDropDownTree in a Filter ?
i searched in the forum without a result :-(
what i have so far :-)
<telerik:GridBoundColumn DataField="Problem_FK" DataType="System.Int32" FilterControlAltText="Filter Problem_FK column" HeaderText="Problem_FK" SortExpression="Problem_FK" UniqueName="Problem_FK" Display="true">
<FilterTemplate>
<telerik:RadDropDownTree ID="ddtProb" runat="server" DataFieldID="prob_ID" DataFieldParentID="prob_ParentID" OnClientEntryAdded="ExpectedIndexChanged" DataSourceID="dsProblemTree" DataTextField="prob_Name" DataValueField="prob_ID" Height="16px" Width="361px">
</telerik:RadDropDownTree>
<telerik:RadScriptBlock ID="rsbExpected" runat="server">
<script type="text/javascript">
function ExpectedIndexChanged(sender, args) {
var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
tableView.filter("Problem_FK", args.get_item().get_value(), "EqualTo");
}
</script>
</telerik:RadScriptBlock>
</FilterTemplate>
</telerik:GridBoundColumn>
thanks a lot
best regards
Dennis
Hi,
I am using the ASP.NET component RadRibbonBar(latest version - Q3 2011) and I have a question about the usage of the ContextualTabGroup.
How can I activate and deactivate a ContextualTabGroup depending on the options selected in a Tab (RibbonBarButton) ?
Since is not possible to have an ID to the RibbonBarContextualTabGroup, I wonder how I can activate or deactivate the component in the server-side ?
Best regards,
Brigite Pedro
Hi,
In my project one of the input control is RadNumericTextBox and it's allowed range is from --99999999999.999999999999 to 99999999999.999999999999.
So i have given DecimalDigits value as 12. But it is working only for Positive numbers. i.e. if i input -0.000000001 in the NumericTextbox and focus out of the control is resetting to ZERO.
I have tried by making AllowRounding value to 'false' also but no use . So anyone please help me in this.
I should above to insert even negative numbers in the allowed range as shown above.
I have a three-level master/detail radgrid (think: Bill of Materials application with "Item", "Assembly", "Part").
In the ItemDataBound event for the grid, I am capturing various metrics for each GridDataItem which I am then converting into a text value. The purpose is to give the operator some detailed information for each of the levels (e.g. "based on current inventory levels, we can only produce 5 of this assembly before Part ### is exhausted")
I have been attempting, without success, to customize the radgrid's footer for each level in order to display this information. Also in the itemDataBound event, the event item is a GridFooterItem, I attempt to customize the footer to display this information. I have attempted to do this a couple of ways, based on various forum postings.
One way that "works" is I change the text value of the first column (column #2, as column #0 = expand Column and column #1 = rowindicator column in the grid). I also set the columnspan value to reflect the total # of columns less 2 (for #'s 0 & 1). E.g.:
footeritem["column2"].ColumnSpan = 8;
footeritem["column2"].Text = my-String-field;
I say this works, because, it does "work" (e.g. the data is displayed correctly for the footer), except, it "breaks" the layout of the grid in such a way that each of the levels' columns are no longer fully justified to the left and right sides of the grid. What I end up with is a grid where each detail level's data is displayed as "ragged right". It appears what happens is each column, at each level, in the grid is set to the absolute minimum amount of space needed to display the value.
Removing the ColumnSpan directive results in the grid being laid out properly (e.g. all columns dynamically sized to make the grid at all 3 levels fully justified to the right and left.) However, since column#2 might be only, say, 100 pixels, I end up with 5-10 "lines" of wrapped text containing my string field, which is not very professional looking.
Question: Is there a way to create a custom footer template for the radgrid with a single "column" which will be laid out correctly; that is, I could have a single column which spans the entire width of the radgrid so I can populate it with my text value, and not "break" the full justification of the grid?
if
(!Page.IsPostBack) {
List<affaires> oAff =
this
.DbContext.Bien_GetPhoto<affaires>(
"B12546"
,2).ToList();
this
.RadRotator1.DataSource = oAff;
this
.RadRotator1.DataBind();
}
protected
void
RadRotator_ItemDataBound(
object
sender, RadRotatorEventArgs e) {
affaires oBoPhoto = (affaires)e.Item.DataItem;
string
cPhoto =
"photo/"
+ oBoPhoto.photo.Trim().ToString().Replace(
"\\", "
/");
if
(File.Exists(Server.MapPath(cPhoto))) {
((Image)e.Item.FindControl(
"photo_mini"
)).ImageUrl = cPhoto;
((TextBox)e.Item.FindControl(
"txt_img"
)).Text = cPhoto;
}
else
{
((Image)e.Item.FindControl(
"photo_mini"
)).ImageUrl =
"~/images/photoempty_v.jpg"
;
((TextBox)e.Item.FindControl(
"txt_img"
)).Text = cPhoto;
}
}