Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
1.7K+ views

Hi,

I can easily bind the grid to a List<> collection on Page_Load. However, I'm unable to populate the grid with data on an postback from an user event - for example a button click, and I can't really understand why.

Below is a sample of what I'm trying to do - the result should be the three random rows inserted into the grid, but the grid remains empty. I also can provide a small project sample, but I can't attach it to the post - you only accept gif, jpg files?

ASPX:
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="WebApplication1.test" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadButton ID="RadButton1" runat="server" Text="Load"
        onclick="RadButton1_Click">
    </telerik:RadButton>
    <telerik:RadGrid Width="400px" Height="400px" ID="RadGrid1" runat="server">
    </telerik:RadGrid>
</asp:Content>


Code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
namespace WebApplication1
{
    public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        protected void RadButton1_Click(object sender, EventArgs e)
        {
            List<FillTest> testList = new List<FillTest>();
            testList.Add(new FillTest("wer", "ERterte", "ertert", "ertert"));
            testList.Add(new FillTest("ertert", "dfgdfg", "ertert", "ertert"));
            testList.Add(new FillTest("dgdfg", "rwer", "pfsd", "vfswe"));
            RadGrid1.DataSource = testList;
        }
    }
 
    public class FillTest
    {
        string _testProperty, _test, _description, _code;
 
        public string Code
        {
            get { return _code; }
            set { _code = value; }
        }
        public string Test
        {
            get { return _test; }
            set { _test = value; }
        }
        public string Description
        {
            get { return _description; }
            set { _description = value; }
        }
        public string TestProperty
        {
            get { return _testProperty; }
            set { _testProperty = value; }
        }
 
        public FillTest(string testProperty, string test, string description, string code)
        {
            _testProperty = testProperty;
            _test = test;
            _description = description;
            _code = code;
        }
    }
}
John
Top achievements
Rank 1
 answered on 09 Jun 2011
3 answers
106 views

Hello,

One of my current tasks is to modify the Image Editor(RadEditor) to allow the user to do some limited Image manipulations. On this task I've encountered some issues :

1) could Image Editor be modified to include a zoom control? For instance if the user has to take a crop from a 2000 x 3000 pixels image, he can't see the whole image fitted in the window.

2) Is there a way to have Image Editor open with Crop "Enabled" by default ? On careful inspection on the js code on the ascx, there are some props in the prototype init; ie. 

1.this._cropEnabled = true// this doesn't work ?
but none of the changed yield results.

How can the ascx ( or what are the caller parameters ) modified to have crop enabled, and the bounding boxes visible when the Image Editor inits ?

3) When setting the default width and height of the crop area

 

1.//Set initial position
2.this.setBounds({ x: 0, y: 0, width: 70, height: 70 });
All browsers behave and keep these settings, except IE ( which gives a weird value like 48x83 px ). Is this a know bug or I'm dealing with IE faulty box models ? And if there is a known limitation, is there a workaround ?

Thanks!

Rumen
Telerik team
 answered on 09 Jun 2011
1 answer
67 views

I need to display a rad grid in the following format which is attached with this post.  I wil  enter the values in the textbox inside the grid and save the data to the databse.   The attached grid is ASP GRID . Whether  this is possible in rad grid


Mira
Telerik team
 answered on 09 Jun 2011
1 answer
100 views
FF never shows the default font name when the editor loads. This issue is highlighted in the following thread.

http://www.telerik.com/community/forums/aspnet-ajax/editor/radeditor-font-name-initial-value-never-gets-set-in-firefox-2.aspx

A fix is provided, but it has been more than 2 years and I am wondering if you plan on fixing this in the editor itself rather than requiring a hack.
Rumen
Telerik team
 answered on 09 Jun 2011
1 answer
65 views
Hi

First let me say thanks for all the help on previous questions I've posted.
Hopefully someone can help me with this too.

I have a grid which actually has a couple of columns that display only images.

Obviously the images reflect underlying settings from my data, and they are based
on enumerated values 0 to 8.

I have managed to display a combobox as my filter of choice and want to place text
in the combobox items. Eventually if I can I will display the corresponding images as well. 

So first of all what do I have to do to make filtering work.

I thought a hidden column might be the way to go and populate it with the enumerated values,
but I cann't get the grid to filter based on my combobox selection. The selection event fires
and has the correct enumeration. I used an alert to show this.

Ultimately I want to sort these items too.

I looked at one of the examples that had an image AND text, but haven't found one for an image only example yet.

TIA  
Iana Tsolova
Telerik team
 answered on 09 Jun 2011
3 answers
44 views
Hi,

  i Have used RadAsyncUploader control in Edit form of RadGrid.

  i got Horizontal scrollbar when edit form opened because of RadAsyncUploader.

   Please help me find the solution. Its high priority.
   Please find the Attachment for Screenshot
Dimitar Terziev
Telerik team
 answered on 09 Jun 2011
2 answers
47 views
Hello there

I have a page with quite a lot of Rad controls. It loads in a decent amount of time (a few seconds) in FF and Chrome however IE hangs up and takes about 1 minute to finally end up running all JS.

I'm attaching a screenshot.
Brian Taylor
Top achievements
Rank 1
 answered on 09 Jun 2011
6 answers
326 views

Hi All,

     I am using Telerik Radmenu in my application. The telerik version I am using is Telerik.Web.UI.ddl 2010.3.1317.35.
Now  I have a requirement of changing back color and font color of menu item depending on the user selection .
For that I overwrite some of the inbuild CSS classes but it can not solve my problem because now I am able to change the back color
and font color but the menu UI get distroted.
Can any one have any idea how to change the backcolor and fontcolor of Radmenu dynamically with out menu UI distrotion.
I have attached the screen shot  for refer .

Manishkumar
Top achievements
Rank 1
 answered on 09 Jun 2011
1 answer
70 views
Hi
the Text property of RadMenuItem when it's a Separator has no effect . the separator always is rendered by '|'
is there any other method the change it's text ?
Thanks for your feedbacks
Kate
Telerik team
 answered on 09 Jun 2011
3 answers
115 views
http://demos.telerik.com/aspnet-ajax/listbox/examples/default/defaultcs.aspx

If you look at the transfer buttons in Firefox 4 they are too small and look bad.

They look fine in Firefox 3 and IE.  Any idea on how to fix this?
Kate
Telerik team
 answered on 09 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?