foreach
(GridItem item in rdInsLines.MasterTableView.Controls[0].Controls)
{
if (item is GridDataItem)
{
if (item.Expanded)
{
item.FireCommandEvent(
"ExpandCollapse", String.Empty);
}
if
(SSN == "___-__-____")
SSN = string.Empty;
I don't feel as though this is proper. Is there a way around this? Can the mask be displayed only when values exists?
Hi,
I've problem with my radgrid.
My page add columns to Radgrid at runtime mode.
I've fired the Page_Init event and i'm able to add columns.
After edit or insert a record into my ragrid, if I don't close the edit form and do a postback with another control (in this case a RadTab control), who a different datasource (with more or less columns) my page catch an exception: "unable to load view state".
If I close the edit form page works correctly.
How can I resolve this problem?
<
telerik:RadAjaxPanel
ID
=
"pnlElenco"
runat
=
"server"
Height
=
"100%"
Width
=
"100%"
>
<
asp:Label
ID
=
"lblStato"
runat
=
"server"
Width
=
"100%"
CssClass
=
"statusbar_silver"
/>
<
telerik:RadGrid
ID
=
"grdElenco"
runat
=
"server"
AutoGenerateColumns
=
"true"
Width
=
"100%"
AllowAutomaticUpdates
=
"true"
AllowAutomaticDeletes
=
"true"
AllowAutomaticInserts
=
"true"
OnInsertCommand
=
"OnInsertCommand"
OnUpdateCommand
=
"OnUpdateCommand"
OnDeleteCommand
=
"OnDeleteCommand"
OnNeedDataSource
=
"NeedDataSource"
Skin
=
"Default"
PageSize
=
"15"
OnColumnCreated
=
"OnColumnCreated"
>
<
PagerStyle
AlwaysVisible
=
"false"
Mode
=
"NextPrev"
/>
<
ExportSettings
ExportOnlyData
=
"true"
HideStructureColumns
=
"true"
IgnorePaging
=
"false"
>
<
Excel
Format
=
"ExcelML"
/>
</
ExportSettings
>
<
MasterTableView
AllowPaging
=
"true"
ShowHeadersWhenNoRecords
=
"true"
CommandItemDisplay
=
"Top"
EditMode
=
"InPlace"
EnableColumnsViewState
=
"false"
>
<
Columns
>
<
telerik:GridEditCommandColumn
HeaderStyle-Width
=
"40"
ButtonType
=
"ImageButton"
UniqueName
=
"EditCommandColumn"
EditText
=
"Modifica"
>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridEditCommandColumn
>
<
telerik:GridButtonColumn
ConfirmText
=
"Eliminare questo record in maniera definitiva?"
ConfirmDialogType
=
"RadWindow"
ConfirmTitle
=
"Delete"
ButtonType
=
"ImageButton"
CommandName
=
"Delete"
Text
=
"Elimina"
UniqueName
=
"DeleteColumn"
>
<
ItemStyle
HorizontalAlign
=
"Center"
Width
=
"40"
/>
</
telerik:GridButtonColumn
>
</
Columns
>
<
CommandItemSettings
ShowExportToExcelButton
=
"true"
/>
</
MasterTableView
>
</
telerik:RadGrid
>
<
asp:HiddenField
ID
=
"txtCurrentTable"
runat
=
"server"
/>
</
telerik:RadAjaxPanel
>
Regards!
Cristian
radChart.Series[0].DataYColumn = ds.Tables[0].Columns[1].ColumnName;
radChart.PlotArea.XAxis.DataLabelsColumn = ds.Tables[0].Columns[0].ColumnName;
radChart.ChartTitle.TextBlock.Text = ChartTitle;
radChart.Series[0].Name = SeriesName;
protected void radChart_ItemDataBound(object sender, Telerik.Charting.ChartItemDataBoundEventArgs e) {
DataSet ds = (DataSet)ViewState["Result"];
e.SeriesItem.Name = ((DataRowView)e.DataItem)[ds.Tables[0].Columns[0].ColumnName].ToString();
e.SeriesItem.ActiveRegion.Tooltip += ((DataRowView)e.DataItem)[ds.Tables[0].Columns[0].ColumnName].ToString() + ": " + e.SeriesItem.YValue;
}
and aspx looks like following:
<
telerik:RadChart
ID
=
"radChart"
runat
=
"server"
Height
=
"650px"
AutoLayout
=
"true"
OnItemDataBound
=
"radChart_ItemDataBound"
SkinsOverrideStyles
=
"True"
>
<;
<
ChartTitle
>
<
TextBlock
>
</
TextBlock
>
</
ChartTitle
>
<
Series
>
<
telerik:ChartSeries
>
<
Appearance
LegendDisplayMode
=
"ItemLabels"
TextAppearance-AutoTextWrap
=
"True"
>
</
Appearance
>
</
telerik:ChartSeries
>
</
Series
>
<
PlotArea
>
<
XAxis
AutoScale
=
"true"
>
<
Appearance
TextAppearance-TextProperties-Color
=
"Black"
>
<
TextAppearance
AutoTextWrap
=
"true"
>
</
TextAppearance
>
<
LabelAppearance
Position-AlignedPosition
=
"Left"
RotationAngle
=
"45"
>
</
LabelAppearance
>
</
Appearance
>
</
XAxis
>
</
PlotArea
>
</
telerik:RadChart
>
For some reason, the Pie legend won't show up on the side.
Please help me
Alan