Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
596 views

Afternoon folks.

I am using a radgrid as this has lots of functionality that I wish to keep (exporting, line selection, scrolling, etc) but I have come across a request I'm not sure how to handle and as such, I'd like some advice!

I have a radgrid attached to an object datasource implementing a SelectMethod of GetProductList and a SelectCountMethod of CountProductItems.This would return something along the lines of:

enter image description here

With CountProductItems returning 9.

What I need to do with this is dynamically set the radgrid so that the paging is defined by the guid i.e. one page for each guid present.

So in the above example, we'd have 3 pages.

On page load you'd be shown Page 1:

enter image description here

With the pager items displaying 1, 2, 3.

Click on page 2 and you'd see:

enter image description here

and clicking on page 3:

enter image description here

Does that makes sense? Is it possible and if so, any pointers greatly appreciated.

Iana Tsolova
Telerik team
 answered on 16 Aug 2011
2 answers
150 views
I am trying to setup a hierarchical grid where the master data is summary contact data and the detail is a tabstrip containing one tab for detailed contact information and the other tab containing a grid for the order information.  To me this seems like a very straightforward use for the tabstrip control inside a nestedviewtemplate.  I want to be able to handle all of the databinding in the code-behind, but I can't seem to figure out how to bind the inner-grid to the appropriate datasource.  All of my datasources are retrieved with calls to classes that return datasets.  

Is there an example that I can look at that works this way?  The ones I've found online seem to do the binding to the asp:sqldatasource control, which doesn't work in my scenario.

This is pretty much the structure of what I want to accomplish:

(Master)
   Contact Summary
     (Detail)
   Tab 1
         Contact Detail (just bound asp fields)
     Tab 2
          Order Details (in a grid)
Maria Ilieva
Telerik team
 answered on 16 Aug 2011
7 answers
217 views
Can anyone help with this???

I am using DNN 5.6.3. There is a Telerik editor that is included with DNN. However, in safari (Imac pc) I am experiencing huge editing problems. Although thats not been the case until yesterday!

The editor is inserting code where it should not. It will not recognise text, colour and font changes.

It is resizing text and even not making any changes at all on some occasions.

If you write a line of text it does it correct. Insert a link and it changes either the link or the preceding text or all of it! A real NIGHTMARE!!!!!! 4 hours of messing to alter a few lines of text!!!!! that should have taken about 1 minute!!!

Here are some code snippets to look at taken from within the editor after dozens of attempts to put 2 lines of text on a page with the second line being a page link.

2 lines of text.. appears normal....:- 

Submit your business<br />
<br />
Submit your business

2nd line of text now has a link inserted

Submit your business<br />
<br />

