Telerik Forums
UI for ASP.NET AJAX Forum
19 answers
944 views
Hi,

I am using the radgrid with the template column, where in i am placing the image button in the template column which inturn calling the javascript funtion on clientclick, i want to pass a databinder value to the javascript function, this the code which i am using.

 

<telerik:GridBoundColumn HeaderText="Date" HeaderButtonType="TextButton" DataField="Date">

 

 

<ItemStyle Width="67px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn HeaderText="" UniqueName="View">

 

 

<ItemTemplate>

 

 

<asp:ImageButton id="imgbtnView" imageurl="~/Images/btn_View.gif" runat="server" visible= <%# DataBinder.Eval(Container.DataItem, "Status")%> onclientclick="showCaseHistory(<%# Eval(\'Type\')%>);" >

 

 

</asp:ImageButton>

 

 

</ItemTemplate>

 

 

</telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn HeaderText="Description" HeaderButtonType="TextButton"

 

 

DataField="Description">

 

 

</telerik:GridBoundColumn>

onclientclick="showCaseHistory(<%# Eval(\'Type\')%>);"

this is what the statement i am using, but i am getting the error saying that Error: illegal XML character

kindly advise.

Regards,

Santhosh

 

Arunava
Top achievements
Rank 1
 answered on 10 Mar 2016
1 answer
93 views

Hi,

I have a grid in which i am using static headers. Its working properly when its loaded the first time but when I select a row the details of that particular row is populated and there is a cancel button there. If the user clicks on the cancel button the grid is again populated but this time if I scroll the grid horizontally the headers are fixed there itself and only data is moving.Its working fine in IE 9 compatibility mode but the problem exists in IE9.

I am using Radgrid 2014.2.618.35.

Thanks

Pavlina
Telerik team
 answered on 10 Mar 2016
1 answer
42 views

Please see the attached screenshot, all the skins render with invisible borders on Mac/Safari?

 

Magdalena
Telerik team
 answered on 10 Mar 2016
1 answer
102 views

I have a menu that is bound to a data table. The data table is linked to database.The data table holds two values; RequestID and Company Name.  

What I want is to populate the menu with the company names, and pass the RequestID through the URL to a generic 'details.aspx?id=RequestID'

So what I did was set the DataNavigateUrlField equal to 'RequestID' from the datatable. 

The problem is that it makes the link to JUST the RequestID 

protected void Page_Load(object sender, EventArgs e)
{
 
    //Create datatable to populate menu
    DataTable menu = Utils.sqlutils.GetDataTable("DATABASE", "SELECT [RequestID], [CompanyName] FROM CauseMarketer_Requests WHERE Approved = '0'");
     
 
    updatingMenu.DataSource = menu;
    updatingMenu.DataNavigateUrlField = "RequestID";
    updatingMenu.DataTextField = "CompanyName";
    updatingMenu.DataBind();
 
 
}

So the DOM ends up looking like this

<a class="rmLink rmRootLink" href="19"><span class="rmText">COMPANY NAME</span></a>

What i want is the href to be "details.aspx?id=19"

 

What I've tried

updatingMenu.DataNavigateUrlField = "~details.aspx" + "RequestID";

But this causes a problem with my my databind and won't build. 

 

Joshua
Top achievements
Rank 1
 answered on 10 Mar 2016
2 answers
76 views

I am filling my radgrid from code behind using a iquerable but for some reason the filtering is not working at all even when i click the action button nothing happens am i missing a step?.

 

public IQueryable<Appointment> getAllApointments()
{
  var _appointments = apertureNetEntities.Appointments.Where(f => f.isDeleted == false ).OrderByDescending(o => o.authCreatedDate).ToList();
   return _appointments.AsQueryable();
}

 

protected void Page_Load(object sender, EventArgs e)
{
   rgAppointments.DataSource = _dal.getAllApointments();
   rgAppointments.DataBind();
 
 }

This is really bugging me as I have to apply a softdelete check on my datasource, i cant really use entity datasource.
Viktor Tachev
Telerik team
 answered on 10 Mar 2016
3 answers
505 views
After updating to the latest version of Telerik, 2016.1.113, in javascript eventArgs.get_commandArgument() when called from an OnClientClicking function is returning null instead of the command argument set on the button.  The same applies to the get_commandName function.  When using sender.get_commandArgument() the correct value is returned.  In previous versions the function called on eventArgs returned the correct value.  Was this an intended change or is this a bug?
Danail Vasilev
Telerik team
 answered on 10 Mar 2016
4 answers
346 views

Hi,

 

I can't find a solution to this : I want to create an order form with a grid abd 5 textbox by rows. In these textbox, the user will enter quantity and all the grid will be saved at the save button. So, i need to do this in code-behind. I have this code :

 

 MyGrid.DataSource = ds
 'Colon #0 > DescriptionNaviguateUrl
 mycolumn= New Telerik.Web.UI.GridBoundColumn
