Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
174 views
I have a RadMultiPage with a RadPageView in it.
In the latter one I have an <asp:ImageButton control which should perform a postback to download a file and put it into the response stream. Of course Ajax doesn't allow this because of the partial rendering.

If I try this I get the following error which is understandable:
Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
Details: Error parsing near ...




How should I solve this? How can I force the ImageButton to perform a full postback or is there a better solution?

Thanks,
Stephan
Dimitar Terziev
Telerik team
 answered on 20 Jul 2011
3 answers
129 views
HI,
      What I am trying to do is use the UI of RadSchedulerRecurrenceEditor and save the pattern string into database. Then a windows service will pick this up and update the next occurence into database.
Is there a way to do this?
Are there any APIs that I can use in win service or a console application to get the next occurence from the pattern string?

Thanks & Regards.
Peter
Telerik team
 answered on 20 Jul 2011
4 answers
99 views
Help. I have the grid showing a master/detail via EntityDataSources just fine. And I see all the columns from the master table but cannot see any columns for the detail table. I can add bound columns manually but I don't want to type all that markup.

How can I have the property editor show me all the selected columns automatically so I can edit thema s to their headers, visibility etc. without have to add each column manuallay tot he markup?

VS2010 using the trial version published a few months ago.

Dave
Iana Tsolova
Telerik team
 answered on 20 Jul 2011
2 answers
509 views
Hi,

I wish to loop through all rows in a RadGrid, not just the ones that are currently displayed, to extract the value of a cell. I am using the following code:
For Each item As GridDataItem In RadGrid1.Items
          Response.Write("Custid=" & item("custid").Text & "<BR>")
Next

This works fine but only for the currently displayed items. I wish to do this for all items in RadGrid, not just the ones that are displayed.

Thanks

Tim
Danny
Top achievements
Rank 1
 answered on 20 Jul 2011
1 answer
198 views

Hi,

I am evaluating your product, and can't figure out how to set the date range for a TimeLineView.

I am trying to display this week and next week, weekdays only, always starting on Monday of this week and ending on Friday of next week.  I would also like a break between weeks so that week 1 shows up above week 2.

I am doing this server side in C#:

The below code works but displays a date range from today though to the number of slots specified.

schd.DataSource = datasource;

schd.DataKeyField = "ID";

schd.DataSubjectField = "NumSwaps";

schd.DataStartField = "Roll_Date";

schd.DataEndField = "Roll_Date";

schd.SelectedView = SchedulerViewType.TimelineView;

schd.TimelineView.ColumnHeaderDateFormat = "dddd MM/dd";

schd.TimelineView.NumberOfSlots = 5;

schd.ShowNavigationPane = false;

schd.FirstDayOfWeek = DayOfWeek.Monday;

schd.LastDayOfWeek = DayOfWeek.Friday;

schd.ShowFooter = false;

schd.ShowAllDayRow = false;

schd.ShowHoursColumn = false;

schd.OverflowBehavior = OverflowBehavior.Expand;

schd.DataBind();

<telerik:RadScheduler ID="schd" runat="server" ShowViewTabs="false" ReadOnly="true">

</telerik:RadScheduler>

 

Screenshot attached, and thanks!

Dawn

Peter
Telerik team
 answered on 20 Jul 2011
1 answer
78 views
Hi there,

I'd like to suggest that you add each of the RadGrid column types as items to the Visual Studio toolbox. The default behaviour could be to include a configurable list of column properties as the starting point when you drag a column type from the toolbox into your grid markup.

Any thoughts?

Rob
Iana Tsolova
Telerik team
 answered on 20 Jul 2011
1 answer
94 views
Hi there,
         I have using Radtabstrip with 5 radtabs.In the  Radmultipageview i am using only one page view with one asp:Placeholder  .In that page i have created Radgrid dynamically using pageInt event.When i click anyone of the tab, Radgrid shows the respected data for different radtabs and dynamically added it to the placeholder.So each tabs show the different datas in the single Radgrid in a single pageview..My problem is,that scenario works fine for some browsers..But in the case of  browser like moZila,....every tabs shows the grid same as first tab  which has contain first tab content...What mistake i have done..Please explain..

