Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views
I have a legacy asp application that I am converting into a telerik application. The .NET framework has been converted to 4.0. In visual studio I used the Telerik menu option to update the project to a Telerik project (i.e. update the web.config, etc.). On the first page being converted I replaced an asp combobox with a radcombobox then added hard coded radcomboboxlistitems to the combobox in the asp page. When I displaly the page the telerik radcombobox is disabled or appears to be. Next, I added a new page to the project and again added the same radcombobox control with items; however, in this page it worked. Has anyone seen this behavior before? One note, I checked the javascript on the page and nothing appears to be disabling any controls. This is a strange one?

Thanks,


Steve Holdorf
Princy
Top achievements
Rank 2
 answered on 11 Feb 2013
2 answers
145 views
Good day,

  we have a number of pages in a website, that use a Radgrid with custom skinning and column templates. Our issue is that the very first grid database update operation (insert, change, delete) is very slow (in the order of 10 to 15 seconds),
while all the consecutive operations are very fast (in the order of a fraction of a second).

We experience this behavior regardless of the first page that we operate into, and regardless of the consequently opened pages, so there is no relation between the first grid of operation, and the consequent pages that are opened, and their grids,
it's always the first grid database update operation that's slow. We already verified that this is also not PC related. Very different systems behave identically.
Basically, once the application is running and has performed an update operation, the problem goes away, until the application is restarded in Visual studio, and a first database update operation is performed.

Given the spectrum of possible places to look at, to pinpoint the origin of this behavior, we would like to know if anybody has experienced something similar, or has a suggestion on the matter.

Thanks in advance.

archimede
Top achievements
Rank 1
 answered on 11 Feb 2013
1 answer
169 views
Hi,
I'm using the checkbox=true property for the RadComboBox.
Here is the code:

  <telerik:RadComboBox ID="cboApplication" runat="server" 

            CheckBoxes="true" EnableCheckAllItemsCheckBox="true">

            <Localization CheckAllString="All" AllItemsCheckedString="All" ItemsCheckedString="Items Selected" />

        </telerik:RadComboBox>

In code behind I fill in the values and set all items to selected.

My Problem is that after changing the selection (un selecting a few items) and closing the combobox, only the first item is displayed in the combobox.
I would like that all the selected items will be displayed.

Naphtali

Kalina
Telerik team
 answered on 11 Feb 2013
1 answer
309 views
Hi,

We are using RadGrid to render our data in tabular format. There is one DateTime column that is going to show the data in "MMMM dd, yyyy" format (i.e. December 15, 2012). We are trying using GridDateTimeColumn and GridTemplateColumn for the same. But we are not able to fulfill our requirements.

Requirements are :
1. Datetime column should not show "12:00 AM" if it does not have any time information. (should show date part only) (i.e. December 15, 2012)
2. Null or 1/1/1900 date value should be shown as Blank. (i.e. EMPTY)
3. If time part is available, column/cell should have time part visible next to date (i.e. December 15, 2012 05:00 PM)
4. there should be datepicker for filtering on column.

All these should work together.

We have tried following approaches but we are not able to do conditional formatting. We are able to go either way. Can anyone please help on this?


Your quick reply should be really helpful.

<rad:GridDateTimeColumn UniqueName="GridDateTimeColumnEndDate" AllowSorting="true" Visible="True" HeaderText="Ends" DataField="EndDate" SortExpression="EndDate" ReadOnly="true" AutoPostBackOnFilter="true" CurrentFilterFunction="EqualTo" ShowFilterIcon="false" DataType="System.DateTime" DataFormatString="{0:MMMM dd, yyyy}" EnableTimeIndependentFiltering="false" >
      <ItemStyle Width="260px" />
</rad:GridDateTimeColumn>


