Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
124 views
HI,

I implemented radtab inside radgrid. I have have couple of image buttons and asp.net gridview inside RadPageView. in codebehind when i am trying to access those imagebuttons or gridview with id I am getting error like  The name 'imgbtnNotesCancel' does not exist in the current context  for gridview  The name 'gvNotes' does not exist in the current context. Please see the image below. Here is my code. WHat causing the problem. Please help me to fix this. (i tried it by replacing gridview with radgrid still same issue.)

.aspx file

<EditFormSettings EditFormType="Template">
                                <FormTemplate>
                                    <table id="Table1" cellspacing="1" cellpadding="1">
                                        <tr>
                                            <td>
                                                <telerik:RadTabStrip runat="server" ID="RadTabStrip1" Orientation="HorizontalTop"
                                                    SelectedIndex="0" MultiPageID="RadMultiPage1">
                                                    <Tabs>
                                                        <telerik:RadTab Text="Task Data" PageViewID="RadPageView1">
                                                        </telerik:RadTab>
                                                        <telerik:RadTab Text="Notes" PageViewID="RadPageView2">
                                                        </telerik:RadTab>
                                                    </Tabs>
                                                </telerik:RadTabStrip>
                                                <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0">
                                                    <telerik:RadPageView runat="server" ID="RadPageView1">
                                                        <table id="Table3" cellspacing="1" cellpadding="1" width="250" border="0">
                                                            <tr>
                                                                <td>
                                                                </td>
                                                                <td>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Clarify Account Nbr:
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval( "Clarify Account Nbr" ) %>'>
                                                                    </asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Site ID:
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Eval( "Site ID") %>' TabIndex="1">
                                                                    </asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    Quote ID:
                                                                </td>
                                                                <td>
                                                                    <asp:TextBox ID="TextBox3" runat="server" Text='<%# Eval( "Quote ID") %>' TabIndex="2">
                                                                    </asp:TextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    EDP Created?:
                                                                </td>
                                                                <td>
                                                                    <asp:CheckBox ID="CheckBox1" runat="server" Text='<%# Eval( "EDP Created?") %>' TabIndex="3">
                                                                    </asp:CheckBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="right" colspan="2">
                                                                    <asp:Button ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'
                                                                        runat="server" CommandName='Update'></asp:Button
                                                                    <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False"
                                                                        CommandName="Cancel"></asp:Button>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </telerik:RadPageView>
                                                    <telerik:RadPageView runat="server" ID="RadPageView2">
                                                        <table id="Table2" cellspacing="1" cellpadding="1" width="250" border="0">
                                                            <tr>
                                                                <td>
                                                                    <legend><b>Add Notes</b></legend>
                                                                    <table id="Tablenotes">
                                                                        <tr>
                                                                            <td align="left">
                                                                                Note Type :
                                                                                <asp:DropDownList ID="DropDownList1" runat="server">
                                                                                </asp:DropDownList>
                                                                            </td>
                                                                            <td align="left">
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td align="left" colspan="2">
                                                                                Note Description
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td align="left">
                                                                                <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Rows="2" Width="650px"></asp:TextBox>
                                                                            </td>
                                                                            <td>
                                                                                   
                                                                                <asp:ImageButton ID="ImageButton1" OnClick="btnAddNote_Click" runat="server" ToolTip="Add Note"
                                                                                    ImageUrl="~/Images/add-icon.png" />
                                                                                <asp:ImageButton Visible="false" ToolTip="Update" OnClick="imgbtnNotesUpdate_Click"
                                                                                    ID="ImageButton4" runat="server" ImageUrl="~/Images/accept-icon.png" />
                                                                                <asp:ImageButton Visible="false" ToolTip="Cancel" OnClick="imgbtnNotesCancel_Click"
                                                                                    ID="ImageButton5" runat="server" ImageUrl="~/Images/delete-icon.png" />
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td>
                                                                    <div style="overflow: auto; height: 160px">
                                                                        <asp:GridView ID="GridView1" BorderColor="#004000" runat="server" AutoGenerateColumns="false"
                                                                            BackColor="White" BorderWidth="1px" BorderStyle="Solid" CellSpacing="0" Width="100%"
                                                                            OnSelectedIndexChanged="gvNotes_SelectedIndexChanged" OnRowDataBound="gvNotes_RowDataBound">
                                                                            <HeaderStyle Height="20px" BackColor="#004000" Font-Size="8pt" Font-Bold="True" ForeColor="White"
                                                                                HorizontalAlign="Center" BorderColor="White" BorderWidth="0px" />
                                                                            <PagerSettings Mode="NumericFirstLast"></PagerSettings>
                                                                            <RowStyle ForeColor="#000000" Font-Size="8pt" HorizontalAlign="Left" BorderWidth="1px"
                                                                                BorderColor="#004000" />
                                                                            <AlternatingRowStyle Font-Size="8pt" ForeColor="#000000" BackColor="#F5F5E9" BorderWidth="1px"
                                                                                BorderColor="#004000" />
                                                                            <PagerStyle HorizontalAlign="Right" Font-Bold="true" Font-Size="8pt" />
                                                                            <Columns>
                                                                                <asp:TemplateField Visible="false">
                                                                                    <ItemTemplate>
                                                                                        <asp:Label ID="lblonID" runat="server" Text='<%# Bind("onID") %>'></asp:Label>
                                                                                    </ItemTemplate>
                                                                                    <ItemStyle HorizontalAlign="Left" />
                                                                                </asp:TemplateField>
                                                                                <asp:BoundField HeaderText="Note Description" DataField="Description" />
                                                                                <asp:BoundField HeaderText="Note Type" DataField="Type" />
                                                                                <asp:BoundField HeaderText="Created By" DataField="CreatedBy" />
                                                                                <asp:BoundField DataFormatString="{0:MM/dd/yyyy}" HeaderText="Created Date" DataField="CreationDate" />
                                                                            </Columns>
                                                                        </asp:GridView>
                                                                    </div>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </telerik:RadPageView>
                                                </telerik:RadMultiPage>
                                            </td>
                                        </tr>
                                    </table>
                                </FormTemplate>
                            </EditFormSettings>