it has now changed the font size of the link and the font type on the page (Text shows blue in the editor..css i expect..

<div style="text-align: justify;"><span style="line-height: normal; font-family: tahoma, arial, helvetica, sans-serif; font-size: medium; color: #000000;">Submit your business</span></div>
<div style="text-align: justify;"><span style="line-height: normal; font-family: tahoma, arial, helvetica, sans-serif; font-size: 16px; color: #000000;"><br />
</span></div>
<div style="text-align: justify;"><a href="/iConnectDirectory/Submityourbusiness.aspx"><span style="line-height: normal; font-family: tahoma, arial, helvetica, sans-serif; font-size: medium; color: #000000;"></span></a><a href="/iConnectDirectory/Submityourbusiness.aspx">Submit your business</a><br />
</div>

this is with 'full justification set'...

on the page the linked text is now 12pt arail..... not the 16pr its supposed to be

further attempts at editin:- now it wont let me change the font or the size of the linked text

however the text is now the blue colour i want it to be..

As you can see from the above it is all a bit of a mess!!!!! Some help would really be appreciated!!

We did manage to get this to work by editing on a windows machine in IE. However the editor is unusable sometimes in IE too!!
Pat
Top achievements
Rank 1
 answered on 16 Aug 2011
1 answer
137 views
per the docs I should be able to place html markup in the ItemTemplate. I am trying to create a couple of div tags. One float left, the other floats right. Inside the ItemTemplate they are placed next to each other. When I copy the code outside of the template the divs works fine. What simple thing am I missing?



 

 

 

 

<%

 

 

@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!

 

 

 

 

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<

 

 

 

 

 

html xmlns="http://www.w3.org/1999/xhtml">

<

 

 

 

 

 

head runat="server">

 

 

<title></title>

 

 

<telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />

 

 

<style type="text/css">

 

 

div.wrapper {

 

 

width:100%;

}

 

 

div.left_column {

 

 

width:150px;

 

 

float:left;

 

 

text-align:center;

 

 

vertical-align:middle;

}

 

 

div.right_column {

 

 

width:150px;

 

 

float:right;

 

 

text-align:center;

 

 

vertical-align:middle;

}

 

 

</style>

</

 

 

 

 

 

head>

<

 

 

 

 

 

body>

 

 

<form id="form1" runat="server">

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">

 

 

<Scripts>

<%

 

 

--Needed for JavaScript IntelliSense in VS2010--%>

<%

 

 

--For VS2008 replace RadScriptManager with ScriptManager--%>

 

 

<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />

 

 

<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />

 

 

<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />

 

 

</Scripts>

 

 

</telerik:RadScriptManager>

 

 

<script type="text/javascript">

 

 

//Put your JavaScript code here.

 

 

</script>

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

</telerik:RadAjaxManager>

 

 

<div>

<%

 

 

-- does not work --%>

 

 

<telerik:RadToolBar runat="server" ID="RadToolBar1" Width="100%">

 

 

<Items>

 

 

<telerik:RadToolBarButton>

 

 

<ItemTemplate>

 

 

<div class="wrapper">

 

 

<div class="left_column">

left Collumn

 

 

</div>

 

 

<div class="right_column">

right Collumn

 

 

</div>

 

 

</div>

 

 

</ItemTemplate>

 

 

</telerik:RadToolBarButton>

 

 

</Items>

 

 

</telerik:RadToolBar>

 

 

<br />

<%

 

 

-- works fine --%>

 

 

<div class="wrapper">

 

 

<div class="left_column">

left Collumn

 

 

</div>

 

 

<div class="right_column">

right Collumn

 

 

</div>

 

 

</div>

 

 

</div>

 

 

</form>

</

 

 

 

 

 

body>

</

 

 

 

 

 

html>

 

 

Kate
Telerik team
 answered on 16 Aug 2011
1 answer
55 views
I have a radpane, following by a splitter, then another radpane.

In the first radpane, I put a splitter that expands in the bottom direction.  The probem is, when it expands, a scrollbar appears.

What I want instead is for either the slider to expand OVER the splitter/radpane below it, or for the radpane window to expand the size of the slider.

Is this possible? If so, how?
Niko
Telerik team
 answered on 16 Aug 2011
1 answer
153 views
My slider icon is left aligned inside my radpane (horizontal, and it opens to the bottom).

How can I right align the icon that opens that when clicked expands the slider?
Niko
Telerik team
 answered on 16 Aug 2011
10 answers
153 views
Hi Telerik Team,

I am facing this problem. I always want to keep exactly pagesize value which user has entered before but i can't find any solution. RadGrid always set the total number of rows for page size textbox if the pagesize user has entered is larger than the total number of rows.

Please help me any solution to resolve it.

Thanks!
Pavlina
Telerik team
 answered on 16 Aug 2011
1 answer
112 views
Hi,

I modified the code from ComboInGridExample to use onneeddatassource for my project. after clicking insert, my project inserts fine. It fails to close the edit form and refresh the grid to show the new inserted row though. The following contains my C# code:

 

 

protected void RadGrid1_InsertCommand(object sender, GridCommandEventArgs e)  

{ 

try  

{ 

//Get the GridEditFormInsertItem of the RadGrid 

 

GridDataInsertItem insertedItem = (GridDataInsertItem)e.Item;  

RadComboBox RadComboboxUnloadType = insertedItem.FindControl("RadComboBoxUnloadType") as RadComboBox;  

RadDatePicker EventStartDateTime = (RadDatePicker)insertedItem["EventStartDateTime"].Controls[0];  

RadDatePicker EventEndDateTime = (RadDatePicker)insertedItem["EventEndDateTime"].Controls[0];  

WellVentData WellVent = new WellVentData();  

WellVent.UpdateInsertEvent(CAI,

RadComboboxUnloadType.SelectedValue.ToString(),

EventStartDateTime.SelectedDate.ToString(),

EventEndDateTime.SelectedDate.ToString(),

(insertedItem["CountofEvents"].Controls[0] as RadNumericTextBox).Text,  

(insertedItem["SalesLinePressure"].Controls[0] as RadNumericTextBox).Text, 
(insertedItem["ShutInPressure"].Controls[0] as RadNumericTextBox).Text,  

(insertedItem["FOpHierarchy_ID"].Controls[0] as TextBox).Text); 

} 

catch (Exception ex)  

{

RadGrid1.Controls.Add(new LiteralControl("Unable to insert Event. Reason: " + ex.Message));

 e.Canceled = true;

 

}

}

********The following contains the aspx code******************

 

<

 

 

telerik:RadGrid ID="RadGrid1" GridLines="None" AutoGenerateColumns="False"

 

 

 

runat="server" AllowPaging="True" AllowSorting="True"

 

 

 

OnItemDataBound="OnItemDataBoundHandler"

 

 

 

AllowAutomaticUpdates="True" AllowAutomaticInserts="True"

 

 

 

ShowStatusBar="True" AllowFilteringByColumn="True"

 

 

 

CellSpacing="0" EnableAJAX="True" onneeddatasource="RadGrid1_NeedDataSource"

 

 

 

oninsertcommand="RadGrid1_InsertCommand"

 

 

 

onupdatecommand="RadGrid1_UpdateCommand"

 

 

 

ondeletecommand="Rad" AllowAutomaticDeletes="True" >

 

 

 

 

 

 

 

<MasterTableView ShowFooter="false" DataKeyNames="ResultsID" EditMode="InPlace" CommandItemDisplay="TopAndBottom">

 

Shinu
Top achievements
Rank 2
 answered on 16 Aug 2011
1 answer
215 views

I'm adding a custom tooltip to "Special" events on the RadCalendar.  My code is below.

cell.Attributes.Add(

 

"id", "Calendar1_" + i.ToString());

 

RadToolTipManager1.TargetControls.Add(e.Cell.Attributes[

 

"id"], i.ToString(), true);

This works on the current month view.  So I'll hover and tooltip shows.....But when I add a future Event, I'll click on the next month link and it will show..ex. 9/9/2011....but when I hover all I get is a regular tooltip.
         Things I want to do:
                  1.  I want to load all my events info as the Page/Calendar loads.  I do not want to make an Ajax call.
                  2.  Tooltip doesnt seem to work on Weekends either, even on the current month....ex. 08/20/2011.....Any ideas?

Full Code:

 

 

 

protected void RadCalendar1_Load(object sender, EventArgs e)

 

{

 

 

RadCalendarDay calendarDay1 = new RadCalendarDay();

 

 

 

// calendarDay1.TemplateID = "EventTemplate";

 

 

 

 

 

calendarDay1.Date =

 

new DateTime(2011, 8, 19);

 

calendarDay1.ItemStyle.BorderColor = System.Drawing.

 

Color.Green;

 

calendarDay1.ItemStyle.BackColor = System.Drawing.

 

Color.Yellow;

 

 

 

 

 

 

RadCalendar1.SpecialDays.Add(calendarDay1);

 

 

 

 

 

 

 

 

RadCalendarDay calendarDay2 = new RadCalendarDay();

 

calendarDay2.Date =

 

new DateTime(2011, 9, 9);

 

 

 

 

 

 

calendarDay2.ItemStyle.CssClass =

 

"rcEvent";

 

 

 

 

 

 

calendarDay2.ToolTip =

 

"This is a test2<br/>Hello2";

 

RadCalendar1.SpecialDays.Add(calendarDay2);

 

 

RadCalendarDay calendarDay3 = new RadCalendarDay();

 

calendarDay3.Date =

 

new DateTime(2011, 8, 30);

 

calendarDay3.ItemStyle.BorderColor = System.Drawing.

 

Color.Green;

 

calendarDay3.ItemStyle.BackColor = System.Drawing.

 

Color.Yellow;

 

 

 

// calendarDay3.TemplateID = "EventTemplate";

 

 

 

 

 

RadCalendar1.SpecialDays.Add(calendarDay3);

 

 

RadCalendarDay calendarDay4 = new RadCalendarDay();

 

calendarDay4.Date =

 

new DateTime(2011, 3, 6);

 

calendarDay4.ItemStyle.BorderColor = System.Drawing.

 

Color.Green;

 

calendarDay4.ItemStyle.BackColor = System.Drawing.

 

Color.Yellow;

 

 

 

// calendarDay3.TemplateID = "EventTemplate";

 

 

 

 

 

RadCalendar1.SpecialDays.Add(calendarDay4);

 

 

RadCalendarDay calendarDay5 = new RadCalendarDay();

 

calendarDay5.Date =

 

new DateTime(2011, 12, 11);

 

calendarDay5.ItemStyle.BorderColor = System.Drawing.

 

Color.Green;

 

calendarDay5.ItemStyle.BackColor = System.Drawing.

 

Color.Yellow;

 

 

 

// calendarDay3.TemplateID = "EventTemplate";

 

 

 

 

 

RadCalendar1.SpecialDays.Add(calendarDay5);

}

 

 

protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)

 

