Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
176 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
323 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
77 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
182 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
205 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
150 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
202 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
62 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
5 answers
653 views
I have a RadTreeView with a Context Menu which has 3 Iems

<telerik:RadMenuItem Value="NewFolder" Text="New Folder
"
ImageUrl="~/TreeView/Img/Outlook/12.gif"  >
 
</telerik:RadMenuItem>
 
<telerik:RadMenuItem Value="RenameFolder" Text="Rename Folder
"
Enabled="false" ImageUrl="~/TreeView/Img/Outlook/rename.gif" PostBack="false" >
 
</telerik:RadMenuItem>
 
<telerik:RadMenuItem Value="DeleteFolder" Text="Delete Folder
"
ImageUrl="~/TreeView/Img/Outlook/7.gif" >
 
</telerik:RadMenuItem>


The RadTreeView has 3 diferent levels

I want to HIDE the NewFolder Context Menu Option if I'm on Node Level 3 (when I right click on the node I don't want that option to show if I'm on Level 3), How do I do that, it doesn't matter if it's from Code Behind or Client or Both.

Thank you.
Eric
Top achievements
Rank 1
 answered on 10 Feb 2013
2 answers
77 views
Hi,

I'm building one application and I have the following issue
I have one menu 'RadMenu' in the top,
and I have in the same page RadScheduler
when I click on New appointment, the Popup window will shown but below the RadMenu and it will not be much visible
so I have to drag it to another place in the screen

any help to show the popup window over the Rad Menu?


Mohan
Top achievements
Rank 1
 answered on 10 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?