my code ..
protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        if (!Page.IsCallback)
        {
            if (!Page.IsPostBack)
            {
                Session["table"] = null;
            }
            if (null == Session["table"])
            {
                if (Session["userID"] != null)
                {
                    //do something
                }
                Session["table"] = tableName;
            }
            else
            {
                tableName = Session["table"].ToString();
            }
           //Creating grid contents
            PopulateGrid(tableName);
        }
        else
        {
            //Do nothing
        }
    }
Iana Tsolova
Telerik team
 answered on 20 Jul 2011
1 answer
130 views
I am considering using the scheduler control for resource planning.  One of the requirements is being able to plan shift workers.  These workers work on a 2 week rotating schedule, for example:

Monday, Tuesday ON
Wednesday, Thursday OFF
Friday, Saturday, Sunday ON
Monday, Tuesday ON
Wednesday, Thursday, Friday OFF
Saturday, Sunday ON


Is there a way to set up a reoccurrence rule to handle this?


 
Plamen
Telerik team
 answered on 20 Jul 2011
1 answer
250 views
The RadTextBox with multiline property on is having a really annoying problem while typing. Every keypress is reflected after a few seconds, and makes the control unusable. We are having this problem with the latest version (2011.2.712.40); where the previous one did not have this issue.

We do recall this problem from previous versions (probably 2010 versions) of ASP.NET Ajax library; so it is back.

Worst of all, we went live without noticing this; and now the customers are struggling with the problem.

Please very very urgent solution ASAP.
Martin
Telerik team
 answered on 20 Jul 2011
3 answers
169 views
Hi.

I have a GridNumericColumn in a RadGrid that I put a lot of very small numbers in.

If i put 0.01 in edit mode everything is fine. If I put 0.001 in it is changed to 0 when my cursor leaves the box. If I put my cursor back in the box it displays 0.001 again. It saves the value fine but the behaviour will mislead users and is not ideal. How can I stop this happening?

And if I put in values as small as 0.00001, which is quite often, the row won't save at all. I click on update and nothing happens. I know the database field datatype is fine (decimal(18, 12)) because at the moment i have to go and enter the smaller values straight into the database table when the grid won't save. I have to enter values as small 0.000000001.

What can I do to get around this problem?
Thanks for your help. My code is below. It is the "Factor" GridNumericColumn that is giving me the problem...

