Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
373 views
Hi,

I little bit confused,  the problem is that i have some users , i am binding these user to Grid with datatable.In edit mode i want to change the selected user's role.I mean, role column must be dropdowncolumn and when i bind grid, dropdowncolumn must show the user's current roles.But in edit mode this column must show all the avaliable role types that are stored in database.I hope, i can explain it.Thank you.
Princy
Top achievements
Rank 2
 answered on 17 Dec 2008
1 answer
156 views
Hi,
I have a FormTemplate that I use to update my RadGrid. In there I have link to call RadWindow populated with RadGrid from where I return selected item's dataKeyValue. Upon return from the RadGrid I would like to update FormTemplate's TextBox with the return result.
The following code does not do the trick. The TextBox1 is not accessible.
function onClose(window, result)     
{     
  $get("<%= TextBox1.ClientID %>").text = result;     
}    
 
Error 4 The name 'TextBox1' does not exist in the current context

How can I get access to FormTemplate's TextBox in Javascript?

Thank you,
Pawel Mozdzen
Princy
Top achievements
Rank 2
 answered on 17 Dec 2008
4 answers
196 views

Hi all,

I am using radcombo with OnItemsRequested event,
I want to add one default item say <Unknown> in to combo,

i tried to add as below, but it displays <Unknown> item many times. Item is added in each request.

<telerik:RadComboBox ID="rcbBeginPeriod" runat="server"  
                    Width="250px" Height="100px" Skin="Office2007"  
                    AllowCustomText="false"  
                    ShowToggleImage="true"  
                    ShowMoreResultsBox="True" 
                    EnableLoadOnDemand="True"  
                    MarkFirstMatch="True"  
                    OnItemsRequested="rcbBeginPeriod_ItemsRequested"  
                    EnableVirtualScrolling="true"                     
                    
                    > 
                </telerik:RadComboBox> 

protected void rcbBeginPeriod_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e) 
    { 
        try 
        { 
 
            EventInfo objEventInfo = new EventInfo(); 
 
            List<ctblPeriod> resultSet = null; 
            resultSet = objEventInfo.GetAllQuarterPeriods(e.Text); 
             
 
            try 
            { 
 
                int itemsPerRequest = PRESCONSTANTS.COMBO_ITEMS_PER_REQUEST; 
                int itemOffset = e.NumberOfItems; 
                int endOffset = itemOffset + itemsPerRequest; 
                if (endOffset > resultSet.Count) 
                { 
                    endOffset = resultSet.Count; 
                } 
                if (endOffset == resultSet.Count) 
                { 
                    e.EndOfItems = true; 
                } 
                else 
                { 
                    e.EndOfItems = false; 
                } 
                for (int i = itemOffset; i < endOffset; i++) 
                { 
                    rcbBeginPeriod.Items.Add(new RadComboBoxItem(resultSet[i].Period, resultSet[i].ID.ToString())); 
                } 
 
                if (resultSet.Count > 0) 
                { 
                    lblBeginPeriodID.Text = ""; 
                    e.Message = String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", endOffset.ToString(), resultSet.Count.ToString()); 
                } 
                else 
                { 
                    lblBeginPeriodID.Text = ""; 
                    e.Message = "No matches"; 
                } 
            } 
            catch 
            { 
                lblBeginPeriodID.Text = ""; 
                e.Message = "No matches"; 
            } 
            finally 
            { 
                if (!rcbBeginPeriod.Items.Contains(new RadComboBoxItem("<Unknown>", "-1"))) 
                    rcbBeginPeriod.Items.Add(new RadComboBoxItem("<Unknown>", "-1")); 
            } 
 
        } 
        catch (Exception ex) 
        { 
             
        } 
    } 
 


Please help me to solve this problem.

Thanks
Amol

Amol
Top achievements
Rank 2
 answered on 17 Dec 2008
1 answer
143 views
I am using the latest version, and never used GridClientSelectColumn before.  I could not find this column among the list of different columns that are to be selected at design-time.  How shall I include this column in the grid.

Tariq
Shinu
Top achievements
Rank 2
 answered on 17 Dec 2008
0 answers
88 views
We are trying to integrate RadEditor with WSS 3.0 but not able to integrate ImageManager. We need to store all the uploaded images in SharePoint Picture/Image library. Can any one help us in this regard and can tell what are the settings required. It will be really helpful is any working example is available.

Thanks
Sukhminder
Sukhminder
Top achievements
Rank 1
 asked on 16 Dec 2008