<rad:GridTemplateColumn UniqueName="EndDate" HeaderText="EndDate" DataField="EndDate" SortExpression="EndDate" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" DataType="System.DateTime">
 
        <ItemTemplate>
                <asp:Label ID="lblend" runat="server" Text='<%# fixDate(DataBinder.Eval(Container.DataItem,"EndDate")) %>'></asp:Label>
        </ItemTemplate>
 
         <FilterTemplate>
                <rad:RadDatePicker ID="rp" runat="server" Width="100px" SelectedDate='<%# SetEndDate(Container) %>' ClientEvents-OnDateSelected="DateSelected" >
                                <DateInput runat="server" DateFormat="MMMM dd, yyyy" ></DateInput>
                </rad:RadDatePicker>
         </FilterTemplate>
         <ItemStyle Font-Size="10pt" Width="150px" />
</rad:GridTemplateColumn>


Regards,
Maulik
Princy
Top achievements
Rank 2
 answered on 11 Feb 2013
3 answers
72 views
My search is failing me, so I apologize if I've missed this.

What I have is a Grid, with multiple rows, and each row has has various checkboxes, textboxes, and dropdowns in it. The user selects various options and enters data.
(think of an advanced search option screen)

I have this grid working correctly.

They then click a submit button.

I would like to make an ajax request to populate a 2nd grid, right below the 1st grid, so they can see there results.

This 'seems' like it should be easy to do, but I just can't put it together.

Can someone point me in the right direction to a tutorial?

Thanks!
Shinu
Top achievements
Rank 2
 answered on 11 Feb 2013
3 answers
180 views
Hi ,

I am using  edit  and insert template to display  grid items in edit mode. I have  several  comboboxes in edittemplate and would like to have customvalidator that runs on client side.

If tselected index of the combobox  is "0" then it should not let user insert/edit a record. Code  shown below doesnot work at all times, especially when I have multiple comboboxes.


Javascript fxn
 function ValidateComboBoxInNGGridEditForm(customValidator, arguments) {
                         if (arguments.Value == "< Select a Value >") {
                             arguments.IsValid = false; 
                         } else {
                             arguments.IsValid = true; 
                         }
                    }


c# Code

   case "REQCOMBOBOX":
                        RadComboBox comboBox = new RadComboBox();
                        comboBox.Width = new Unit(215.0, UnitType.Pixel);
                     .....................
                       
                        comboBox.SelectedIndex = -1;
                            CustomValidator customValidator = new CustomValidator();
                            customValidator.ID = comboBox.ID + "REQFVLD";
                            customValidator.ControlToValidate = comboBox.ID;
                            customValidator.ClientValidationFunction = "ValidateComboBoxInNGGridEditForm" ;
                            customValidator.ErrorMessage = " *";


Am I missing anything here?

Thanks,
Prava
Princy
Top achievements
Rank 2
 answered on 11 Feb 2013
3 answers
199 views
hi,
I have two buttons (button1 and button2) and for each of these buttons I have 2 textbox login. I wish that when I write in the first textbox and hit the enter button on your computer, it must start button code button1 or if I write in the second textbox and hit the enter button to start the second button button2 code .... I tried but it always starts code written in the first button. So I decided to disable the keypress event = 13 across the page. But now my client wants the buttons function by pressing the "enter" key.
Princy
Top achievements
Rank 2
 answered on 11 Feb 2013
