Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
83 views
Hello,

in my project I have RadTripStrip with statically added RadTab. Multipage, which belongs to this tab, contains statically added user control. In this control I have RadDockLayout and three statically added RadDocks in it. In RadDocks I have some standard asp components like ListBox or Buttons. When I click on some of them, no event fires. They are absolutly ,,dead,,.

We just start using asp.net and Telerik controls in our company and we can't solve this problem.

,,Statically added,, means written right in a aspx page.

Thank you
TP
Tomáš
Top achievements
Rank 1
 answered on 16 Feb 2009
8 answers
214 views
Hi,

Using RadGrid 2008 Q3, DOT NET 3.5 FireFox browser.

  1. I don't yet know whether this problem occurs in other browsers, but with FireFox, if I have 2 columns of different widths, and AllowColumnsReorder=True, ReorderColumnsOnClient=True, ColumnReorderMethod=Reorder, then the columns move, but the widths don't!  What I mean is the column titles and content move around, but the width stays where it was, so now the narrow column is wide and vice versa.
  2. Whilst on the subject, there is also a further "cosmetic" problem. Dragging a column to the left gives the intuitive result, the orange "drop markers" appear to the left of the column which is going to be shifted right. But dragging to the right is less intuitive, the orange Drop Markers appear on the left of the column that is going to move left - I woudl have expected them to appear on the right!
  3. Further Using the HeaderContextMenu with a lot of columns (more than 10 or so) is incredibly slow (I presume javascript is building the column list), given that I am told that Safari javascript is even slower it is becoming unuseable in practice - though it is such a great feature, this is a shame. I am trying to build an alternative using the WindowManager with a pop-up an editor, but of course that is just adding to my development effort.
Georgi Krustev
Telerik team
 answered on 16 Feb 2009
4 answers
161 views
It seems like the background image for ToolBar (at least in Office2007 skin) is only 1600 pixels wide. Users with high resolution displays complain about parts of the toolbar showing with white background. Can you please fix?

Regards,
Sigmund Lunde
Omega AS
Peter
Telerik team
 answered on 16 Feb 2009
4 answers
207 views
This problem is somewhat complex and has plagued me for quite some time now.  I need a solution if possible.

I have a grid in a rad window where the user can click a Create New Row button, and clicking that button causes a post back to a method that retrieves all current rows from the grid and adds them to a dataset, then creates a new row and adds that to the dataset as well.  Then the code binds the dataset to the grid and the grid now has the original rows as well as the new row. 

The user can add as many new rows as they want, populate the rows, then save the grid.  This all works fine, however there is one crucial piece that is not working properly and I cannot for the life of me figure out why.

I am trying to set certain rows into edit mode (based on the value of one of the fields) after the grid is bound to the dataset containing the original and new rows.  If I try to do this the rows only turn yellow and do not open into edit mode.  The code is identifying the rows propwerly based on the value, but it doesn't open them in edit mode for some reason.  Here is the code I am using:

 

'loop through datagrid and set rows with an empty job number to edit mode

 

 

For Each gridDataItem As GridDataItem In rgS.MasterTableView.Items

 

 

    Dim lblJobNum As Label = CType(gridDataItem.FindControl("lblJobNum"), Label)

 

 

    If (lblJobNum.Text = "") Then

 

        gridDataItem.Edit =

True

 

 

    End If

 

 

Next

If I omit this loop the data grid will look fine except the rows will not be in   
edit mode. However, I can click the image button and set them to edit mode   
manually but I don't want the user to have to do this.  Is there something   
wrong with how I am setting these rows to edit mode? 

 

Georgi Krustev
Telerik team
 answered on 16 Feb 2009
1 answer
77 views
I am using telerik controls in version  2008.2.723.35

I got 2 date picker, what i want to do is set second datepicker's max date according by the first datepicker's selected date

On first datepicker's OnDateSelected event  i set the max date for second data picker.

I can see max date has been set but if the first datepicker's got max or min date setting, when click the second datepicker the "date is out of range" alert shows up, this is not always happen seems like if first datepicker selected date in current month the alert won't shows up.


