Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
68 views
Hello,

There is a RadCombobox with check-boxes enabled in my project. There is another RadButton and on server side clicking the button, I want to display an alert that contains the checked item text from the RadCombobox for ex "You have selected Item1, Item2". Please help me with any sample solution.

Thanks in advance,
Anly.
Princy
Top achievements
Rank 2
 answered on 04 Apr 2013
2 answers
113 views
Hi

I have radgrid with custom filtering:
<script type="text/javascript">
function IconsComboBoxChanging(sender, eventArgs) {
                var item = eventArgs.get_item();
                if (item != null) {
                    var input = sender.get_inputDomElement();
                    input.value = "";
                    input.defaultValue = "";
                }
            }
function DropDownFilterLoad(sender) {
                sender.set_text("");
                var itm = sender.get_items();
                var selected = itm.getItem(sender._selectedIndex);
                var img = selected.get_imageUrl();
                var input = sender.get_inputDomElement();
                SetBackground(input, img);
            }
</script>
<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="true" OnNeedDataSource="CorrectionsGrid_NeedDataSource" [...]>
[...]
    <Columns>
        <telerik:GridTemplateColumn UniqueName="CorrectStatus" HeaderText="Status" HeaderStyle-Width="55px" Resizable="false" DataField="CorrectionAcceptState">
            <ItemTemplate>
                <asp:Image [...] />
            </ItemTemplate>
            <FilterTemplate>
                <telerik:RadComboBox ID="StatusFiletCB" Width="45px" AppendDataBoundItems="true" DropDownWidth="205px" NoWrap="true" runat="server" OnSelectedIndexChanged="CorrectStatusFilterChange" AutoPostBack="true" AllowCustomText="false" OnClientSelectedIndexChanged="IconsComboBoxChanging" OnClientLoad="DropDownFilterLoad">
                    <Items>
                        <telerik:RadComboBoxItem Value="0"[...] />
                        <telerik:RadComboBoxItem Value="1"[...] />
                        <telerik:RadComboBoxItem  Value="2" [...] />
                    </Items>
                </telerik:RadComboBox>
            </FilterTemplate>
        </telerik:GridTemplateColumn>
<telerik:GridTemplateColumn AllowFiltering="false" UniqueName="ActionColumn" HeaderText="" HeaderStyle-Width="60px"
    Resizable="false" Visible="false">
    <ItemTemplate>
       <asp:ImageButton CommandName="Reject" runat="server" CommandArgument='<%# Eval("CorrId") %>' Visible='<%# this.IsUserAllowedToAccept() %>' [...] />
    </ItemTemplate>
</telerik:GridTemplateColumn>



    [...]
    </Columns>
</telerik:RadGrid>

Code behinde:
protected void CorrectionsGrid_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    CorrectionsGrid.DataSource = new MyDataContext().Corrections;
}
 
private int? GetValueOfCorrectionAcceptStateFilter()
{
    var regSearch = Regex.Match(CorrectionsGrid.MasterTableView.FilterExpression, @".*\(it\.CorrectionAcceptState = (?<filterVal>[1-3])\).*");
    if (regSearch.Success)
        return Int32.Parse(regSearch.Groups["filterVal"].Value);
    else
        return null;
}
 
protected void CorrectStatusFilterChange(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
    string filterExpression = CorrectionsGrid.MasterTableView.FilterExpression;
 
    var currentcFilter = GetValueOfCorrectionAcceptStateFilter();
    if (currentcFilter.HasValue)
        filterExpression = filterExpression.Replace("(it.CorrectionAcceptState = " + currentcFilter.Value + ")", string.Empty);
 
    if (Int32.Parse(e.Value) > 0)
        filterExpression = (filterExpression.Trim().Length > 0 ? filterExpression + " AND " : "")
                            + "(it.CorrectionAcceptState = " + e.Value + ")";
    CorrectionsGrid.MasterTableView.FilterExpression = filterExpression;
    CorrectionsGrid.MasterTableView.Rebind();
}

everything works fine until I set the filter and call out rejection - invalid postback or callback argument. where making a mistake?
Mariusz
Top achievements
Rank 1
 answered on 04 Apr 2013
1 answer
90 views

Hello,
I have combobox1 populated with data have multiple selection checkboxes in it…
I have another combobox2 which will get populated based on checked items in the combobox1…

I want to know how to do this from codebehind…

what events we need to use and sample code will help....

Thanks

Princy
Top achievements
Rank 2
 answered on 04 Apr 2013