.cs file

protected void imgbtnNotesUpdate_Click(object sender, EventArgs e)
{
    try
    {
        clsTaskUpdates_BL objBL = new clsTaskUpdates_BL();
        //string strName = HttpContext.Current.User.Identity.Name.ToString();
        //if (strName.Length > 0)
        //    strName = strName.Substring(strName.IndexOf("\\") + 1);
        string strName = Session["UserName"].ToString();
         
        gvNotes.DataSource = objBL.updateNotes_Bl(Session["selNoteID"].ToString(), Session["selorderID"].ToString(), strName, ddlNoteType.SelectedItem.Text, txtNoteDesc.Text.Trim(), DateTime.Now.ToString());
        gvNotes.DataBind();
        ddlNoteType.ClearSelection();
        txtNoteDesc.Text = string.Empty;
        imgbtnNotesCancel.Visible = false;
        imgbtnNotesUpdate.Visible = false;
        btnAddNote.Visible = true;
    }
    catch (Exception ex)
    {
    }
 
}
 
protected void imgbtnNotesCancel_Click(object sender, EventArgs e)
{
    ddlNoteType.ClearSelection();
    txtNoteDesc.Text = string.Empty;
    imgbtnNotesCancel.Visible = false;
    imgbtnNotesUpdate.Visible = false;
    btnAddNote.Visible = true;
}
 
protected void gvNotes_SelectedIndexChanged(object sender, EventArgs e)
{
    try
    {
        Label lblID = (Label)gvNotes.SelectedRow.Cells[0].FindControl("lblonID");
        Session["selNoteID"] = lblID.Text;
        ddlNoteType.ClearSelection();
        for (int index = 0; index < ddlNoteType.Items.Count; index++)
        {
            if (ddlNoteType.Items[index].Text.ToLower() == gvNotes.SelectedRow.Cells[2].Text.ToLower())
                ddlNoteType.Items[index].Selected = true;
        }
        txtNoteDesc.Text = gvNotes.SelectedRow.Cells[1].Text.Trim().Replace(" ", "");
 
        imgbtnNotesCancel.Visible = true;
        imgbtnNotesUpdate.Visible = true;
        btnAddNote.Visible = false;
 
    }
    catch (Exception ex)
    {
    }
}





.
Yana
Telerik team
 answered on 21 Jul 2010