{

 

 

Control ctrl = Page.LoadControl("ToolTip.ascx");

 

args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl);

 

 

ToolTip details = (ToolTip)ctrl;

 

details.TestText = args.Value;

}

 

 

 

protected void RadCalendar1_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)

 

{

 

 

//string test = "Hello";

 

 

 

 

 

 

 

if (IsDayRegisteredForTooltip((e.Day.Date)))

 

{

 

 

TableCell cell = e.Cell;

 

 

 

// cell.CssClass = "Appointment";

 

 

 

 

 

 

 

string localTime = DateTime.Now.ToLocalTime().ToString();

 

 

 

//cell.Attributes.Add("id", "Calendar1_" + localTime);

 

 

 

 

 

 

 

//RadToolTipManager1.TargetControls.Add(e.Cell.Attributes["id"], localTime, true);

 

 

 

 

 

cell.Attributes.Add(

 

"id", "Calendar1_" + i.ToString());

 

RadToolTipManager1.TargetControls.Add(e.Cell.Attributes[

 

"id"], i.ToString(), true);

 

 

 

// RadToolTip1.Controls.Add(cell);

 

 

 

 

 

i++;

}

 

}

 

 

private bool IsDayRegisteredForTooltip(DateTime date)

 

{

 

 

if (date.ToShortDateString().Equals("8/30/2011") || date.ToShortDateString().Equals("9/9/2011"))

 

 

 

// if ( date.ToShortDateString().Equals("9/10/2011"))

 

 

 

 

 

{

 

 

return true;

 

}

 

 

else

 

 

 

 

 

{

 

 

return false;

 

}

}

Mira
Telerik team
 answered on 16 Aug 2011
3 answers
120 views
Currently the RadFilter is designed to create expression as AND expr1 expr2 etc. I am trying to design a filter (see the image).

In case it is not possible to morph RadFilter to do this, can anybody give me a pointer on how to approach this problem?

Thanks
SK
Radoslav
Telerik team
 answered on 16 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?