4 answers
252 views
how do I put in a tooltip a button and a LinkButton that have to be used?
Fabio Cirillo
Top achievements
Rank 1
 answered on 04 Apr 2013
1 answer
101 views
Hi,

While the user upload files to the server using RadUpload, Is there any mechanism to perform file validation process for a particular file extension alone?

Thankyou,
Berk.
Princy
Top achievements
Rank 2
 answered on 04 Apr 2013
1 answer
81 views
I have a radgrid with a GridClientSelectColumn. When the control is rendered it shows two check box items (as per the uploaded image).

Why is it doing this and how can I fix it?

Thanks
Eyup
Telerik team
 answered on 04 Apr 2013
9 answers
1.4K+ views

I have a RadGrid that is based on the client edit with batch server update example code. I would like to change the background color of the row when the SelectedIndexChanged event fires in the RadComboBox in the currently edited cell of the grid row. I need to do this as a client side action. The currently edited row will be an ItemTemplate as the client edit with batch server update code doesn't use the EditItemTemplate when editing rows.

<telerik:RadComboBox ID="RadComboBankerRole" 
 runat="server"
 OnItemsRequested="RadComboBankerRole_ItemsRequested"
 OnClientSelectedIndexChanged="RadComboBankerRole_SelectedIndexChanged"/>

function RadComboBankerRole_SelectedIndexChanged(sender, eventArgs) 
{
    //  Set row background color css class if selected value not string.Empty.
    //  Bonus points if you can apply different css class based on row index mod 2 ("zebra striped rows")
}
David
Top achievements
Rank 1
 answered on 04 Apr 2013
1 answer
112 views
Hi,

I became aware just recently that a new folder called ImageEditorDialogs is now part of your release.
Should I be pointing to this in the ExternalDialogsPath parameter?
If so, how do I also point at EditorDialogs?  I have made a change to the FileBrowser.ascx so I do need to point to this folder.
Can I merge the 2 folders?  I notice that InsertImage.ascx exists in both.

Please advise.

Thanks

Jim
Stanimir
Telerik team
 answered on 04 Apr 2013
3 answers
356 views
Hi,
I need to open RadWindow on button click.While opening the RadWindow i need to call one server function for some updates for that RadWindow, same time the RadWindow should be opened after that update.How to achieve this functionality?

What i did is like this:
<asp:Button ID="btn1" runat="server" Text="Click me"
                        OnClientClick="openRadWin();" OnClick="btn1_Click" />


Thanks
raj
Shinu
Top achievements
Rank 2
 answered on 04 Apr 2013
0 answers
69 views
  I define RadTimePicker as follow:
<telerik:RadTimePicker runat="server" ID="StartTime"  Width="95%"
                             SelectedDate='<%# Bind("Start") %>'>
                             <DateInput ID="StartDateInput" runat="server"  EmptyMessage="داده اجباری" DateFormat="HH:mm" EnableSingleInputRendering="false" />
                             <TimePopupButton />
                             <TimeView ID="StartTimeView" runat="server" Columns="2" ShowHeader="true" TimeFormat="HH:mm" HeaderText="از ساعت"/>
                             <DatePopupButton />
                         </telerik:RadTimePicker>
I set StartTime and EndTime on server side:
       RadTimePicker startTime = (RadTimePicker)e.Container.FindControl("StartTime");
     startTime.TimeView.StartTime = PatientScheduler.DayStartTime;           
     startTime.TimeView.EndTime = PatientScheduler.DayEndTime;
     startTime.SelectedTime = e.Appointment.Start.TimeOfDay;
Based on PatientScheduler:
<telerik:RadScheduler runat="server" ID="PatientScheduler" Width="100%" Height="100%"
          DataSourceID="PatientAppointmentsEntityDataSource" DataKeyField="Id" DataSubjectField="Subject"
          DataStartField="Start" DataEndField="End" FirstDayOfWeek="Saturday" HoursPanelTimeFormat="HH:mm"
          LastDayOfWeek="Thursday" EditFormDateFormat="yyyy/MM/dd"            
          Skin="Office2010Blue">

I have two problems in this project:
1. When I run web and select 3:00(Time is based on 24 Hours), displayed 11:00 in DateInput. When select 9:00, Displayed 17:00 in DateInput.
2. I can just select time from 00:00 to 9:00 and it displayed from 8:00 to 17:00 because PatientScheduler is from 8:00 to 17:00
shahab
Top achievements
Rank 1
 asked on 04 Apr 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?