function OnDateSelected(sender, e) {
        var livesince = $find('<%= addCurrent.FindControl("radcalLivedSince").ClientID %>');
        var today = new Date();
        var validdate = new Date(today.getFullYear() - 2, today.getMonth(), today.getDate());
        var livesince_current = livesince.get_selectedDate();
        if (livesince_current >= validdate) {
            //set max date for date picker in pre address
            var prelivesince = $find('<%= addPrevious.FindControl("radcalLivedSince").ClientID %>');
            var preadd_maxdate = new Date(livesince_current.getFullYear(), livesince_current.getMonth(), livesince_current.getDate() - 1);
            prelivesince.set_maxDate(preadd_maxdate);
       }
}


Is this a bug?
Georgi Krustev
Telerik team
 answered on 16 Feb 2009
1 answer
171 views
Hi We have Telerik RadToolBar control and RadGrid control on page . For this controls we have added some java script inside 

RadCodeBlock . when ever we load this page we are getting below error.
Error Details:
Internet explorer cannot open the internet site "operation aborted"
KIndly let us as we are stuckup with code.

- Shrirang

Code :

 

<

telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

<

script type="text/javascript">

 

 

 

 

//This function opens Contacts Add/Edit Screen

 

 

 

function

ShowContactDetails(ContactId)

 

{

 

var page = "ContactDetails.aspx?ID="+ ContactId

 

 

var oWnd = $find("RadWindow1");

 

oWnd.setSize(575,420);

oWnd.setUrl(page);

oWnd.show();

 

return false;

 

}

 

 

 

//This function is called when "Import Address Book" is clicked on the ToolBar

 

 

 

function

ShowImportContactDetails()

 

{

 

var page = "ImportContacts.aspx"

 

 

var oWnd = $find("RadWindow2");

 

oWnd.setSize(580,230);

oWnd.setUrl(page);

oWnd.show();

 

return false;

 

}

 

 

 

//This function is called when "Add" is clicked on the ToolBar.

//This function inturn makes a call to "ShowContactDetails('ContactIds')" function

 

 

 

function

newContact(){

 

ShowContactDetails(

'0');

 

}

 

 

 

//This function is called when user opts to add more than one contacts

 

 

 

function

ShowAddMoreContacts()

 

{

 

var page = "AddContacts.aspx"

 

 

var oWnd = $find("RadWindow1");

 

oWnd.setSize(400,221);

oWnd.setUrl(page);

oWnd.show();

 

 

return false;

 

}

 

 

 

//This function is called when "Edit" is clicked.

//This function inturn makes a call to "ShowContactDetails('ContactIds')" function

 

 

 

function

editContact(){

 

 

if ($find("<%= RadGridContacts.MasterTableView.ClientID %>").get_selectedItems().length == 1)

 

{

 

var grid = $find("<%= RadGridContacts.ClientID %>");

 

 

var mastertable =grid.get_masterTableView();

 

 

var dataitems =mastertable.get_selectedItems();

 

 

var selectedContact = mastertable.getCellByColumnUniqueName(dataitems[0],"CONTACT_ID").innerHTML;

 

ShowContactDetails(selectedContact);

}

 

else if ($find("<%= RadGridContacts.MasterTableView.ClientID %>").get_selectedItems().length >1)

 

{

alert(

'Please select only one contact to edit.');

 

}

 

else

 

{

alert(

'Please select a contact to edit.');

 

}

}

 

 

 

//This function is called when "Export" is clicked on the Toolbar

 

 

 

function

ShowExportContacts(Sortby,fname,lname,email,TeamId)

 

{

 

var page = "ExportContacts.aspx?SortColumn="+ encodeURIComponent(Sortby) + "&fname="+ encodeURIComponent(fname) + "&lname="+ encodeURIComponent(lname) + "&email="+ encodeURIComponent(email) + "&TeamId=" + encodeURIComponent(TeamId) ;

 

 

var oWnd = $find("RadWindow1");

 

oWnd.setSize(460,150);

oWnd.setUrl(page);

oWnd.show();

}

 

 

 

 

//This function is called from Contacts Add/Edit screen to refresh Grid on Contacts Main screen.

 

 

 

function

refreshGrid(arg)

 

{

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest(arg);

 

}

 

 

 

//Use this function to Clear Filters

 

 

 

function

ClearFilters()

 

{

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("IBCL:IBCL");

 

}

 

 

 

//This is called when "Delete" is clicked on ToolBar

 

 

 

function

ClientButtonClicked(sender, args)

 

