Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
402 views
What event can I use to populate a radcombobox in filter template in a radgrid from server side code. I do not have the ability to use datasource referenced on the page.  Can I do in it in the radgrid OnColumnCreated or ondatabound events?
Princy
Top achievements
Rank 2
 answered on 24 Nov 2010
1 answer
87 views
I am trying to get my scheduler entries to show up in order of a resource (called PeriodID). The resource is used to store the ID of the Period selected (from the Period Table) as follows:

On Call (ID=1)
AM (ID=2)
PM (ID=3)
All Day (ID=4)

I am using SQL Datasources for binding.

I have tried using Order By PeriodID in the Datasource Select statement for the Schedule Data but that doesn't work. I then tried creating a class and using the appointmentcomparer as shown here http://www.telerik.com/community/forums/aspnet-ajax/scheduler/oder-of-entry-in-scheduler.aspx#1155620 but that adds another field to the Advanced form for manual PeriodID entry which is not what I need.

Does anyone know how to have the scheduler order entries by Resource? Thanks.
GlenB
Top achievements
Rank 1
 answered on 24 Nov 2010
0 answers
116 views

I'm having difficulty getting the RecurrenceEditor to populate from existing values.

Here's Telerik's example on how to populate the control:
http://www.telerik.com/help/aspnet-ajax/recurrenceeditor_serverside_populating.html

I created some code to read my selection and it spits out:

 


Recurrence Rule Text: 
DTSTART:20101124T173647Z DTEND:20000102T000000Z RRULE:FREQ=DAILY;UNTIL=20101130T000000Z;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR 
  
Scheduled Dates 
  
11/24/2010 5:36:47 PM
11/25/2010 5:36:47 PM
11/26/2010 5:36:47 PM
11/29/2010 5:36:47 PM

The control's state renders fine between post backs.  I then store the Recurrence Recurrence Rule Text in my database but when I try to read it back to the control later on I get nothing.  None of the items are selected in the control and even the Recurrence Checkbox isn't selected?  So, how do I assign this control it's values?  Here's my assignment code:


protected
void Page_Load(object sender, EventArgs e)
{
    this.RecurrenceEditor1.StartDate = Convert.ToDateTime("11/24/2010 5:36:47 PM");
    this.RecurrenceEditor1.RecurrenceRuleText = "DTSTART:20101124T173647Z DTEND:20000102T000000Z RRULE:FREQ=DAILY;UNTIL=20101130T000000Z;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR";
}

Any help would be appreciated,

Thanks,

Robert
Top achievements
Rank 1
 asked on 23 Nov 2010
3 answers
264 views
Folks,

Is it possible to show/hide RadComboBox depending on the RadioButtionListSelected Value? For example In RadioButtonList1_SelectedIndexChanged event, if my RadioButtonList1's selected Value = "1", show RadcomboBox (CountryName), else hide the RadComboBox.  Both My RadioButtonList and ComboBox are within EditTemplate of RadGrid.

Below is my code.

Thanks

<telerik:GridTemplateColumn DataField="rblLIST" HeaderText="rbl" UniqueName="rBL">
                        <EditItemTemplate>
                         
                               <asp:RadioButtonList ID="RadioButtonList1" runat="server"  AutoPostBack = "true"
                                onselectedindexchanged="RadioButtonList1_SelectedIndexChanged" 
                                RepeatDirection="Horizontal">
                                    <asp:ListItem Text="Yes" Value="1"></asp:ListItem>
                <asp:ListItem Text="No" Value="2"></asp:ListItem>
  
                            </asp:RadioButtonList>     
                              
                             
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                      
                    <telerik:GridTemplateColumn DataField="CountryName" HeaderText="Country" UniqueName="CountryName">
                      
                        <ItemTemplate>
                            <asp:Label ID="Label3" runat="server" Text='<%# Eval("CountryName") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadComboBox ID="rcbCountries"  
                                runat="server" 
                                AutoPostBack="true"
                                Skin="Vista"                                         
                                DataTextField="Name" 
                                DataValueField="CountryID">                                
                            </telerik:RadComboBox>
                        </EditItemTemplate>
                    </telerik:GridTemplateColumn>


