Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
538 views
I have been trying to load details tables where they exist. (fault tickets for a session)
I can expand all of the details tables, but they never contain any details.
I think that the problem is to do with the loading order due to the fact that I can expand all the deets tables but they contain no data.
I have tried setting the HeirachyLoadMode="Client" in the mastertableview and in the gridtableview.

The C#, then the asp.net are below.

I'm relatively new to this and any help would be appreciated
protected void HelpdeskGrid_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
    DataSet dataset = new DataSet();
    SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SiteSqlServer"].ConnectionString);
 
    int nCompany = int.Parse(UserInfo.Profile.GetPropertyValue("Company"));
 
    try
    {
        conn.Open();
 
        SqlDataAdapter adapter = new SqlDataAdapter();
        string strSql=string.Format("select top 100 s.SessionID as SessionID,co.Name as Company,cp.Name as Campaign,ca.FirstName,ca.LastName,ca.Email,ca.PhoneNo,s.Start,{1} as Status "+
                                    "from appSession s inner join appCandidate ca on s.CandidateID=ca.CandidateID "+
                                    "inner join appCampaign cp on s.CampaignID=cp.CampaignID "+
                                    "inner join appCompany co on s.CompanyID=co.CompanyID "+
                                    "where (s.CompanyID={0:d} or {0:d}=-1)",nCompany,Helpers.SqlStatusCodes("s"));
        string strWhere = " and 1=2";
        if (!string.IsNullOrWhiteSpace(txtSearch.Text))
        {
            strWhere=string.Format(" and s.CandidateID in (select CandidateID from appCandidate where Contains(ca.SearchText,'{0}'))", Helpers.FixSearchString(txtSearch.Text));
        }
        strSql += strWhere;
        strSql += " order by s.Start desc";
        adapter.SelectCommand=new SqlCommand(strSql,conn);
        DataTable dataTable = new DataTable();
        adapter.Fill(dataTable);
        DataColumn[] PrimaryKeys = new DataColumn[1];
        PrimaryKeys[0] = dataTable.Columns["SessionID"];
        dataTable.TableName = "Details";
        dataTable.PrimaryKey = PrimaryKeys;
        dataset.Tables.Add(dataTable);
 
        string strSql2 = string.Format("SELECT SessionID, TicketID, FaultCategory, Status, AssignedTo  from appTicket where SessionID in (Select top 100 s.SessionID from appSession s inner join appCandidate ca on s.CandidateID=ca.CandidateID where (s.CompanyID={0:d} or {0:d}=-1) {1} order by s.Start desc)",nCompany, strWhere);
        adapter.SelectCommand = new SqlCommand(strSql2, conn);
        dataTable = new DataTable();
        adapter.Fill(dataTable);
        DataColumn[] ForeignKeys = new DataColumn[1];
        ForeignKeys[0] = dataTable.Columns["SessionID"];
        dataTable.TableName = "Detail";
        dataset.Tables.Add(dataTable);
        DataRelation SummaryDetail = new DataRelation("SummaryDetail", PrimaryKeys, ForeignKeys);
        dataset.Relations.Add(SummaryDetail);
    }
    finally
    {
        conn.Close();
    }
    HelpdeskGrid.DataSource = dataset;
<MasterTableView HeirarchyLoadMode="client" DataKeyNames="SessionID" ClientDataKeyNames="SessionID">
        <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
        </EditFormSettings>
        <DetailTables >
            <telerik:GridTableView HierarchyLoadMode="Client"  DataKeyNames="SessionID" Name="TicketDetails">
             <ParentTableRelation>
                    <telerik:GridRelationFields DetailKeyField="SessionID" MasterKeyField="SessionID"></telerik:GridRelationFields>
                </ParentTableRelation>
                <Columns>
                    <telerik:GridBoundColumn HeaderText="TicketID" DataField="TicketID" UniqueName="TicketID">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn HeaderText="Category" DataField="FaultCategory" UniqueName="FaultCategoryName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn HeaderText="Assigned To" DataField="AssignedTo" UniqueName="AssignedTo">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn HeaderText="Status" DataField="Status" UniqueName="StatusID">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn HeaderText="Options" UniqueName="Option" DataField="SessionID">
                        <ItemTemplate>
                            <telerik:RadButton AutoPostBack="false" runat="server" Text="Open Ticket" onclientclicked='onOpenTicket' CommandArgument='<%# DataBinder.Eval( Container, "DataItem.TicketID") %>' >
                            </telerik:RadButton>
                            </ItemTemplate>
                        <HeaderStyle Width="200px" />
                        <ItemStyle Width="200px" />
                    </telerik:GridTemplateColumn>
                </Columns>
            </telerik:GridTableView>
        </DetailTables>
        <Columns>
            <telerik:GridBoundColumn HeaderText="Company" DataField="Company" UniqueName="company">
                <HeaderStyle Width="200px" />
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Campaign" DataField="Campaign" UniqueName="Campaign">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="First Name" DataField="FirstName" UniqueName="FirstName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Last Name" DataField="LastName" UniqueName="LastName">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Email" DataField="Email" UniqueName="Email">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Start" DataField="Start" UniqueName="Start">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="Status" DataField="Status" UniqueName="Status">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn HeaderText="SessionID" Display="false" DataField="SessionID"
                UniqueName="SessionID">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Options" UniqueName="Option" DataField="SessionID">
                <ItemTemplate>
                    <telerik:RadButton AutoPostBack="false" ID="btn_createSession" runat="server" Text="New Ticket"
                        OnClientClicked="onCreateTicket" CommandArgument='<%# DataBinder.Eval( Container, "DataItem.SessionID") %>'>
                    </telerik:RadButton>
                    <telerik:RadButton AutoPostBack="false" ID='Open' runat="server" Text="Open" Value="TestValue"
                        CommandArgument='<%# DataBinder.Eval( Container, "DataItem.SessionID") %>' OnClientClicked="onOpen">
                    </telerik:RadButton>
                </ItemTemplate>
                <HeaderStyle Width="200px" />
                <ItemStyle Width="200px" />
            </telerik:GridTemplateColumn>
        </Columns>
    
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
    </FilterMenu>