1 answer
321 views
I have a quick question about the server side OnDataBound event for the radGrid - Is the call made after the grid get totally rendered on the client? In other words, if I am in ondatabound event of the grid, am I guaranteed that the grid has been totally drawn on the page?

Thanks,
Laura
Daniel
Telerik team
 answered on 16 Dec 2008
2 answers
197 views
I have a RadGrid with a custom CommandItemTemplate which contains a checkbox within it. The data which is displayed in the grid is dependent on whether the checkbox is checked or not, which means that in the onCheckChanged handler for the checkbox, I must call the grid.Rebind() method. The problem however is that whenever I call the rebind method, the checkbox resets its state back to unchecked.

Here is the ASPX code:

        <telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource"
            Skin="Vista" Width="287px">
            <mastertableview autogeneratecolumns="False" commanditemdisplay="Top">
<Columns>
<telerik:GridBoundColumn DataField="ID" EmptyDataText="&amp;nbsp;" HeaderText="ID" UniqueName="ID"></telerik:GridBoundColumn>
</Columns>
<CommandItemTemplate>
<asp:CheckBox id="chkShowExistingMappings" runat="server" Text="Show nodes with existing mappings" AutoPostBack="True" Width="237px" __designer:wfdid="w26" OnCheckedChanged="chkShowExistingMappings_CheckedChanged"></asp:CheckBox>
</CommandItemTemplate>
</mastertableview>
        </telerik:RadGrid>

And here is the code behind:

protected DataTable GetData()
    {
        DataTable table = new DataTable();
        table.Columns.Add("ID", typeof(int));
        table.Columns.Add("Product", typeof(string));
        table.Columns.Add("MinPrice", typeof(double));
        table.Columns.Add("Price", typeof(double));
        table.Rows.Add(1, "Tea", 1.00, 1.32);
        table.Rows.Add(2, "Chocolate", 4.00, 4.70);
        table.Rows.Add(3, "Cookies", 2.50, 3.06);
        return table;
    }

    protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        RadGrid1.DataSource = GetData();
    }

    protected void chkShowExistingMappings_CheckedChanged(object sender, EventArgs e)
    {
        RadGrid1.Rebind();
    }

If you run it and tick the checkbox, you will see that it doesnt maintain its checked state. Can anyone tell me how to get this working please?
Thanks



Michael Gois
Top achievements
Rank 1
 answered on 16 Dec 2008
4 answers
166 views

given that there is some performance issues (I will make a seperate post for this),

i decided to make decoration of controls user controlled, in otherwords i let the user of my app decide which controls they want decorated, i basically save a string comma seperated to db and read it back, however I am not sure how to translate these strings (multiple) into FormDecoreatedControls enums
basically in short i have a string.. "Label,TextBox,Default,Fieldset,H4H5H6,RadioButtons,Scrollbars,TextArea"
i want to programmically set this for the form decorated control.

thanks

Zoinky
Top achievements
Rank 1
 answered on 16 Dec 2008
6 answers
284 views
Hello all,

I have the following RadComboBox skin

<telerik:RadComboBox  
     EnableEmbeddedSkins="false" 
     EnableLoadOnDemand="False"       
     AllowCustomText="False" 
     HighlightTemplatedItems="True"  
     SkinID="CBSelection"      
     ShowMoreResultsBox = "False" 
     Skin = "Black" 
     Filter="Contains" 
     ShowDropDownOnTextboxClick="true" 
     MarkFirstMatch="False" 
     EnableTextSelection = "True" 
     Height="150px" 
     runat="server" > 
 </telerik:RadComboBox> 

Problem is that if I start typing something and hit enter then SelectedValue is always empty forcing me to click on the desired item every time. I would like to know if there is a way to make the SelectedValue to hold the first item's value from the filtered list when hitting Enter.

Thanks,

Martín


Atanas Korchev
Telerik team
 answered on 16 Dec 2008
1 answer
94 views
I would like to display items a grid as shown below. Each record has several fields which would go in the first row. The record also have a summary which will go in the next row and span all columns. Is this possible in the RadGrid? I know I can do it with an HTML table, but I would like to take advantage of the extra features of a control.


URL                                   Date          FileType
abcd.com                          3/3/2008     .pdf              
summary blah blah blah blah blah blah blah
blah blah blah blah blah a sdfw qwer qwer wqer

cdes.com                          3/5/2004      .doc
summary blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah
Daniel
Telerik team
 answered on 16 Dec 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?