{

 

if(args.get_item().get_value() == "Add Contact with details")

 

{

newContact();

}

 

else if(args.get_item().get_value() == "Add a list of email addresses")

 

{

ShowAddMoreContacts();

}

 

else if(args.get_item().get_value() == "Delete")

 

{

 

if ($find("<%= RadGridContacts.MasterTableView.ClientID %>").get_selectedItems().length <= 0)

 

{

alert(

'Please select one or more contact(s) to delete.');

 

 

return false;

 

}

 

else

 

 

 

 

{

 

var ans = confirm("Are you sure you want to delete the selected contact(s)?");

 

 

 

if(ans)

 

{

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("TBB:"+ args.get_item().get_value());

 

}

}

}

 

else if(args.get_item().get_value() == "SendShare")

 

{

 

if ($find("<%= RadGridContacts.MasterTableView.ClientID %>").get_selectedItems().length <= 0)

 

{

alert(

'Please select one or more contact(s).');

 

 

return false;

 

}

 

else

 

 

 

 

{

 

var grid = $find("<%= RadGridContacts.ClientID %>");

 

 

var mastertable =grid.get_masterTableView();

 

 

var dataitems =mastertable.get_selectedItems();

 

 

var selectedEmails = "";

 

 

for(var i=0;i<$find("<%= RadGridContacts.MasterTableView.ClientID %>").get_selectedItems().length;i++)

 

{

selectedEmails = selectedEmails + mastertable.getCellByColumnUniqueName(dataitems[i],

"EMAILADDRESS").innerHTML + ";";

 

}

FileShare_openTBWin(selectedEmails);

}

}

 

else if(args.get_item().get_value() == "Export")

 

{

 

var generic = document.getElementById('txtGenericSearch').value;

 

 

var fname = document.getElementById('txtFirstName').value;

 

 

var lname = document.getElementById('txtLastName').value;

 

 

var email = document.getElementById('txtEmail').value;

 

 

var teamID = $find("<%= RadComboBoxFilterByTeams.ClientID %>").get_selectedItem().get_value();

 

 

var sortColumn = document.getElementById('hdnSortColumn').value;

 

 

 

if ((generic != '') && (generic != 'enter text to search...'))

 

{

fname = generic;

lname = generic;

email = generic;

}

 

else

 

 

 

 

{

 

if (fname == 'enter first name here...')

 

{

fname =

'';

 

}

 

if (lname =='enter last name here...')

 

{

lname =

'';

 

}

 

if(email == 'enter email here...')

 

{

email =

'';

 

}

}

 

 

if (sortColumn == '')

 

{

sortColumn =

'CONTACT_ID';

 

}

 

ShowExportContacts(sortColumn,fname,lname,email,teamID);

}

 

else

 

 

 

 

{

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("TBB:"+ args.get_item().get_value());

 

}

}

 

 

 

//This function is called when the selected index event of "Filter by Teams" ComboBox is fired.

 

 

 

function

ClientSelectedIndexChanged(sender, args)

 

{

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("CBFBT:"+ args.get_item().get_value());

 

}

 

 

 

//This function is called when the selected index event of "Generic Search" ComboBox is fired.

 

 

 

function

GenericSearch_SelectedIndexChanged(sender, args)

 

{

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("CBGS:"+ args.get_item().get_text());

 

}

 

 

 

//This function is called to search records based on entries in

// Email, FirstName and LastName textboxes.

 

 

 

function

Search()

 

{

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("Search:Search");

 

}

 

 

 

function

GenericSearch_OnClientItemsRequested(sender,e)

 

{

 

 

 

// if(sender.get_appendItems())

// e.get_context().CustomText="";

// else

// e.get_context().CustomText=sender.get_text();

 

 

 

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("CBGSIT:"+ sender.get_text());

 

}

 

 

 

//This function is called to unload RADWindows

 

 

 

function

RadWinUnload()

 

{

 

var oWindow = $find("RadWindow1");

 

oWindow.setUrl(

"../reuse/dummy.htm") ;

 

}

 

function RadWinUnload2()

 

{

 

var oWindow = $find("RadWindow2");

 

oWindow.setUrl(

"../reuse/dummy.htm") ;

 

}

 

 

 

 

function

showHide()

 