gc_0620
Top achievements
Rank 1
 answered on 23 Nov 2010
4 answers
96 views
Hi there,

I have a page with RadSplitter which contains RadGrid and my custom user control (Footer) in two separate
RadPanes. I enabled ajax on the grid, but I would like to update the footer with ajax as well. In code
below I have tried inserting the footer id or the id of a panel that wraps the footer as ControlID in
AjaxUpdateControl tag. None of them worked and they even caused that the RadGrid doesn't work properly
(when I click on the next page button, it doesn't change the page, but loading icon is shown).
The footer user control contains only <%Reponse.Write(DateTime.Now);%>.

What am I missing?


<
telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid" UpdatePanelHeight="100%" />
                            <telerik:AjaxUpdatedControl ControlID="***WhatShouldBeHere?***" UpdatePanelHeight="100%" />
                    
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadSplitter ID="RadSplitter" runat="server" Orientation="Horizontal">
        <telerik:RadPane ID="TitleRadPane" runat="server" Height="26px" >
          <!-- ...... -->
        </telerik:RadPane>
        <telerik:RadPane ID="ContentRadPane" runat="server" Scrolling="None">
            <telerik:RadGrid
                ID="RadGrid"     
                DataSourceID="MasterObjectDataSource"
                EnableLinqExpressions="false"
                OnUpdateCommand="UpdateGrid"
                OnInsertCommand="UpdateGrid"
                OnDeleteCommand="DeleteItem"
                runat="server">
 
                <ClientSettings>
                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                    <Selecting AllowRowSelect="true" />
                </ClientSettings>
 
                <MasterTableView CommandItemDisplay="Top" AllowSorting="true" DataSourceID="MasterObjectDataSource" AllowFilteringByColumn="True" IsFilterItemExpanded="False" DataKeyNames="Id">
 
                    <CommandItemTemplate>
                       <!-- .... -->
                    </CommandItemTemplate>
 
                    <EditFormSettings UserControlName="AreaDetail.ascx" EditFormType="WebUserControl">
                        <EditColumn UniqueName="DummyEditColumnUniqueName">
                        </EditColumn>
                    </EditFormSettings>
 
                    <RowIndicatorColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </RowIndicatorColumn>
 
                    <ExpandCollapseColumn>
                        <HeaderStyle Width="20px"></HeaderStyle>
                    </ExpandCollapseColumn>
 
                    <Columns>
                       <!-- .... -->
                    </Columns>
                </MasterTableView>
                <SelectedItemStyle Wrap="True" />
                <SortingSettings SortedBackColor="" EnableSkinSortStyles="false" />
            </telerik:RadGrid>
        </telerik:RadPane>
 
        <telerik:RadPane ID="FooterRadPane" runat="server" Height="100">
            <asp:Panel ID="FooterPanel" runat="server">
                <metTrade:Footer ID="Footer" runat="server">
                </metTrade:Footer>
            </asp:Panel>
        </telerik:RadPane>
    </telerik:RadSplitter>
steve
Top achievements
Rank 1
 answered on 23 Nov 2010
2 answers
100 views
I have tried several attempts to add a item to the HeaderContextMenu. I was able to add a item utilizing this method
 
Protected Overloads Overrides Sub OnPreRenderComplete(ByVal e As EventArgs)
          
        Dim menu As RadContextMenu = rgvSchedules.HeaderContextMenu 
        Dim item As New RadMenuItem()
        item.Text = "Paste Results"
        item.PostBack = True
        menu.Items.Add(item)
        MyBase.OnPreRenderComplete(e)
    End Sub

The Postback method is because I was attempting to find a way to set a server side procedure on click. I removed the excess code from my failed attempts. There inlies the problem. I cannot for the life of me find a way to set the onclick method for the item that I added and when it is clicked I get a runtime error:

Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object.
Thomas
Top achievements
Rank 1
 answered on 23 Nov 2010
2 answers
47 views
Hello All,
I've faced to problem, that in Q3 2010 for AJAX when I use programmatically created RadGrid, header text is changed against SQL datasource - automatically inserted spaces in string (e.g. "Order ID" instead of "OrderID", "NBREQ_ TCP" instead of "NBREQ_TCP").
Is there any way to avoid header text change in dynamic grid without static columns declaration? 

This code is used to fill Grig (DGrid) with data from DataSet (dst)
dtv = dst.Tables("SourceTable").DefaultView()
dtv.Sort = sortstring
 
DGrid.DataSource = dtv_stat
DGrid.DataBind()


Thanks,
MexaHukyc
.
MexaHukyc
Top achievements
Rank 1
 answered on 23 Nov 2010
2 answers
53 views
Have a grid w/ in-place editing enabled. One of the fields stores a dollar amount (unit price) which is databound to my sql database via an sqldatasource, decimal(10,2) field. The column definition is as follows:

 

<telerik:GridMaskedColumn DataField="UnitPrice" DisplayMask="" 
HeaderText="Unit Price" Mask="$##,###.##" UniqueName="Unit Price" 
DataFormatString="{0:C2}"
<HeaderStyle HorizontalAlign="Center" Width="100px" /> 
<ItemStyle HorizontalAlign="Center" Width="100px" /> 
</telerik:GridMaskedColumn>

 

 

 


Let's take an item with a unit price of $110.00 from the database.

When the grid initially loads, the column properly displays the amount as $110.00

If I click edit, my in-place editing form appears and the input box for the unit price appears as:

$11,0__.00

Suffice to say, this is clearly incorrect. There are other editable columns in the grid... if the user intends to edit a different field (such as description) they also have to "correct" the incorrect unit price -- each and every time they perform an edit operation -- otherwise if they attempt to update w/o correcting it, they receive a "Exception Details: System.FormatException: Input string was not in a correct format." error when trying to update. This is very annoying to the user community.

Why is the masked control displaying the data incorrectly for edit, and how can I correct it so the value is properly displayed on the edit form to avoid this issue?
Vin
Top achievements
Rank 1
 answered on 23 Nov 2010
1 answer
61 views
Have a grid w/ in-place editing enabled. One of the fields stores a dollar amount (unit price) which is databound to my sql database via an sqldatasource, decimal(10,2) field. The column definition is as follows:

 

<telerik:GridMaskedColumn DataField="UnitPrice" DisplayMask="" 
HeaderText="Unit Price" Mask="$##,###.##" UniqueName="Unit Price" 
DataFormatString="{0:C2}"
<HeaderStyle HorizontalAlign="Center" Width="100px" /> 
<ItemStyle HorizontalAlign="Center" Width="100px" /> 
</telerik:GridMaskedColumn>

Let's take an item with a unit price of $110.00 from the database.

When the grid initially loads, the column properly displays the amount as $110.00

If I click edit, my in-place editing form appears and the input box for the unit price appears as:

$11,0__.00

Suffice to say, this is clearly incorrect. There are other editable columns in the grid... if the user intends to edit a different field (such as description) they also have to "correct" the incorrect unit price -- each and every time they perform an edit operation -- otherwise if they attempt to update w/o correcting it, they receive a "Exception Details: System.FormatException: Input string was not in a correct format." error when trying to update. This is very annoying to the user community.

Why is the masked control displaying the data incorrectly for edit, and how can I correct it so the value is properly displayed on the edit form to avoid this issue?
Vin
Top achievements
Rank 1
 answered on 23 Nov 2010
1 answer
54 views
Hi All,
I have a panelbar set up in FullExpandedItem mode.
Inside one of these I have a grid that scrolls.  I have found that on a callback, the grid loses it's scroll position, so I need to track that. Ok, I have that working.
My issue comes when my scrolling code is fired before the expand animation is complete - basically, once the animation is complete, the grid scroll position gets set back to the top.
I have solved it partially by choosing an arbitrary setTimeout number to make my scrolling code fire after the expand animation has finished, but I am having trouble finding out what this is meant to be!
I have an ExpandAnimation Duration of 200, 0 Delay, type OutQuart, but for some reason, I need to wait 500 ms to run my code.  Why is this?  If I use the Duration, it is too soon.  The client event OnClientItemExpand seems to occur when the expansion starts, so is no good to me.
Is there a reliable way to find out whether the animation has completed so that my scrolling code will work without a pause and reliably?
Thanks,
Steele.
Nikolay Tsenkov
Telerik team
 answered on 23 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?