</telerik:RadGrid>
Aaron
Top achievements
Rank 1
 answered on 04 Aug 2013
0 answers
114 views

Hi all -

I've got a pop-up menu that shows up on a left click, which works fine.  However, on touch-enabled devices (Windows 8 Surface, iPad, iPad Mini, iPhones, etc) after I have touched the button to make the popup appear, I can then touch somewhere else on the screen to scroll up or down and the menu is still visible, but it scrolls with the page.

Is there any quick and easy was to detect a touch scroll event and dismiss the popup?  I already have the code in place to dismiss it when the mouse goes out, but this doesn't work on touch screens.

Thanks in advance!

Troy
Top achievements
Rank 1
 asked on 04 Aug 2013
2 answers
80 views
Hi ,
I have a project in VS2010, in that I am using rad editor. As my project requirement, want to apply custom style on editor controls at the time of its insertion in editor.
Gyan
Top achievements
Rank 1
 answered on 03 Aug 2013
2 answers
434 views
Can the border be removed from a RadTextBox?
Alex
Top achievements
Rank 2
 answered on 02 Aug 2013
9 answers
303 views
I have a gridview with auto generate columns and it shows several data what I need is when I edit a record it hows everything with textbox I need on a specific field to show a combobox instead and that combobox must have a datasiurce and changes must be saved on update
also other field need to show a label instead of textbox.

in design mode I went on edit template but there I cant field any fields to delete the textbox and put a combobox like with the default gridview of visual studio...
Troika
Top achievements
Rank 1
 answered on 02 Aug 2013
1 answer
191 views
Dear telerik-Support,

how can I remove a color from a predefined color palette (e.g. WebPalette) on server(c#) and client side (js)?

how can I translated (its shows the color code like #fffff) or hide the tooltip on color hoveing?

Thanks a lot for your help.

Regards,
Christian
 
Slav
Telerik team
 answered on 02 Aug 2013
2 answers
86 views
I've been using the RadWindow.RadAlert as an error popup in a number of situations, usually in various RadGrid events.

Now I have an aspx that I'm calling from within a Radgrid using a window.radopen call.  Once the window is open, it's closed by hitting a RadButton and generating a  ClientScript.RegisterStartupScript(Page.GetType(), "", "CloseAndRebind();", true) in it's OnClick event.   This is all pretty much based on your demos.

However in this event I have error trapping and what I want to do is when the code errors out is to instead generate an error popup.  What I have within the catch statement is a RadWindowManager.RadAlert and a return.  This is not working.

Suggestions?
Boris
Top achievements
Rank 1
 answered on 02 Aug 2013
1 answer
89 views
Is the RadDock Tag persitant after a postback?
Slav
Telerik team
 answered on 02 Aug 2013
0 answers
122 views

This works: 
editor.CssFiles.Add("~/skins/D1041/EditorContentArea.css")

This doesn't
editor.CssFiles.Add("~/skins/d1041/EditorContentArea.css")

Had a blast figuring that out.

Regards,
-DJ-

-DJ-
Top achievements
Rank 1
 asked on 02 Aug 2013
6 answers
164 views
I could not find if this was logged yet or not. With the latest AJAX controls build (4.0.30319), the Async Upload SELECT button jumps up and gets cut off if the user clicks just to the right of the button. This only appears to happen in IE and not Chrome.

I tested this on the Telerik Demos site for Async Upload and it is repeatable.

I attached a screen shot.

Michael H
Top achievements
Rank 2
 answered on 02 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?