mycolumn.HeaderText = "DescriptionNaviguateUrl"
mycolumn.DataField = "DescriptionNaviguateUrl"
mycolumn.Visible = False
MyGrid.MasterTableView.Columns.Add(mycolumn)

'Column#1 >Model + COlor
mycolumn= New Telerik.Web.UI.GridBoundColumn
mycolumn.HeaderText = "Model #"
mycolumn.DataField = "Model"
mycolumn.Visible = False
MyGrid.MasterTableView.Columns.Add(mycolumn)

 

 

How can i add a texbox column in the same way?

 

Thanks!

Eyup
Telerik team
 answered on 10 Mar 2016
1 answer
227 views

When I attempt to include a bootstrap rad date time picker thier is a unusual border around the date time picker and the control is a bet messed up in styles.

This is the code I am using I am using a theme called canvas but its not displaying the control correctly

                          <telerik:RadDateTimePicker ID="rdStarDate"   TimeView-StartTime="10:00" TimeView-EndTime="17:00"  CssClass="form-control no-border"   TimeView-Interval="5"     runat="server" Skin="MetroTouch">
<TimeView CellSpacing="-1" StartTime="10:00:00" Culture="en-GB" EndTime="17:00:00" Interval="00:05:00"></TimeView>
 
<TimePopupButton ImageUrl="" HoverImageUrl=""></TimePopupButton>
 
<Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" EnableWeekends="True" FastNavigationNextText="&lt;&lt;" Skin="MetroTouch"></Calendar>
 
<DateInput DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy" LabelWidth="40%">
<EmptyMessageStyle Resize="None"></EmptyMessageStyle>
 
<ReadOnlyStyle Resize="None"></ReadOnlyStyle>
 
<FocusedStyle Resize="None"></FocusedStyle>
 
<DisabledStyle Resize="None"></DisabledStyle>
 
<InvalidStyle Resize="None"></InvalidStyle>
 
<HoveredStyle Resize="None"></HoveredStyle>
 
<EnabledStyle Resize="None"></EnabledStyle>
</DateInput>
 
<DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                                                          </telerik:RadDateTimePicker>

Maria Ilieva
Telerik team
 answered on 10 Mar 2016
1 answer
1.0K+ views

I am trying to alow enough room for the user to see the changes in the time field but as you see from the image its cut off how do i increase the size of the textbox of the datetime picker.

 

 

Eyup
Telerik team
 answered on 10 Mar 2016
1 answer
84 views

Hi everyone!

I need to have multiple selected day styles in my radCalendar. This is because a selected date on my calendar can be in on one of three status: approved/submitted and rejected.

 

So far, I have set the following style on my aspx page:

.RadCalendar_Default .rcRow .rcSelected
        {
            background-image: none !important;
            background: #0095c7 !important;
            color: #FFFFFF !important;
            border-color: #000000;
        }
        
        .RadCalendar_Default .rcRow .rcSelected a
        {
            color: #FFFFFF !important;
        }--%>
        
        
        .RadCalendar_Default .rcRow .rcSelectedSubmitted
        {
            background-image: none !important;
            background: #ffff00 !important;
            color: #FFFFFF !important;
            border-color: #000000;
        }
        
        .RadCalendar_Default .rcRow .rcSelectedSubmitted a
        {
            color: #FFFFFF !important;
        }

 

 

And this is what I have so far on my code behind:

 

foreach (DataRow currentChosenDate in dtChosenDates.Rows)
                {
                    selectedChosenDay = new RadDate((DateTime)currentChosenDate["SelectedDate"]);
                    calYearview.SelectedDates.Add(selectedChosenDay);

                    // Besides being selected, this must be marked as a special day...
                    specialDayChosenAndSelectedDay = new RadCalendarDay(calYearview);

                    specialDayChosenAndSelectedDay.Date = (DateTime)currentChosenDate["SelectedDate"];
                    specialDayChosenAndSelectedDay.ToolTip = currentChosenDate["ApprovalStatus"].ToString();
                    specialDayChosenAndSelectedDay.IsSelected = true;

                    specialDayChosenAndSelectedDay.ItemStyle.CssClass = "rcRow rcSelecteSubmitted"; // <--- This is where I'm stuck in....
                    calYearview.SpecialDays.Add(specialDayChosenAndSelectedDay);
                }

But no matter what I do, the calendar always sets the style for these selected days as: .RadCalendar_Default .rcRow .rcSelected

I'm trying to avoid to use Templates, so could you please shed some light on me?

 

Thanks in advance!

 

 

Eyup
Telerik team
 answered on 10 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?