<form id="form1" runat="server">
<div>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <!-- content start -->
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadGrid ID="RadGrid1" runat="server" ShowStatusBar="True" DataSourceID="SqlDataSource1" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" GridLines="None" ShowGroupPanel="True" AllowAutomaticDeletes="true" AllowAutomaticInserts="true" AllowAutomaticUpdates="true">
        <HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default">
        </HeaderContextMenu>
        <MasterTableView DataSourceID="SqlDataSource1" AutoGenerateColumns="False" DataKeyNames="EmissionFactorGroupID" AllowMultiColumnSorting="True" PageSize="20" CommandItemDisplay="Bottom" CommandItemSettings-AddNewRecordText=" Add New Emission Factor Group" CommandItemSettings-ShowAddNewRecordButton="true" CommandItemSettings-ShowExportToExcelButton="true">
            <DetailTables>
                <telerik:GridTableView DataKeyNames="EmissionFactorID" DataSourceID="SqlDataSource2" Width="100%" runat="server" AutoGenerateColumns="false" AllowFilteringByColumn="false" CommandItemDisplay="Bottom" CommandItemSettings-AddNewRecordText=" Add New Emission Factor" CommandItemSettings-ShowAddNewRecordButton="true">
                    <ParentTableRelation>
                        <telerik:GridRelationFields DetailKeyField="EmissionFactorGroupID" MasterKeyField="EmissionFactorGroupID" />
                    </ParentTableRelation>
                    <DetailTables>
                        <telerik:GridTableView DataKeyNames="EmissionGasBreakdownID" DataSourceID="SqlDataSource3" Width="100%" runat="server" AutoGenerateColumns="false" AllowFilteringByColumn="false" CommandItemDisplay="Bottom" CommandItemSettings-AddNewRecordText=" Add New Gas" CommandItemSettings-ShowAddNewRecordButton="true">
                            <ParentTableRelation>
                                <telerik:GridRelationFields DetailKeyField="EmissionFactorID" MasterKeyField="EmissionFactorID" />
                            </ParentTableRelation>
                            <Columns>
                                <telerik:GridBoundColumn Visible="false" ReadOnly="true" DataField="EmissionGasBreakdownID" DataType="System.Int32" SortExpression="EmissionGasBreakdownID" UniqueName="EmissionGasBreakdownID">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn Visible="false" ReadOnly="true" DataField="EmissionFactorID" SortExpression="EmissionFactorID" UniqueName="EmissionFactorID" DataType="System.Int32">
                                </telerik:GridBoundColumn>
                                <telerik:GridDropDownColumn DropDownControlType="RadComboBox" DataType="System.Int32" DataField="GasID" HeaderText="Gas" SortExpression="GasID" UniqueName="GasID" DataSourceID="SqlDataSource4" ListTextField="GasName" ListValueField="EmissionGasID">
                                </telerik:GridDropDownColumn>
                                <telerik:GridNumericColumn DataField="Factor" DataType="System.Decimal" HeaderText="Factor" SortExpression="Factor" UniqueName="Factor" KeepNotRoundedValue="true">
                                </telerik:GridNumericColumn>
                                <telerik:GridBoundColumn DataField="UOM" HeaderText="UOM" SortExpression="UOM" UniqueName="UOM">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </telerik:GridTableView>
                    </DetailTables>
                    <Columns>
                        <telerik:GridBoundColumn Visible="false" ReadOnly="true" DataField="EmissionFactorID" DataType="System.Int32" HeaderText="EmissionFactorID" SortExpression="EmissionFactorID" UniqueName="EmissionFactorID">
                        </telerik:GridBoundColumn>
                        <telerik:GridNumericColumn DataField="Factor" DataType="System.Decimal" HeaderText="Factor" SortExpression="Factor" UniqueName="Factor" KeepNotRoundedValue="true" AllowRounding="false" NumericType="Number" DataFormatString="{0:0.0000000000}">
                        </telerik:GridNumericColumn>
                        <telerik:GridDateTimeColumn DataField="EffectiveFrom" DataType="System.DateTime" HeaderText="Effective From" SortExpression="EffectiveFrom" UniqueName="EffectiveFrom">
                        </telerik:GridDateTimeColumn>
                        <telerik:GridDateTimeColumn DataField="EffectiveTo" DataType="System.DateTime" HeaderText="Effective To" SortExpression="EffectiveTo" UniqueName="EffectiveTo">
                        </telerik:GridDateTimeColumn>
                        <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description" UniqueName="Description">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn DataField="Source" HeaderText="Source" SortExpression="Source" UniqueName="Source">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn Visible="false" ReadOnly="true" DataField="EmissionFactorGroupID" DataType="System.Int32" HeaderText="EmissionFactorGroupID" SortExpression="EmissionFactorGroupID" UniqueName="EmissionFactorGroupID">
                        </telerik:GridBoundColumn>
                        <telerik:GridNumericColumn DataField="IPCCTier" DataType="System.Byte" HeaderText="IPCC" SortExpression="IPCCTier" UniqueName="IPCCTier" HeaderStyle-Width="20px" ItemStyle-Width="20px" NumericType="Number">
                        </telerik:GridNumericColumn>
                    </Columns>
                    <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                    <ExpandCollapseColumn Visible="True">
                    </ExpandCollapseColumn>
                </telerik:GridTableView>
            </DetailTables>
            <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
            <RowIndicatorColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn>
                <HeaderStyle Width="20px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <telerik:GridBoundColumn Visible="false" ReadOnly="true" DataField="EmissionFactorGroupID" DataType="System.Int32" HeaderText="EmissionFactorGroupID" SortExpression="EmissionFactorGroupID" UniqueName="EmissionFactorGroupID">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="GroupName" HeaderText="Group Name" SortExpression="GroupName" UniqueName="GroupName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ResourceType" HeaderText="Resource Type" SortExpression="ResourceType" UniqueName="ResourceType">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ResourceName" HeaderText="Name" SortExpression="ResourceName" UniqueName="ResourceName">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="ResourceUOM" HeaderText="UOM" SortExpression="ResourceUOM" UniqueName="ResourceUOM">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="Region" HeaderText="Region" SortExpression="Region" UniqueName="Region">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="OwnerTenantID" HeaderText="Owner Tenant ID" SortExpression="OwnerTenantID" UniqueName="OwnerTenantID" DataType="System.Int32">
                </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn DataField="Shared" DataType="System.Boolean" HeaderText="Shared" SortExpression="Shared" UniqueName="Shared">
                </telerik:GridCheckBoxColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings AllowDragToGroup="True">
        </ClientSettings>
    </telerik:RadGrid>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>" DeleteCommand="
    DELETE FROM [_FFEmissionGasBreakdown] WHERE [EmissionFactorID] IN (SELECT [EmissionFactorID] FROM [_FFEmissionFactor] WHERE ([EmissionFactorGroupID] = @EmissionFactorGroupID));
    DELETE FROM [_FFEmissionFactor] WHERE [EmissionFactorGroupID] = @EmissionFactorGroupID;
    DELETE FROM [_FFEmissionFactorGroupToGroupSetLink] WHERE [EmissionFactorGroupID] = @EmissionFactorGroupID;
    DELETE FROM [_FFEmissionFactorGroup] WHERE [EmissionFactorGroupID] = @EmissionFactorGroupID;
    " InsertCommand="
    INSERT INTO [_FFEmissionFactorGroup] ([GroupName], [ResourceType], [ResourceName], [ResourceUOM], [Region], [OwnerTenantID], [Shared]) VALUES (@GroupName, @ResourceType, @ResourceName, @ResourceUOM, @Region, @OwnerTenantID, @Shared);
    INSERT INTO [_FFEmissionFactorGroupToGroupSetLink] ([EmissionFactorGroupID], [EmissionFactorGroupSetID]) VALUES ((SELECT TOP 1 EmissionFactorGroupID FROM _FFEmissionFactorGroup ORDER BY EmissionFactorGroupID DESC), (SELECT TOP 1 EmissionFactorGroupSetID FROM _FFEmissionFactorGroupSet WHERE GroupSetOwnerTenantID = @OwnerTenantID));
    " SelectCommand="SELECT * FROM [_FFEmissionFactorGroup] WHERE ([OwnerTenantID] = @OwnerTenantID) ORDER BY [Region], [GroupName], [ResourceUOM]" UpdateCommand="UPDATE [_FFEmissionFactorGroup] SET [GroupName] = @GroupName, [ResourceType] = @ResourceType, [ResourceName] = @ResourceName, [ResourceUOM] = @ResourceUOM, [Region] = @Region, [OwnerTenantID] = @OwnerTenantID, [Shared] = @Shared WHERE [EmissionFactorGroupID] = @EmissionFactorGroupID">
        <SelectParameters>
            <asp:SessionParameter Name="OwnerTenantID" SessionField="OwnerTenantID" Type="Int32" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="EmissionFactorGroupID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="GroupName" Type="String" />
            <asp:Parameter Name="ResourceType" Type="String" />
            <asp:Parameter Name="ResourceName" Type="String" />
            <asp:Parameter Name="ResourceUOM" Type="String" />
            <asp:Parameter Name="Region" Type="String" />
            <asp:Parameter Name="OwnerTenantID" Type="Int32" />
            <asp:Parameter Name="Shared" Type="Boolean" />
            <asp:Parameter Name="EmissionFactorGroupID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="GroupName" Type="String" />
            <asp:Parameter Name="ResourceType" Type="String" />
            <asp:Parameter Name="ResourceName" Type="String" />
            <asp:Parameter Name="ResourceUOM" Type="String" />
            <asp:Parameter Name="Region" Type="String" />
            <asp:SessionParameter Name="OwnerTenantID" SessionField="OwnerTenantID" Type="Int32" />
            <asp:Parameter Name="Shared" Type="Boolean" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>" SelectCommand="SELECT [EmissionFactorID], [Factor], [EffectiveFrom], [EffectiveTo], [Description], [Source], [EmissionFactorGroupID], [IPCCTier] FROM [_FFEmissionFactor] WHERE ([EmissionFactorGroupID] = @EmissionFactorGroupID) ORDER BY [EffectiveFrom], [Description]" DeleteCommand="DELETE FROM [_FFEmissionGasBreakdown] WHERE [EmissionFactorID] = @EmissionFactorID; DELETE FROM [_FFEmissionFactor] WHERE [EmissionFactorID] = @EmissionFactorID" InsertCommand="INSERT INTO [_FFEmissionFactor] ([Factor], [EffectiveFrom], [EffectiveTo], [Description], [Source], [EmissionFactorGroupID], [IPCCTier], [MaterialID]) VALUES (@Factor, @EffectiveFrom, @EffectiveTo, @Description, @Source, @EmissionFactorGroupID, @IPCCTier, 1)"
        UpdateCommand="UPDATE [_FFEmissionFactor] SET [Factor] = @Factor, [EffectiveFrom] = @EffectiveFrom, [EffectiveTo] = @EffectiveTo, [Description] = @Description, [Source] = @Source, [IPCCTier] = @IPCCTier WHERE [EmissionFactorID] = @EmissionFactorID">
        <SelectParameters>
            <asp:SessionParameter Name="EmissionFactorGroupID" SessionField="EmissionFactorGroupID" Type="Int32" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="EmissionFactorID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="Factor" Type="Decimal" />
            <asp:Parameter Name="EffectiveFrom" Type="DateTime" />
            <asp:Parameter Name="EffectiveTo" Type="DateTime" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="Source" Type="String" />
            <asp:SessionParameter Name="EmissionFactorGroupID" SessionField="EmissionFactorGroupID" Type="Int32" />
            <asp:Parameter Name="IPCCTier" Type="Byte" />
            <asp:Parameter Name="EmissionFactorID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="Factor" Type="Decimal" />
            <asp:Parameter Name="EffectiveFrom" Type="DateTime" />
            <asp:Parameter Name="EffectiveTo" Type="DateTime" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="Source" Type="String" />
            <asp:Parameter Name="EmissionFactorGroupID" Type="Int32" />
            <asp:Parameter Name="IPCCTier" Type="Byte" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>" DeleteCommand="DELETE FROM [_FFEmissionGasBreakdown] WHERE [EmissionGasBreakdownID] = @EmissionGasBreakdownID" InsertCommand="INSERT INTO [_FFEmissionGasBreakdown] ([EmissionFactorID], [GasID], [Factor], [UOM]) VALUES (@EmissionFactorID, @GasID, @Factor, @UOM)" SelectCommand="SELECT * FROM [_FFEmissionGasBreakdown] WHERE EmissionFactorID = @EmissionFactorID ORDER BY [GasID]" UpdateCommand="UPDATE [_FFEmissionGasBreakdown] SET [GasID] = @GasID, [Factor] = @Factor, [UOM] = @UOM WHERE [EmissionGasBreakdownID] = @EmissionGasBreakdownID">
        <SelectParameters>
            <asp:SessionParameter Name="EmissionFactorID" SessionField="EmissionFactorID" Type="String" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="EmissionGasBreakdownID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="GasID" Type="Int32" />
            <asp:Parameter Name="Factor" Type="Decimal" />
            <asp:Parameter Name="UOM" Type="String" />
            <asp:Parameter Name="EmissionGasBreakdownID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="EmissionFactorID" Type="Int32" />
            <asp:Parameter Name="GasID" Type="Int32" />
            <asp:Parameter Name="Factor" Type="Decimal" />
            <asp:Parameter Name="UOM" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="SqlDataSource4" runat="server" ConnectionString="<%$ ConnectionStrings:SiteSqlServer %>" SelectCommand="SELECT EmissionGasID, GasName FROM _FFEmissionGas Order By GasName" />
</div>
</form>

Mira
Telerik team
 answered on 20 Jul 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?