{

 

if (document.getElementById('txtGenericSearch').value !='')

 

{

document.getElementById(

'txtGenericSearch').value='';

 

}

 

if(document.getElementById('txtEmail').value !='')

 

{

document.getElementById(

'txtEmail').value='';

 

}

 

if(document.getElementById('txtFirstName').value !='')

 

{

document.getElementById(

'txtFirstName').value='';

 

}

 

if(document.getElementById('txtLastName').value !='')

 

{

document.getElementById(

'txtLastName').value='';

 

}

 

 

if(document.getElementById('hiddenRow').style.display=='')

 

{

document.getElementById(

'hiddenRow').style.display='none';

 

document.getElementById(

'imgMore').src= "../images/icon_more.gif";

 

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("ASE:N");

 

}

 

else if(document.getElementById('hiddenRow').style.display=='none')

 

{

document.getElementById(

'hiddenRow').style.display='';

 

document.getElementById(

'imgMore').src= "../images/icon_back.gif";

 

$find(

"<%= RadAjaxManager1.ClientID %>").ajaxRequest("ASE:Y");

 

}

}

 

 

 

 

</

script>

 

</

telerik:RadCodeBlock>

Control Properties set:

 

<

telerik:RadToolBar ID="RadToolBarContacts" style="width:100%;" Runat="server" Skin="Office2007" OnClientButtonClicked ="ClientButtonClicked">

 

 

 

 

<CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

 

 

 

 

</telerik:RadToolBar>

 

<

telerik:RadGrid ID="RadGridContacts" runat="server" CellPadding="0"

 

 

 

 

Skin="Office2007"

 

 

EnableViewState="True" AllowCustomPaging="True"

 

 

AllowMultiRowSelection="True" AllowPaging="True" AllowSorting="True"

 

 

AutoGenerateColumns="False">

 

 

 

 

<HeaderContextMenu EnableTheming="True">

 

 

 

 

<CollapseAnimation Type="OutQuint" Duration="200">

 

 

 

 

</CollapseAnimation>

 

 

 

 

</HeaderContextMenu>

 

 

 

 

<FooterStyle Height="23px" />

 

 

 

 

<ItemStyle Height="23px" />

 

 

 

 

<PagerStyle Mode="NextPrevAndNumeric" Wrap="True"

 

 

PagerTextFormat="{4} Contacts {2} to {3} of {5}"/>

 

 

 

 

<MasterTableView DataKeyNames= "CONTACT_ID"

 

 

 

 

EnableViewState="True" >

 

 

 

 

<Columns >

 

 

 

 

<telerik:GridClientSelectColumn UniqueName="clientSelectCol" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" >

 

 

 

 

<HeaderStyle Width="27px"></HeaderStyle>

 

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

 

</telerik:GridClientSelectColumn>

 

 

 

 

<telerik:GridTemplateColumn UniqueName="AddEdit" HeaderText="Edit" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">

 

 

 

 

<HeaderStyle Width="45px" VerticalAlign="Middle" />

 

 

 

 

<ItemTemplate>

 

 

 

 

<asp:ImageButton runat="server" ID="iBtnEditView" ImageAlign="Middle" />

 

 

 

 

</ItemTemplate>

 

 

 

 

<ItemStyle HorizontalAlign="Center" />

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

<telerik:GridBoundColumn UniqueName="EMAILADDRESS" DataField="EMAILADDRESS"

 

 

HeaderText="Email" AllowSorting="true" ShowSortIcon="true"

 

 

ItemStyle-HorizontalAlign="Left" >

 

 

 

 

<HeaderStyle Width="200px" />

 

 

 

 

<ItemStyle HorizontalAlign="Left"></ItemStyle>

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

<telerik:GridBoundColumn UniqueName="FIRST_NAME" DataField="FIRST_NAME"

 

 

HeaderText="First Name" AllowSorting="true" ShowSortIcon="true"

 

 

ItemStyle-HorizontalAlign="Left" >

 

 

 

 

<ItemStyle HorizontalAlign="Left"></ItemStyle>

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

<telerik:GridBoundColumn UniqueName="LAST_NAME" DataField="LAST_NAME"

 

 

HeaderText="Last Name" AllowSorting="true" ShowSortIcon="true"

 

 

ItemStyle-HorizontalAlign="Left" >

 

 

 

 

<ItemStyle HorizontalAlign="Left"></ItemStyle>

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

<telerik:GridBoundColumn UniqueName="WORK_PHONE" DataField="WORK_PHONE"

 

 

HeaderText="Work Phone" AllowSorting="False" ShowSortIcon="False"

 

 

ItemStyle-HorizontalAlign="Left" >

 

 

 

 

