Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
114 views

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

Tsvetina
Telerik team
 answered on 31 Jan 2011
9 answers
601 views
Hi,

I am using adhoc tool to populate data for RadChart pie and I don't know the column name at front for DataYColumn until end user run the adhoc query. I did add DataYColumn  at run time using following code:

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

Yavor
Telerik team
 answered on 31 Jan 2011
1 answer
85 views
hi all
I use a radgrid with property "allowPaging=true" and I have 1 checkbox volumn in it

when user checked the checkboxs of row 1,2,3 of page1 and go to page2 and check row2 then return to page 1,checkboxs are cleare and unchecked
i want save this states so when user chang pages and return to previouse pages,checkboxes didn't unchecked.how can I do that?
Jayesh Goyani
Top achievements
Rank 2
 answered on 31 Jan 2011
4 answers
518 views
hi all

I use radgrid in my page with 2 GridBoundColumn

I want add 1 checkbox column to this grid that users can checked them.
then in my save button(that is in above of my page outside of grid),I check each checkbox of each row.if this is"checked",I save that row in my database

how can I do that

Jayesh Goyani
Top achievements
Rank 2
 answered on 31 Jan 2011
1 answer
113 views
Sorry for my english
The drag and drop in the treeview is sucessfully when I confirm this with window confirm create in server side, because I must examine some conditions on source and destination node.
How can I add this runtime confirmation window, assuming I have an ajax update panel?
Thanks
Silvia
Princy
Top achievements
Rank 2
 answered on 31 Jan 2011
1 answer
157 views
Hi all,

Are there any ways to change background color of selected Item of Menu in Server side?

Thanks.

Andy.

Shinu
Top achievements
Rank 2
 answered on 31 Jan 2011
3 answers
179 views
Hi,

I have a radgrid as image attached below.
Which have column with header text is "Title (linked to item with edit menu)", which have data type is string and values is hyperlink, i want to sort this column to ascending/descending. I know when RadGrid do sorting, it will sort values in datatable, but this values is a html string so sorting result after sorting will not as desired. Please give me a solution to solve this problem.

Thanks in advance
Phu Dang
Dave
Top achievements
Rank 2
 answered on 31 Jan 2011
2 answers
283 views

Hello all,

I do a submit by a ComboBox, AutoPostBack set to True, CausesValidation is set to True and the ValidationGroup is set
In this simple example is only validating the TextBox with a RequiredFieldValidator
And that works, ValidationSummary is showing the message.

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
</telerik:RadScriptManager>
<telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="True" 
    ValidationGroup="item" CausesValidation="True">
    <Items>
        <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="RadComboBoxItem1" />
        <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="RadComboBoxItem2" />
    </Items>
</telerik:RadComboBox>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
    ErrorMessage="RequiredFieldValidator" ValidationGroup="item"></asp:RequiredFieldValidator>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" ValidationGroup="item" />

But the ComboBox is changing to the chosen index while the ValidationGroup is not valid.
How can I prevent the changing of the ComboBox when the ValidationGroup is not valid?
A solution could be to check if the form is valid, and if not then set the ComboBox to its previous value but I don’t know how to check the form and return a True or False, like the method it is done by a PostBack event?

Thanks,

Marco

Marco
Top achievements
Rank 2
 answered on 30 Jan 2011
3 answers
126 views
Hi,


        I have Query. Can we Customize the Grid Filter Column.
        I want to add a Rad ComboBox to the Grid.

        Is it is possible? How ? Can u give me some Example?
Kiara
Top achievements
Rank 1
 answered on 30 Jan 2011
2 answers
114 views
One of our developers is using a Radeditor inside a wizard. The editor uses a tools file. Modules have been stripped down to RadEditorStatistics and RadEditorHtmlInspector, and all tools definitions have been deleted. However, whenever he switches to Design view, the toolbars reset (the TOOLS section contains definitions for all toolbars/tools) and the modules are back to the full list. Remove it, change to design view, the same thing happens again.

Any ideas? Would the problem have anything to do with the editor being used inside a wizard?
Derek
Top achievements
Rank 1
 answered on 29 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?