Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
224 views
Dear Telerik Team,

I have a requirement [ Hierarchical grid ] where the detail table [ Leaf ] content will change according to the row value. ie, if the row field value is "contract", the detail table should take value from contract table, and if the row field value is "phase", the detail table should take value from phase table etc.

Below I give the code sample I have done,

protected

 

void RadGrid1_DetailTableDataBind(object source, GridDetailTableDataBindEventArgs e)

 

{

 

    int

 

wbsLevelID = Convert.ToInt32(dataItem.GetDataKeyValue("wbsLevelID").ToString());

    string

 

wbsLevelCode = dataItem.GetDataKeyValue("wbsLevelCode").ToString();

 

    if

 

(wbsLevelCode == "Category" && wbsLevelID!=0)

 

    {

 

      

 

 

 

        DataTable

 

 

dtSource = (DataTable)e.DetailTableView.DataSource;

 

        e.DetailTableView.DataSource = GetContractRowDataTable(dtSource, wbsLevelID);
    }
}

 

public

 

 

DataTable GetContractRowDataTable(DataTable dtSource, int categoryID,int wbsLevelID)

 

{

 

    ///////// I want to define columns and add rows from here.
   

 

}

//////////////////////////////

Will this logic work?

Please help me in this scenario.
Thanks

 

 

 

 

 

Princy
Top achievements
Rank 2
 answered on 08 Nov 2010
1 answer
97 views
I have a grid that when the user inputs a code (elsewhere on the screen), a client-side function will kick off to add a row to the grid. However, during runtime, I don't see the grid as how it looks in design time.
Here is my html:
<code>
<td class="td_AEV" colspan="2">
                                                                                                                                    <table width="100%" bordercolor="white" border="1">
                                                                                                                                        <tr valign="top">
                                                                                                                                            <td width="85%" height="80px">
                                                                                                                                                <table width="100%" bordercolor="black" border="1">
                                                                                                                                                    <thead>
                                                                                                                                                        <tr>
                                                                                                                                                            <td>
                                                                                                                                                                <telerik:RadGrid ID="radCodes" runat="server" AutoGenerateColumns="False">
                                                                                                                                                                    <MasterTableView>
                                                                                                                                                                        <Columns>
                                                                                                                                                                            <telerik:GridTemplateColumn AllowFiltering="False" Groupable="False" HeaderText="Code"
                                                                                                                                                                                ShowSortIcon="False" UniqueName="tCode">
                                                                                                                                                                                <HeaderStyle Font-Bold="True" />
                                                                                                                                                                                <ItemTemplate>
                                                                                                                                                                                    <asp:Label ID="lblCode" runat="server"></asp:Label>
                                                                                                                                                                                </ItemTemplate>
                                                                                                                                                                            </telerik:GridTemplateColumn>
                                                                                                                                                                            <telerik:GridTemplateColumn AllowFiltering="False" Groupable="False" HeaderText="Description"
                                                                                                                                                                                ShowSortIcon="False" UniqueName="tDescription">
                                                                                                                                                                                <HeaderStyle Font-Bold="True" />
                                                                                                                                                                                <ItemTemplate>
                                                                                                                                                                                    <asp:Label ID="lblDescription" runat="server"></asp:Label>
                                                                                                                                                                                </ItemTemplate>
                                                                                                                                                                            </telerik:GridTemplateColumn>
                                                                                                                                                                        </Columns>
                                                                                                                                                                    </MasterTableView>
                                                                                                                                                                </telerik:RadGrid>
                                                                                                                                                            </td>
                                                                                                                                                        </tr>
                                                                                                                                                    </thead>
                                                                                                                                                </table>
                                                                                                                                            </td>
                                                                                                                                            <td>
                                                                                                                                                <asp:Button ID="btnUP" Text="UP" runat="server" Font-Size="8pt" /><br />
                                                                                                                                                <asp:Button ID="btnDWN" Text="DN" runat="server" Font-Size="8pt" /><br />
                                                                                                                                                <asp:Button ID="btnRM" Text="RM" runat="server" Font-Size="8pt" />
                                                                                                                                            </td>
                                                                                                                                        </tr>
                                                                                                                                    </table>
                                                                                                                                </td>
</code>

There is no column headers and no blank cells before I try the insert. This is what it looks like at run time via my browser:
<code>
<tr>
                                                                                                                                <td class="td_AEV" colspan="2">
                                                                                                                                    <table width="100%" bordercolor="white" border="1">
                                                                                                                                        <tr valign="top">
                                                                                                                                            <td width="85%" height="80px">
                                                                                                                                                <table width="100%" bordercolor="black" border="1">
                                                                                                                                                    <thead>
                                                                                                                                                        <tr>
                                                                                                                                                            <td>
                                                                                                                                                                <div id="radCodes" class="RadGrid RadGrid_Default">
 
  <input id="radCodes_ClientState" name="radCodes_ClientState" type="hidden" />
   </div>
  
                                                                                                                                                            </td>
                                                                                                                                                        </tr>
                                                                                                                                                    </thead>
                                                                                                                                                </table>
                                                                                                                                            </td>
                                                                                                                                            <td>
                                                                                                                                                <input type="submit" name="btnUP" value="UP" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnUP&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btnUP" style="font-size:8pt;" /><br />
                                                                                                                                                <input type="submit" name="btnDWN" value="DN" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnDWN&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btnDWN" style="font-size:8pt;" /><br />
                                                                                                                                                <input type="submit" name="btnRM" value="RM" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnRM&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" id="btnRM" style="font-size:8pt;" />
                                                                                                                                            </td>
                                                                                                                                        </tr>
