Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
124 views
Hi,

I'm newbie in RadGrid.  I'm trying to implement the "Resizing grid with scrolling when data is less than scroll height" by following the RadControls document.
My version is Q2 2008.

The following taken from document :
<script type="text/javascript">
 
function GridCreated(sender, args)
 {
    var scrollArea = sender.GridDataDiv;
    var dataHeight = sender.get_masterTableView().get_element().clientHeight;
    if(dataHeight
< 350)
    {
       scrollArea.style.
height = dataHeight + 17 + "px";
    }
 }


However, it stopped at
 
scrollArea.style.height = dataHeight + 17 + "px";
with error" Object expected".

It seems
scrollArea.style.height expects an object as input rather than a string.

Please advise,
Wilson

Wilson
Top achievements
Rank 1
 answered on 08 Aug 2008
0 answers
63 views
If you view it via ie6 -- the last option - under view >> web layout - if you hover over it, the width expands farther than the other top children.

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Menu/Examples/Appearance/Skins/DefaultCS.aspx
Jomey
Top achievements
Rank 1
 asked on 08 Aug 2008
3 answers
148 views
I didn't have time to create a test project to reproduce this at the moment, but I thought I would give you a heads up anyway. It seems that setting the Visible property of a tab to false results in a javascript error on page load (client). The error is "'this._element' is null or not an object" and in debugging it appears that this occurs in the set_element function. A couple points that might help you reproduce the issue:
  • using latest release (Q2 2008 ASP.NET AJAX)
  • setting Visible property of tab in the TabCreated event handler
  • NavigateUrl property is empty
  • TabStrip.AutoPostback is true
  • Added 2 custom attributes, "Caption", and "NavigateUrl" (I need the url but need the tab to postback, not redirect as a link, hence adding the url as a custom attribute)
To workaround the issue, I am raising a custom event before adding the tab to the tabstrip, and if the calling code wants to hide the tab I simply do not add it to the tabstrip rather than setting the Visible property to false. This fixes the problem but I'm sure there is a bug in there somewhere.

Thanks,
Larkin
Neil N
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 08 Aug 2008
1 answer
48 views
I've got radEditor in a ModalPopup on Firefox 3.0.  In this ModalPopup is also a "Save" button that performs an AJAX callback to save the data in the radEditor to a database.  For some reason, only in Firefox, whenever I check the Content property on that callback I get nothing.  If I use IE7 it works fine.

I've tried explicitly setting the Content property in design mode as a test, and even if you change the content, when you do that callback the Content property will show the value it was set to originally.  Seems like a Firefox bug.

Josh
Josh Anderson
Top achievements
Rank 1
 answered on 08 Aug 2008
6 answers
291 views

Ok,

I have a grid I am updating from a RadWindow. The user clicks SAVE and the data is sent to the database. the window closes and calls the grid refresh method.

All works great. I look at the new data getting pulled during the NeedDataSource event and it is indeed correct.

However, the page never updates with the new data. The grid is defintely rebound, as the Item_Created event fires.. but why doesn't the grid show the refresh data? Am I missing something? Below is my code.

Thanks!

//ASPX PAGE
<
telerik:RadGrid ID="radData" runat="server" AutoGenerateColumns="False" AllowSorting="True" OnItemCreated="radData_ItemCreated" BorderStyle="None" Skin="Telerik" GridLines="None" OnNeedDataSource="radData_NeedDataSource" Width="985px" Height="800px">...

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">

//JAVASCRIPT
function ShowForm(site, form, rowIndex) {
if (form == 'refViewer') {
var grid = $find("<%= radData.ClientID %>");
var MasterTable = grid.get_masterTableView();
var row = MasterTable.get_dataItems()[rowIndex];
row.selected =
true;
}

window.radopen(site, form);

return false;
}

function refreshGrid(arg) {
$find(
"<%=RadAjaxManager1.ClientID%>").ajaxRequestWithTarget("<%=RadAjaxManager1.ClientID%>", "Rebind");
}
</script>
</
telerik:RadCodeBlock>

//CODE BEHIND....
protected void radData_NeedDataSource(object source, GridNeedDataSourceEventArgs e){
    bindData();

private

void bindData()
{
var ds = getDs();
dv =
new DataView {Table = ds.Tables[0]};

// grab some query strings for filtering
var clcFilter = Request.QueryString["clcfilter"];
var filter = Request.QueryString["filter"];
var bc = Request.QueryString["bc"];
var keyword = Request.QueryString["k"]; 

// if filter on, do some checks
if (filter != null)
    dv.RowFilter = getFilter(filter);
if (clcFilter != null)
    dv.RowFilter = bc !=
null ? getCLCFilter(clcFilter) : getCLCFilter(clcFilter);

// check for keyword search
if (!string.IsNullOrEmpty(keyword))
    dv.RowFilter = getSearch(keyword);

radData.DataSource = dv;
fillEntities();
}

protected void radData_ItemCreated(object sender, GridItemEventArgs e)
{
    if (!(e.Item is GridDataItem)) return;
    var dr = (DataRowView) e.Item.DataItem;
    var temp = dr["uniStatus"];
    var editLink = e.Item.FindControl("RefLink") as HyperLink;
     if (editLink == null) return;

    editLink.Text = dr[
"EntityName"].ToString();
    editLink.Attributes[
"href"] = "#";
    var site = "Ref.aspx?entityid=" + dr["EntityID"];
    editLink.Attributes[
"onclick"] = string.Format("return ShowForm('{0}','{1}', '{2}');", site,
    "refViewer", e.Item.ItemIndex);
}

Sean

Sean
Top achievements
Rank 2
 answered on 08 Aug 2008
1 answer
46 views
1. How do i make the grid scroll horizontal. to the right?
2. If I use the export mechanism.. be it to excel or to any other kind. I only get the first column .. any other columm is not exported. What am I doing wrong?
Daniel
Telerik team
 answered on 08 Aug 2008
8 answers
300 views
What happened to the Clone method? It is not mentioned in the radtree server api changes.
Bob
Top achievements
Rank 1
 answered on 08 Aug 2008
4 answers
133 views
I have an asp:menu for naviagtion above a RadGrid.  When the menu has a dropdown the header in the RadGrid wiggles back and forth. 

What is causing the RadGrid to do this?
Mike
Top achievements
Rank 1
 answered on 08 Aug 2008
2 answers
109 views
Is it possible to drop a single / multiple html element(s) on a single RadTreeNode in a RadTreeView control and the fire a event ? If so howto do this ?

 
Bob
Top achievements
Rank 1
 answered on 08 Aug 2008
8 answers
186 views
It appears appointments are ordered on the RadScheduler based on the Start of the appointment.  Is there anyway to override this and force it to order via another attribute/property?  

For example, I have 3 appointments on the Scheduler, and I always want Appointment #2 to display at the top (within that resources row obviously).

Thanks in advance.
T. Tsonev
Telerik team
 answered on 08 Aug 2008
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?