4 answers
147 views
Hello, I have a RadGrid with a NestedTemplateView similar to the following:

     
<telerik:RadGrid id="RadGrid1"
                 runat="server"
                 Gridlines="None"
                 ShowStatusBar="true"
                 AllowSorting="True"
                 AllowPaging="True" 
                 AllowFilteringByColumn="true"
                 AutoGenerateColumns="true"
                 Height="100%"
                 PageSize="70"
                 DataKeyNames="GUID"
                 OnItemCommand="RadGrid1_ItemCommand"
                 ShowGroupPanel="True"
                 OnPreRender="RadGrid1_PreRender"
                 OnNeedDataSource="RadGrid1_NeedDataSource"
                 OnDataBound="RadGrid1_DataBound">
     
    <MasterTableView GroupLoadMode="server" 
                     TableLayout="Fixed"
                     GroupsDefaultExpanded="False"
                     ClientDataKeyNames="GUID"
                     DataKeyNames="GUID">
    <NestedViewSettings>
        <ParentTableRelation>
            <telerik:GridRelationFields DetailKeyField="GUID" MasterKeyField="GUID" />
        </ParentTableRelation>
    </NestedViewSettings>
        <NestedViewTemplate>
            <asp:Panel ID="NestedViewPanel1"
                       runat="server"
                       CssClass="viewWrap bordered-bottom">
                <telerik:RadTabStrip runat="server"
                                     ID="RadTabStrip1"
                                     Orientation="HorizontalTop"
                                     SelectedIndex="0"
                                     MultiPageID="RadMultiPage1">
                    <Tabs>
                        <telerik:RadTab Text="A"></telerik:RadTab>
                        <telerik:RadTab Text="B"></telerik:RadTab>
                    </Tabs>
               </telerik:RadTabStrip>
               <telerik:RadMultiPage runat="server"
                                     ID="RadMultiPage1"
                                     SelectedIndex="0"
                                     Height="200px"
                                     Width="1200px"
                                     CssClass="tablePadding">
 
                        <telerik:RadPageView runat="server">
                                 <%= GetDetails() %>
                        </telerik:RadPageView>
                        <telerik:RadPageView runat="server">
                        <p>Test</p>
                        </telerik:RadPageView>
               </telerik:RadMultiPage>
                
           </asp:Panel>
        </NestedViewTemplate>
    </MasterTableView>
    <ClientSettings AllowDragToGroup="True" EnableRowHoverStyle="true">
        <Selecting AllowRowSelect="True" />
 
        <Scrolling AllowScroll="True"
                   EnableVirtualScrollPaging="True"
                   UseStaticHeaders="True"
                   SaveScrollPosition="True" />
    </ClientSettings>
    <GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
</telerik:RadGrid>


When a row is expanded, a hidden field gets populated with the GUID of the row clicked (in ItemCommand event):

protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        hiddenGUIDField.Value = RadGrid1.MasterTableView.Items[e.Item.ItemIndex].GetDataKeyValue("GUID").ToString();
    }
}

Finally, the <%= GetDetails() %> is evaluated and placed onto the page:

public string GetDetails()
{
    string markUp = s.GetContentFromServiceLayers(hiddenGUIDField.Value)
    return Server.HtmlDecode(markUp);
}

(Note: GetDetails() just returns a pre-formatted string of HTML markup to be displayed within the RadPageView)

This all works fine, until a 2nd row is expanded.  At this point, the Ajax will fire, but the results are then placed onto both NestedTemplateViews, instead of just the most recent one.  How can I fix this so that each expanded row has it's own relevant content?  I thought that the ParentTableRelation takes care of this.

Thanks.
Princy
Top achievements
Rank 2
 answered on 11 Feb 2013
2 answers
191 views
I've copied and pasted multiple examples, but I always get an exception.

How do I get the "Loading..." ajax spinner image?

Here is my code? I'm starting out simple. All I'm doing is clicking a button to populate a grid.

Thanks!
   <form id="form1" runat="server">
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
 
   <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
 <AjaxSettings>
      <telerik:AjaxSetting  AjaxControlID="Button2">
           <UpdatedControls>
              <telerik:AjaxUpdatedControl ControlID="RadGrid2" />
              <telerik:AjaxUpdatedControl ControlID="lblMessage" />
           </UpdatedControls>
      </telerik:AjaxSetting>
   </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadButton ID="button2" runat=server Text="Go"></telerik:RadButton>
 
 
 
<asp:label ID=lblMessage runat=server></asp:label>
<telerik:RadGrid ID="RadGrid2" runat="server" AutoGenerateColumns="true" ></telerik:RadGrid>
    
   </form>
Sammy
Top achievements
Rank 1
 answered on 10 Feb 2013
0 answers
59 views
Because the stakes are so high, we will not cease from our effort to assure that healthcare for all does not mean freedom for few,” Cardinal Timothy Dolan of New York, president of the conference, said in a statement. “We will continue to stand united with brother bishops, religious institutions, and individual citizens who seek redress in the courts for as long as this is necessary The policy would give women at non-profit, religious-based organizations, like certain hospitals and universities, the ability to receive contraception through separate health policies at no charge.
Dadas
Top achievements
Rank 1
 asked on 10 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?