</code>

What am I doing wrong with the grid where I can't see the headers, etc (see the attached file right in the ICD Code PANEL where it says: Code:
Princy
Top achievements
Rank 2
 answered on 08 Nov 2010
1 answer
104 views

Folks,

Using ASP.Net Ajax V2010 Release 2 with VStudio 2008 SP1.

We would like to collapse the expand/collapse column (if it is expanded) prior to export. Below is my command; basically prior to export, I would like to see if expand/collapse column is already expanded by user. If so collapse it 1st and then do export.
 
Thanks

protected void Export_Excel_Click(object sender, System.EventArgs e)
    {
        RadGrid1.MasterTableView.HierarchyDefaultExpanded = true;
        RadGrid1.ExportSettings.IgnorePaging = CheckBox2.Checked;
        RadGrid1.ExportSettings.OpenInNewWindow = true;     
        RadGrid1.ExportSettings.Excel.Format =  Telerik.Web.UI.GridExcelExportFormat.ExcelML;
  
        RadGrid1.ExportSettings.ExportOnlyData = true;
        RadGrid1.MasterTableView.ExportToExcel();
    }

 

Princy
Top achievements
Rank 2
 answered on 08 Nov 2010
1 answer
93 views
I have 2 NumericColumns and one Calculated column.  The value in the Calculated column is a product of column1 and column2.  I need to apply another variable to the calculation, depending on the value in column2.  For example, if the value in column2 is 3, the product needs to be ( column1 value * column2 value * .4) and if the value in column2 is 4, the product needs to be ( column1 value * column2 value * .2).  Basically I need something conditional so that I know what the additional variable needs to be.  How would I go about doing something like this?  Thanks.
Princy
Top achievements
Rank 2
 answered on 08 Nov 2010
1 answer
198 views
I am trying to change the main background image of my radmenu.  I want it to match the header logo of the page.  I have tried the code below but it doesn't work.

.RadMenu_Black
{
    background:  transparent url(images/img01.jpg) !Important;
}

I put this in the header <style> section of the page. 
Kamen Bundev
Telerik team
 answered on 07 Nov 2010
3 answers
84 views
Hi,

How do I show a Toolbar placed on a GridTemplate column on item row selection (client) and hide it on item row deselection (client-side)?

Avidan
Avidan
Top achievements
Rank 1
 answered on 07 Nov 2010
5 answers
579 views
Hello,

I would like to know how to go about adding code or a property to a button on a radToolbar that would force a FULL postback, even though the radToolbar is contained within an UpdatePanel?

I need this because I am writing a file to the browser upon postback and I cannot do that unless a FULL postback occurs.

Thank you.
Scott
Top achievements
Rank 1
 answered on 07 Nov 2010
2 answers
181 views
hi,

i get an exception when using raddatepicker within grid formtemplate for creating a new item.
the raddatepicker is bound. editing existing itemes works fine.

<telerik:RadDatePicker ID="DatePickerWJBeginnDatum" runat="server"
    DateInput-DateFormat="dd.MM.yyyy"
    SelectedDate='<%# Bind("WjBeginnDatum") %>'
    Width="400px">
</telerik:RadDatePicker>

thank you for your help
bernhard
Bernhard Rosenfelder
Top achievements
Rank 1
 answered on 06 Nov 2010
6 answers
263 views
Hi,

Is there a  way to implement the multiple file selection for uploading files within the file manager dialogs (Image Manager, Document Manager, etc)?

With other words: Is it possible to use 'ctrl' to select multiple files for uploading in the filemanagers.

I've found the multiple file selection on: http://demos.telerik.com/aspnet-ajax/upload/examples/async/multiplefileselection/defaultcs.aspx

The filemanagers can be found on: http://demos.telerik.com/aspnet-ajax/editor/examples/filemanagers/defaultcs.aspx

Thanks
Rumen
Telerik team
 answered on 06 Nov 2010
2 answers
193 views
I want the callback function that us executed after a call to radconfirm to have access to some additional information. 

I suspect I may be able to use the callerObj property for this, but it is only a guess.

Am I right?

If not I'll have to create a shed load of hidden inputs on the page (and that is sooooo last year).

I wouldn't mind an explanation of what callerObj is for though.

-- 
Stuart
Stuart Hemming
Top achievements
Rank 2
 answered on 05 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Hiba
Top achievements
Rank 1
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?