<HeaderStyle Width="100px" />

 

 

 

 

<ItemStyle HorizontalAlign="Left"></ItemStyle>

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

<telerik:GridBoundColumn UniqueName="HOME_PHONE" DataField="HOME_PHONE"

 

 

HeaderText="Home Phone" AllowSorting="False" ShowSortIcon="False"

 

 

ItemStyle-HorizontalAlign="Left" >

 

 

 

 

<HeaderStyle Width="100px" />

 

 

 

 

<ItemStyle HorizontalAlign="Left"></ItemStyle>

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

<telerik:GridBoundColumn UniqueName="CONTACT_ID" DataField="CONTACT_ID"

 

 

HeaderText="CONTACT_ID" Display="false" AllowSorting="False"

 

 

ShowSortIcon="False" ItemStyle-HorizontalAlign="Left" >

 

 

 

 

<ItemStyle HorizontalAlign="Left"></ItemStyle>

 

 

 

 

</telerik:GridBoundColumn>

 

 

 

 

</Columns>

 

 

 

 

</MasterTableView>

 

 

 

 

<HeaderStyle Height="23px" />

 

 

 

 

<clientsettings AllowColumnHide="True" AllowColumnsReorder="True"

 

 

AllowKeyboardNavigation="True" EnableRowHoverStyle="True"

 

 

ReorderColumnsOnClient="True">

 

 

 

 

<Selecting AllowRowSelect="True" />

 

 

 

 

<clientevents onrowdblclick="editContact" >

 

 

 

 

</clientevents>

 

 

 

 

<Scrolling AllowScroll="True" EnableVirtualScrollPaging="True"

 

 

UseStaticHeaders="True" />

 

 

 

 

<Resizing AllowColumnResize="True" ClipCellContentOnResize="False" />

 

 

 

 

</clientsettings>

 

 

 

 

<FilterMenu Skin="Office2007" EnableTheming="True">

 

 

 

 

<CollapseAnimation Type="OutQuint" Duration="200">

 

 

 

 

</CollapseAnimation>

 

 

 

 

</FilterMenu>

 

 

 

 

</telerik:RadGrid>

 

Dimo
Telerik team
 answered on 16 Feb 2009
2 answers
325 views
Hi,

I created a global css file with all the necessary css for a new skin called webblue. And i gave the css class for the grid as webblue.  It works seemlessly. But when i add the line:

 <telerik:RadGrid runat="server" CssClass="RadGrid_WebBlue">  
  <PagerStyle Mode="NextPrevNumericAndAdvanced" />              
 </telerik:RadGrid>

And remove the inline css from the grid declaration while using, the skin is not rendered.

Also its not taking the pager mode from here to be applied to all the grids that i define.

Please help.

Thanks,
Sid
Siddharth Akkinepalli
Top achievements
Rank 1
 answered on 16 Feb 2009
1 answer
93 views

Good morning:

The scenario is this -- I would like to set up a combo box filter (client-side)
with checkboxes beside the items in that column filter, in order to enable multiple items within a column to be chosen for the viewer

to filter upon. 

 

So far, I haven't had much success in finding this type of item, so my question:
Can this be done/Has this been already done?  If so, can you point me in the right direction please?

Thank you - much appreciated.
Chrysa

Shinu
Top achievements
Rank 2
 answered on 16 Feb 2009
1 answer
104 views
Hello,

I use RadGird in my customized web control and there are two functions are conflicting on property "EnableColumnsViewState", one function is "Multi-column filtering", this function need property "EnableColumnsViewState" set to true. another function is "Changing the grid structure dynamically", let me explain this function more clearly: for example, if you open a grid which include three columns and when you do some searching(AJAXly) on it, the result will be returned only include one column, so in this Ajax request grid's structure is changed dynamically, if property "EnableColumnsViewState" set to true I will meet error like:
Index was out of range. Must be non-negative and less than the size of the collection.

Parameter name: index


If I set "EnableColumnsViewState" with false, the search function will normal.

Please give me some advice.

thanks,
LP
Iana Tsolova
Telerik team
 answered on 16 Feb 2009
4 answers
169 views
Hello!

When user presses the return key, the focus should be set to the next control (as tab key does) instead of adding a new line. To enter a new line the user should press Shift+Return. How is this possible?

Thanks in advance and regards
Markus Weber
Markus
Top achievements
Rank 1
 answered on 16 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?