1 answer
139 views
I work on Project management and I have ProjectEstimatedHours, ProjectDuration, than I have TasksOfProject - EstimatedHours, TaskDuration. Is possible to insert progress bar in row of grid.

1. ProjectA          100hours  50hours ------------->(progresbar)
                1.Task1    20hours 10hours ---->(progressbar)
                2.Task2 ......................................
2.ProjectB ..............

If you understand what I mean. Please help, because I searching for control which can do that. You controls is great, but I don t see that possibility.
Mira
Telerik team
 answered on 21 Jul 2010
1 answer
125 views
Hi, I can get the sender id by args.get_itemIndex();, how can i get the destinationElement(which must also be a radlistviewitem) ID and/or clientvalue?
Rosen
Telerik team
 answered on 21 Jul 2010
2 answers
88 views
Hi,
    I am using RadGrid,which is having the feature of Hierarchial grid. I used to bind the Hierarchial table under DetailTableDataBind event of parent grid.
Everything is working fine, but i would like to bind the child or hierarchial grid only at the time the Expand button clicks, so that i can improve the speed and enable the grid to bind only at the time of expanding.

So please let me know the possibilities to achieve the scenario

-Thanks
Chandran Chandran
Top achievements
Rank 1
 answered on 21 Jul 2010
1 answer
203 views
I'm currently converting a working appplication and integrating Telerik into it for a school capstone project.

What I need to know is how do we perform a postBack call on the RadAjaxPanel?

For instance, with MS AJAX I can enter the following Javascript into the head of my page:

<script language="javascript" type="text/javascript">
    function connectLogin() {
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm._doPostBack('UpdatePanel1', '');
    }
    setTimeout("connectLogin()", 10000);
</script>

that code will cause my UpdatePanel to basically refresh!

<div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
           ...  
        </ContentTemplate>
    </asp:UpdatePanel>        
</div>

Any help with this would be great, I've looked over numerous pieces of code on the site here, tried several things and I'm not getting anywhere!

Thanks!
Pavel
Telerik team
 answered on 21 Jul 2010
0 answers
50 views
Dear All,

I am getting error on publishing my application.It is showing this error "Copying file bin\Telerik.Reporting.Service.pdb to obj\Debug\Package\PackageTmp\bin\Telerik.Reporting.Service.pdb failed. Could not find file 'bin\Telerik.Reporting.Service.pdb".I do't know how to resolve this issue.

best rgds
Shankar bangari
shanker bangari
Top achievements
Rank 1
 asked on 21 Jul 2010
1 answer
64 views
Hi there,

Can I have the time bars extended tillt eh actual time ina  day rather than the entire day?

Thanks
Peter
Telerik team
 answered on 21 Jul 2010
1 answer
94 views
Dear Sir/ Madam,

I have a problem with the contextmenu that shows up when you add an expression and want to select the column you would like to filter on. I have a grid with a lot of columns (the customer wants this) and the list that is displayed is so large that you can not select all columns because they appear outside the screen.

Problem solved. In my code behind I find the ContextMenu control and applied my settings.

Kind Regards,

Eugene
Nikolay Rusev
Telerik team
 answered on 21 Jul 2010
1 answer
272 views
Hello dear Telerikers,

i got a question regarding the scroll position.... The problem is easily reproduced (for example on this demo-page):
RadComboBox Demo

Just go ahead and select any value in any combobox.... it has to be a little down the list, so the vertical scrollbar is moved.

When you now close the dropdown and re-open it, the scrollposition always starts at the very top and only after completely opening the dropdown, scrolling down to the selected item happens. It looks a littly "jumpy" and just not as fine as I would like it to be...

Is there any way around this? (setting the scroll-position on "pre-dropdown" or something)?

Thanks for any suggestion!

Kind regards,
Wolfgang

Wolfgang Kamir
Top achievements
Rank 1
 answered on 21 Jul 2010
2 answers
125 views
Hi All

I seem to be missing something really obvious here and wondered if anyone can help...

I cannot seem to find a definition for the table structures used for saving/loading docks data to the a databsase.

Several examples of how to read from DB but cant find anything on the actual table structure that needs to be set up to support the docks?????

We are using SQL Server 2005.

Like I said its an obvious thing but I cant find the answer.....

Thanks in advance


Geoff
Top achievements
Rank 1
 answered on 21 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?