Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
622 views

I'm trying to find a DropDownList in my RadGrid using FindControl() method. But it's always returning null so it cannot find the DropDownList. I have the following HTML code:

<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" DataSourceID="SqlDataSource1" GroupPanelPosition="Top" OnItemDataBound="RadGrid1_ItemDataBound">
    <ClientSettings>
        <Scrolling AllowScroll="True" UseStaticHeaders="True" />
    </ClientSettings>
    <MasterTableView AutoGenerateColumns="False" DataSourceID="SqlDataSource1" CommandItemDisplay="Top">
        <Columns>
            <telerik:GridTemplateColumn UniqueName="myName" HeaderText="header text">
                <EditItemTemplate>
                    <asp:DropDownList ID="myDropDown" DataTextField="TextFieldValue" DataValueField="ValueFieldValue" runat="server"/>
                </EditItemTemplate>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>

 

And I'm trying to find "myDropDown" using this C# code:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridDataItem)
    {
        GridDataItem item = (GridDataItem)e.Item;
        DropDownList list = (DropDownList)item.FindControl("myDropDown");
    }
}

 

But it cannot find the DropDownList. Can you tell me what I'm doing wrong?

Any help appreciated.

Regards,
Danilo

Danilo
Top achievements
Rank 1
 answered on 21 Jul 2015
1 answer
142 views

See Telerik column chart demo here:

http://demos.telerik.com/aspnet-ajax/htmlchart/examples/charttypes/columnchart/defaultcs.aspx 

Notice the labels above each column, such as "25000 sales". Now notice in the declarative code how this label is set:

<LabelsAppearance DataFormatString="{0} sales" Position="OutsideEnd"></LabelsAppearance>

I either need to set DataFormatString programmatically, or (better yet) I need to set it to the value of a column in my dataset from sql server. This column's data is not on the chart currently because I ONLY want that column's data used at the label at the top of each column. I can't figure out how to do either. How is it done?

Danail Vasilev
Telerik team
 answered on 21 Jul 2015
1 answer
37 views
I am opening a RadWindow as a UserControl. But the Usercontrol is loaded only once that is when the page is being loaded. It is not loaded again when I am opening RadWindow as a UserControl from the click of a link  i.e its not Post Back on subsequent request.
Danail Vasilev
Telerik team
 answered on 21 Jul 2015
4 answers
127 views
Hi ,

Can we have the REminder Alert show up outside of the Rad Schedule page?
I mean can be the reminders popup outside the page the scheduler is used?


Thanks,
Chandu.D
luc bonenfant
Top achievements
Rank 1
 answered on 20 Jul 2015
3 answers
91 views

Hi ,

 

I have a radgrid in radpane. The Radgrid loses its height and the data is not visible. Tried one of the links by telerik http://www.telerik.com/forums/radgrid-in-radpane-problem-with-100-height. This is not working. Thanks for the Help.

Vvamc
Top achievements
Rank 1
 answered on 20 Jul 2015
1 answer
69 views

Is it possible with Telerik MVC Grids to customize the pager similar to how grouping works?

 

So for instance I want to look at all of Student A's records and I don't care about how many rows will be returned.

Then I want to use the pager to look at all of Student B's records.

 

Is such  a thing even possible? :)

Pavlina
Telerik team
 answered on 20 Jul 2015
1 answer
216 views

I get the error "These columns don't currently have unique values" when I have more than one NULL parent value in my list. The element Ids are all unique but I always get the error. Please help.

Sample data
parentId elementId  elementText
NULL     116            ​Text1
116         2108 ​         Text2
2108       2109          Text3
2108       2110           Text4
NULL      72              Text5
72           655             Text6
72           660              Text7
72 672

 

Ivan Danchev
Telerik team
 answered on 20 Jul 2015
5 answers
117 views
I'd like to ajaxify a button (btnExportTasks) that uses Aspose.Cells to export some data. When set to the code below nothing happens.

What should my AjaxSettings look like?

<telerik:RadAjaxManager runat="server" ID="ram">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="btnExportTasks">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="btnExportTasks" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

btnExportTasks code behind handler:
...
  workbook.Save(Me.Response, "StoreItemTasks.xls"ContentDisposition.Attachment, New XlsSaveOptions())
  Response.End()
End Sub
Maria Ilieva
Telerik team
 answered on 20 Jul 2015
6 answers
350 views

Hello All

I am using RadAsyncUpload and using a custom HTTPHandler and inserting the files directly to DB. Before inserting I am checking for the MIME Type of the file. I am getting the MIME type from Uploadedfile.ContentType. This is returning NULL for .zip file.I am using IE 10 and the version of Telerik is 2014.3.1024.35

Any help is much appreciated.

Thanks

Rakesh

Rakesh
Top achievements
Rank 1
 answered on 20 Jul 2015
7 answers
1.1K+ views

Hi,

 I try to Bind an RadAutoCompleteBox with a Dictionnary, but I have this error message when the page i​s loaded and I tap a letter into the RadAutoCompleteBox => "The control DataSource(or DataSourceID) is not set."

 

I try the following code :

ASCX :

<telerik:RadAutoCompleteBox runat="server" ID="RadAutoCompleteBox1" InputType="Text" Width="200" DropDownWidth="150px"></telerik:RadAutoCompleteBox>

 

ASCX.CS

01.protected void Page_Load(object sender, EventArgs e)
02.{
03. if (!Page.IsPostBack)
04.  {
05.   Dictionary<int, string> dict = new Dictionary<int, string>();
06.   dict.Add(1, "Ann");
07.   dict.Add(2, "John");
08.   dict.Add(3, "Mary");
09.   RadAutoCompleteBox1.DataSource = dict;
10.   RadAutoCompleteBox1.DataTextField = "Value";
11.   RadAutoCompleteBox1.DataValueField = "Key";
12. }
13.}

 

Thanks for helping me

Aneliya Petkova
Telerik team
 answered on 20 Jul 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?