Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
137 views
Hey everyone,

I have a radgrid,its need data source event is--
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            RadGrid1.DataSource = GetDataTable("SELECT UID, Email_TemplateName as 'Name', Mail_Text as 'Mail text',Mail_Subject as 'Mail Subject' FROM Entry");
        }
i have no columns defined otherwise in the grid definition.Also i have hided the page size dropdown and i want the size of grid to be always of 10 items and no matter how much no. of items are present in the grid.

Thanks
Amit
Dimo
Telerik team
 answered on 08 Nov 2010
1 answer
119 views
Hi,
I'm changing the scroll area height in the onGridCreated event as in the http://www.telerik.com/help/aspnet-ajax/grdchangescrollheightatruntime.html, it works fine.

I want to do the same thing when the user resizes the browser window. What's the easiest way to do it? Also, I'm using a pager. How can I know its height in run-time?
Pavlina
Telerik team
 answered on 08 Nov 2010
1 answer
84 views
Hello.

Hopefully I dont come off sounding like a fool :)

I am using Visual Studio 2010, with demo version of telerik asp.net to see if I can make this work with FireBird DB

Basically what I want to do is have the grid work with firebird for huge datasets.

With Paging ASP is creating the limit queries to return only a subsset of data for that particular page in the grid honoring the current sorted colums, etc.

How can I do this in firebird ?

I am hoping I can use an event to generate the select sql based on the current columns chosen to sort by and get back the page the client is requesting etc..

I hope this  makes sense what I am asking :)

Radoslav
Telerik team
 answered on 08 Nov 2010
1 answer
167 views
Hi.

I have a Color picker wrapped in a jquerry dialog and when i choose a color i would like the color pop up to expand the dialog (instead of just overflowing) or  be able to reposition it somewhere on the page. Could anybody by any chance provide me with the name of the class tag that i need to modify? i have not been able to find it on my own.

Thanks!
Rafal
Tsvetie
Telerik team
 answered on 08 Nov 2010
3 answers
183 views
I'm getting the below exception when loading an RTF file from a stream.
All fonts used on the existing system (that works - not using telerik though) have been copied to the dev platform in the hope of eliminating some suspects.
If you wish I can post the RTF.
Any help appreciated.

{"Value cannot be null.\r\nParameter name: format"}
 at System.String.Format(IFormatProvider provider, String format, Object[] args)
   at Itenso.Sys.StringTool.FormatSafeInvariant(String format, Object[] args)
   at Itenso.Sys.StringsBase.Format(String format, Object[] args)
   at Telerik.Web.UI.Editor.Rtf.Strings.UndefinedFont(String fontId)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreter.Telerik.Web.UI.Editor.Rtf.IRtfElementVisitor.VisitTag(IRtfTag tag)
   at Telerik.Web.UI.Editor.Rtf.Model.RtfTag.DoVisit(IRtfElementVisitor visitor)
   at Telerik.Web.UI.Editor.Rtf.Model.RtfElement.Visit(IRtfElementVisitor visitor)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreter.VisitChildrenOf(IRtfGroup group)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreter.Telerik.Web.UI.Editor.Rtf.IRtfElementVisitor.VisitGroup(IRtfGroup group)
   at Telerik.Web.UI.Editor.Rtf.Model.RtfGroup.DoVisit(IRtfElementVisitor visitor)
   at Telerik.Web.UI.Editor.Rtf.Model.RtfElement.Visit(IRtfElementVisitor visitor)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreter.VisitChildrenOf(IRtfGroup group)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreter.Telerik.Web.UI.Editor.Rtf.IRtfElementVisitor.VisitGroup(IRtfGroup group)
   at Telerik.Web.UI.Editor.Rtf.Model.RtfGroup.DoVisit(IRtfElementVisitor visitor)
   at Telerik.Web.UI.Editor.Rtf.Model.RtfElement.Visit(IRtfElementVisitor visitor)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreter.VisitChildrenOf(IRtfGroup group)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreter.Telerik.Web.UI.Editor.Rtf.IRtfElementVisitor.VisitGroup(IRtfGroup group)
   at Telerik.Web.UI.Editor.Rtf.Model.RtfGroup.DoVisit(IRtfElementVisitor visitor)
   at Telerik.Web.UI.Editor.Rtf.Model.RtfElement.Visit(IRtfElementVisitor visitor)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreter.VisitChildrenOf(IRtfGroup group)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreter.Telerik.Web.UI.Editor.Rtf.IRtfElementVisitor.VisitGroup(IRtfGroup group)
   at Telerik.Web.UI.Editor.Rtf.Model.RtfGroup.DoVisit(IRtfElementVisitor visitor)
   at Telerik.Web.UI.Editor.Rtf.Model.RtfElement.Visit(IRtfElementVisitor visitor)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreter.VisitChildrenOf(IRtfGroup group)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreter.InterpretContents(IRtfGroup rtfDocument)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreter.DoInterpret(IRtfGroup rtfDocument)
   at Telerik.Web.UI.Editor.Rtf.Interpreter.RtfInterpreterBase.Interpret(IRtfGroup rtfDocument)
   at Telerik.Web.UI.Editor.Rtf.Support.RtfInterpreterTool.Interpret(IRtfGroup rtfDocument, IRtfInterpreterListener[] listeners)
   at Telerik.Web.UI.Editor.Rtf.Support.RtfInterpreterTool.BuildDoc(IRtfGroup rtfDocument, IRtfInterpreterListener[] listeners)
   at Telerik.Web.UI.Editor.Rtf.Support.RtfInterpreterTool.BuildDoc(Stream rtfTextSource, IRtfInterpreterListener[] listeners)
   at Telerik.Web.UI.Editor.Rtf.Rtf2Html.StreamToHtml(Stream stream)
   at Telerik.Web.UI.RadEditor.LoadRtfContent(Stream rtfStream)
   at <namechangedtoprotecttheinnocent>_Click(Object sender, EventArgs e) in C:\Projects\project\project2\pagename.aspx.cs:line 700
Dobromir
Telerik team
 answered on 08 Nov 2010
3 answers
242 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
100 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
120 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
107 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
202 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?