Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
88 views
hello,

i have a radgrid joined with an sqldatasource and 4 datakeys. my problem is that autoupdate does not work because i have 4 datakeys. could you please tell how sql updatecommand in sqldatasource must be when you have more than one datakeys?

thanks!!!
Antonio Stoilkov
Telerik team
 answered on 07 May 2012
1 answer
630 views
Hello,

I have a page that has a filter control on it. The filter controls a Radgrid that has button links on it to show more details of the filtered rows. When users click the back button on the browser to return to the page with the filter, the filter is showed again on its initial state, this is, it does not preserve the last search/filtered options selected. Is there a way that I can preserve this without having to force my users to not to use the back button?

Thanks!
Tsvetina
Telerik team
 answered on 07 May 2012
1 answer
197 views
Hi,

I am trying to add items to a toolbar dynamically per need - the idea is that each page can have a set of "action buttons" which may differ per page so the toolbar need to be loaded dynamically. The dynamical loading of the same items works but when attempting to add new items on a postback the new item isn't displayed in the toolbar.
The dynamic loading of the toolbar is done in the OnInit event and the items are added on each postback (I don't use IsPostback). The toolbar is wrapped in an ASP.NET UpdatePanel. I also do call .Update() to make sure the UpdatePanel content is updated.
I've tried without the UpdatePanel either just to see but neither of them worked.
Is there any way to actually add items in a dynamic fashion?

Update
I donwloaded the latest Telerik controls to see if this has been fixed as i was using an older version od the Rad controls.
here is my code
<form id="form1" runat="server">
        <tl:RadScriptManager ID="rsm1" runat="server"></tl:RadScriptManager>
 
        <asp:UpdatePanel ID="up1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Label ID="lb1" runat="server"></asp:Label>
 
                <tl:RadToolBar ID="Toolbar1" runat="server" AutoPostBack="true">
                </tl:RadToolBar>
 
                <asp:Button ID="bt1" runat="server" Text="submit" OnClick="bt1_Click" />
            </ContentTemplate>
        </asp:UpdatePanel>
 
        <%--<tl:RadAjaxManager ID="am1" runat="server">
            <AjaxSettings>
                <tl:AjaxSetting AjaxControlID="Toolbar1">
                    <UpdatedControls>
                        <tl:AjaxUpdatedControl ControlID="Toolbar1" />
                        <tl:AjaxUpdatedControl ControlID="lb1" />
                    </UpdatedControls>
                </tl:AjaxSetting>
                <tl:AjaxSetting AjaxControlID="bt1">
                    <UpdatedControls>
                        <tl:AjaxUpdatedControl ControlID="Toolbar1" />
                        <tl:AjaxUpdatedControl ControlID="lb1" />
                    </UpdatedControls>
                </tl:AjaxSetting>
            </AjaxSettings>
        </tl:RadAjaxManager>--%>
    </form>
and the code behind C#:
protected override void OnInit(EventArgs e)
{
    base.OnInit(e);
 
    //PopulateToolbar();
}
 
protected void Page_Load(object sender, EventArgs e)
{
    PopulateToolbar();
    Toolbar1.ButtonClick += new RadToolBarEventHandler(Toolbar1_ButtonClick);
}
 
public void PopulateToolbar()
{
    RadToolBarButton button;
    DropDownList ddl;
     
    Toolbar1.Items.Clear();
    Toolbar1.AutoPostBack = true;
 
    button = new RadToolBarButton();
    ddl = new DropDownList();
    ddl.ID = "ddl1";
    ddl.Items.Add(new ListItem("One"));
    ddl.Items.Add(new ListItem("Two"));
    ddl.Items.Add(new ListItem("Three"));
    ddl.AutoPostBack = true;
    ddl.SelectedIndexChanged += new EventHandler(ddl_SelectedIndexChanged);
    button.Controls.Add(ddl);
    //
    Toolbar1.Items.Add(button);
 
    button = new RadToolBarButton();
    button.Text = "Refund";
    button.CommandName = "action";
    button.CommandArgument = "refund";
    Toolbar1.Items.Add(button);
}
 
protected void ddl_SelectedIndexChanged(object sender, EventArgs e)
{
    DropDownList ddl;
    string szValue;
 
    ddl = sender as DropDownList;
    szValue = ddl.SelectedValue;
    lb1.Text = "ddl value changed: " + szValue;
}
 
protected void bt1_Click(object sender, EventArgs e)
{
    RadToolBarButton button;
    DropDownList ddl;
 
    button = new RadToolBarButton();
    button.Text = "Void";
    button.CommandArgument = "void";
    button.CommandName = "action";
    //
    Toolbar1.Items.Add(button);
}
 
protected void Toolbar1_ButtonClick(object sender, RadToolBarEventArgs e)
{
    lb1.Text = e.Item.Text + " clicked";
}

I've tested this with the RadAjaxManager and with the ASP.NET UpdatePanel getting the same result. Also tried to load the Toolbar controls from OnInit and Page_Load with a subtle change in the behaviour but both with a bug.
I want to be able to maintain the DropDownList between postbacks and also be able to dynamically add/remove Toolbar items (DropDownList, ToolbarButtons you name it) between postbacks.
I was thinking to use the RadToolBarDropDown instead of the ASP.NET DropDownList but the Telerik version doesn't seem to have certain behaviours as the ASP.NET version has built in, ie:
1. when a button is clicked in the DropDown the clicked item is not set to the DropDown.Text attribute (should be easy to do through javascript but still is a kind of fix needed) - it may be a design decision but still
2. cannot set a default DropDown item, say if I want to have on page load to have item 2 to be "selected/clicked". There seems to be a DropDown.Text attribute but still no Value/CommandArgument or such attribute holding the "clicked" button's value.
Kate
Telerik team
 answered on 07 May 2012
1 answer
125 views

Dear Team,

I have used "GridButtonColumn",

<rad:GridButtonColumn ButtonType="ImageButton" ImageUrl="../images/delete.gif" CommandName="Remove"

                               

 

ConfirmTitle="Remove" ConfirmDialogType="RadWindow" HeaderText="Remove" Text="Remove"

 

UniqueName="RemoveCommandColumn">

 

</rad:GridButtonColumn>



In item data bound event based on some condition.We are disabling the button.As below,

lnkgrdRemove.Enabled = fasle;

After disabling the button,Tooltip is not coming on mouse over(Firefox 3.6 only).Please let me know how can we fix it?

 

 

Milena
Telerik team
 answered on 07 May 2012
5 answers
585 views
Hi,
    I have a RadGrid within a asp:Tablecell. When I try to use the get_masterTableView(), I get the error Object property not defined. Given below is the structure of my RadGrid.

 

<div id="divContent" runat="server" style="display: none;">

 

 

<asp:Table ID="MainContainer" style="width:99%; height:92%; margin-left:1%; margin-right:0%;" runat="server">

 

 

<asp:TableRow>

 

 

<asp:TableCell ColumnSpan="2">

 

 

</asp:TableCell>

 

 

</asp:TableRow>

 

 

<asp:TableRow>

 

 

<asp:TableCell id="tdTimelineCell" CssClass="TimelineCell" runat="server"></asp:TableCell>

 

 

<asp:TableCell id="tdSummaryCell" CssClass="SummaryCell" runat="server">

 

 

<div style="overflow: auto; width: 100%; height: 100%;">

 

 

<telerik:RadGrid ID="SummaryRadGrid" runat="server">

 

 

<MasterTableView AutoGenerateColumns = "false">

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="Id" Visible="false"></telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn HeaderStyle-CssClass="HeaderEpisodeMarginLeft"></telerik:GridTemplateColumn>

 

 

<telerik:GridBoundColumn DataField="Remote_Index" visible="false"></telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Time_Effective" Visible="false"></telerik:GridBoundColumn>

 

 

<telerik:GridTemplateColumn HeaderStyle-CssClass="HeaderEpisodeMarginRight"></telerik:GridTemplateColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

</telerik:RadGrid>

 

 

<asp:label id="lblNoRecords" runat="server" visible="false" CssClass="NoRecords">

 

 

<asp:Literal id="litNoRecords" runat="server" enableviewstate="false">No records</asp:Literal>

 

 

</asp:label>

 

 

</div>

 

 

</asp:TableCell>

 

 

</asp:TableRow>

 

 

</asp:Table>

 

 

</div>

 


I tried getting the master view of the radgrid in the followig ways

var

 

grid = $("#MainContainer tdSummaryCell").find("SummaryRadGrid").get_masterTableView();

 

 

var dgrSummary = $find('<%=SummaryRadGrid.ClientID %>').get_masterTableView();

 

 and many other ways but none of them worked.

Could you please suggest how I can load the RagGrid into a jquey object so I can assign its datasource and bind the grid in jquery.

Thank you,
Mahita 
Radoslav
Telerik team
 answered on 07 May 2012
3 answers
126 views
Dear all,

i am using dbcontentprovider and dbdataserver classes.i am able to add custom fields in radupload and also i am saving the data in DB.
now i want to display some more fields on explorer grid,i am able to create the column in grid but how can i show the data from table.


please guide me.
Thanks.
Dobromir
Telerik team
 answered on 07 May 2012
2 answers
149 views
Is there a way to right align the text in a rad combo?
Thanks ... Ed
Dhamodharan
Top achievements
Rank 1
 answered on 07 May 2012
1 answer
102 views
a while ago I upgraded from v2009.1.527.35  to v2010.1.519.35

everything seemed to be working ok, except when I use the file uploader I get an error

Could not load file or assembly 'Telerik.Web.UI, Version=2009.1.527.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


so it looks like the uploader is still using the old version.  What can I do to fix this ?
Kate
Telerik team
 answered on 07 May 2012
1 answer
89 views
I want to create a simple tree view but I can't seem to do it, should be simple?

My data is structured in 1 table like:

ID Name Date
1 Name1 1/5/2012
2 Name2 1/6/2012
3 Name3 1/5/2012     


I want it to be displayed in the treeView like (Date is Root, name is Child)

1/5/2012
----Name1
----Name3
1/6/2012
----Name2

What properties and values do I need to set on the control to achieve this? DataTextField,  DataFieldParentID , etc

Thanks!
Bozhidar
Telerik team
 answered on 07 May 2012
3 answers
376 views
In my page I toggle content visibility by having partial page updates using the UpdatePanel. The problem is that when my RadComboBox is in the hidden content and later made visible it's completely unresponsive with no events being raised.  Unfortunately I haven't been able to recreate this problem so I can't provide any code but if anyone has an idea of what it could be due to I'd greatly appreciate your advice. 
Marin Bratanov
Telerik team
 answered on 07 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?