Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
112 views
What I am trying to do it preload the combo box with a single value on page load, which comes from the current record.  Then if the end user wants to change that value then load all the possible values into the combo box.  IF I dont prefill on page load the loadondemand works just fine.  But I am trying to get the data set I pass to the client as small as possible.  I have 20 combo boxes on 1 page with up to 4000 records I could pass with the end user never changing any of them, hence the load on demand.  Thanks for any help.

protected void Page_Load(object sender, EventArgs e)

{

//get values from database

DataAccess.

DA dta = new DA("connection strign stuff");

DB.m_da = dta;
//fill dataset

DataSet ds = new DataSet();

try

{

dta.SetRead(

"select [ID],[RptName] from ReportInfo where ID = 1", 1);

dta.Run(

ref ds);

RadComboBox1.Items.Add(
new RadComboBoxItem(ds.Tables[0].Rows[0].ItemArray.GetValue(1).ToString()));

}

catch (Exception ex)

{

string s = ex.Message;

}

}

protected void RadComboBox1_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)

{

DataAccess.

DA dta = new DA("connection string stuff");

DB.m_da = dta;

DataSet ds = new DataSet();

try

{

dta.SetRead(

"select [ID],[RptName] from ReportInfo", 1);

dta.Run(

ref ds);

RadComboBox1.DataSource = ds;

RadComboBox1.DataValueField =

"ID";

RadComboBox1.DataTextField =

"RptName";

RadComboBox1.DataBind();

}

catch (Exception ex)

{

string s = ex.Message;

}

}

Bruce St.Clair
Top achievements
Rank 2
 answered on 17 Apr 2008
0 answers
123 views
I want to capture the right click event of the rad tree view and load the context menu dynamically.
Kousalya
Top achievements
Rank 1
 asked on 17 Apr 2008
2 answers
121 views
I just download the help file release April 15 and everypage is blank.  Anybody else have this problem?

"This program cannot display the webpage"

Bruce St.Clair
Top achievements
Rank 2
 answered on 17 Apr 2008
2 answers
115 views
I have a rad grid which I load with data imported from and Excel spreadsheet (Excel to Datatable then bind to grid).  I have filtering turned on for all columns but when I enter a value in my string field that is clearly that column's value for one of the three records in the grid then click "equal to" for the filter, the page posts back and the grid then disappears completely.  Is there something else that has to be done for the basic filtering to work?  I thought it was automatic. 

Thanks in advance . . .

Acadia
Top achievements
Rank 1
Iron
 answered on 17 Apr 2008
3 answers
143 views
In the table wizard, setting the Height of the table actually sets the Width, and vice versa.
Shaun Peet
Top achievements
Rank 2
 answered on 17 Apr 2008
1 answer
173 views
i want to get the HTML content of  rad editor using  javascript 
i want javascript code to run at IE and Firefox

here is my code

var ctrl=document.getElementById(RadEditorId);
var content  ;
     if(ctrl !=null)
     {
        if (ctrl.control.isIE)
          content  =   ctrl.innerHTML ;
       else if (ctrl.control.isFirefox)
         content   =  ctrl.control._contentArea.innerHTML
     }




can anyone plz help me

Shaun Peet
Top achievements
Rank 2
 answered on 17 Apr 2008
2 answers
170 views
The StyleBuilder doesn't seem to work properly either locally or in the online demos.  It seems content to only put "border-left-width: medium; border-right-width: medium .... etc..." regardless of what you actually select in the dialog.  The only exception seems to be if you actually do select a border width, but then it only applies it to the bottom and not the rest of the edges.
Shaun Peet
Top achievements
Rank 2
 answered on 17 Apr 2008
1 answer
738 views
Hi,

The grid sample is:

<rad:RadGrid ID="dgrdjob" EnableAJAXLoadingTemplate="true" LoadingTemplateTransparency="40"
    MasterTableView-CellPadding="0" runat="server" AllowPaging="True" AllowSorting="True"
    CellSpacing="0" CellPadding="0" BorderStyle="None" PageSize="20" HorizontalAlign="left"
    FilterItemStyle-BackColor="#FFE88C" AllowFilteringByColumn="FALSE" Width="100%"
    Height="100%" AutoGenerateColumns="False" Skin="dgrdStyle" OnItemEvent="dgrdjob_ItemEvent"
    EnableAJAX="True" FilterMenu-TextColumnBackColor="Window" FilterMenu-SelectColumnBackColor="#FFE88C"
    PagerStyle-ShowPagerText="true" PagerStyle-PagerTextFormat="<br>Change page: {4} &nbsp;|&nbsp; Displaying page {0} of {1}, items {2} to {3} of {5}.">
    <HeaderStyle HorizontalAlign="left" VerticalAlign="Middle" Font-Bold="true" Font-Names="verdana"
    Font-Size="8.5pt" Height="25px" ForeColor="Black" CssClass="bgtop"></HeaderStyle>
    <PagerStyle CssClass="dgrdpager" Font-Bold="false" AlwaysVisible="true" Mode="NextPrevNumericAndAdvanced">
    </PagerStyle>
    <AlternatingItemStyle CssClass="bgleft" />
    <FilterMenu HoverBackColor="#FFE88C" HoverBorderColor="#FFE88C"></FilterMenu>
    <MasterTableView NoMasterRecordsText="No records found." RowIndicatorColumn-Display="false"
    CellPadding="1">
    <Columns>
        <rad:GridTemplateColumn HeaderText="Edit" Reorderable="False" Resizable="False" AllowFiltering="False"
        UniqueName="TemplateColumn" ItemStyle-Font-Names="Verdana" ItemStyle-VerticalAlign="NotSet">
        <ItemStyle CssClass="lnkcolor" />
        <ItemTemplate>
            <asp:LinkButton ID="lnkBroadcastID" ToolTip="" runat="server" CommandName="Summary">LinkButton</asp:LinkButton>
        </ItemTemplate>
        </rad:GridTemplateColumn>
        
        <rad:GridTemplateColumn DataField="Description" AllowFiltering="true" HeaderText="Description"
        Reorderable="False" UniqueName="description" ItemStyle-Font-Names="Verdana" SortExpression="Description"
        Resizable="False">
        <ItemTemplate>
            <asp:Label ID="lblDescription" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.description") %>'>
            </asp:Label>
        </ItemTemplate>
        </rad:GridTemplateColumn>
        
        <rad:GridTemplateColumn DataField="status" HeaderText="Status" Resizable="False"
        Reorderable="False" UniqueName="Status" ItemStyle-Font-Names="Verdana" AllowFiltering="true">
        <ItemTemplate>
            <asp:Label ID="lblStatus" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.status") %>'>
            </asp:Label>
           </ItemTemplate>
        </rad:GridTemplateColumn>
        
    </Columns>
    
    <ExpandCollapseColumn Visible="False">
        <HeaderStyle Width="19px" />
    </ExpandCollapseColumn>
    <RowIndicatorColumn>
        <HeaderStyle Width="20px" />
    </RowIndicatorColumn>
    </MasterTableView>
    <ClientSettings ReorderColumnsOnClient="False" AllowDragToGroup="False" AllowColumnsReorder="False">
    <Resizing AllowRowResize="false" AllowColumnResize="false"></Resizing>
    </ClientSettings>
    <FilterItemStyle BackColor="" BorderColor="Black" Width="20px" Wrap="True" />
</rad:RadGrid>

The grid has following columns
1) Edit - job_id
2) Description - Description
3) status - status

Using javascript I want to pick job_ids as comma separated string for the rows where status = "NEW"
job_id in LinkButton, status in label.

javascript code I am trying is:

....
....
tagName = "*"; //* means all elements
var grid = document.getElementById("<%=dgrdjob.ClientID %>");
var elements = grid.getElementsByTagName(tagName);

for (var i = 0; i < elements.length; i++)
{
    var element = elements[i];
    alert(element.id);
}
....
....


I am unable to get expected element id.

Yavor
Telerik team
 answered on 17 Apr 2008
8 answers
160 views
Hi,

I have a grid with Office2007 skin (although the same happens regardless of skin).  I have ajax enabled, when I click a row, the post back happens - the colour of the row changes, but the height of the row also changes.  Before I select anything there is a lot of padding, but there seems to be an autofit going on after the callback returns.

<

rad:RadGrid ID="grdStudyCycles" runat="server" AutoGenerateColumns="False" DataSourceID="SqlStudyCycleTimes"

EnableAJAX="True" GridLines="None" Width="408px" OnItemCommand="grdStudyCycles_ItemCommand" Skin="Office2007">

<MasterTableView DataSourceID="SqlStudyCycleTimes" CellPadding="0" GridLines="Both" DataKeyNames="MEASURE" ItemStyle-Height="5" >

<Columns>

<rad:GridBoundColumn DataField="MEASURE" UniqueName="MEASURE" HeaderText="Interval">

<ItemStyle HorizontalAlign="Left" />

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="TARGET" UniqueName="TARGET" DataFormatString="{0:G0}" DataType="System.Decimal" HeaderText="Target">

<ItemStyle HorizontalAlign="Left" />

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="BLYEAR_AVG" UniqueName="BLYEAR_AVG" DataFormatString="{0:G0}" DataType="System.Int32" HeaderText="2007">

<ItemStyle HorizontalAlign="Left" />

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="FORECAST_AVG" UniqueName="FORECAST_AVG" DataFormatString="{0:G0}" DataType="System.Int32" HeaderText="Forecast">

<ItemStyle HorizontalAlign="Left" />

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="WYE_AVG" UniqueName="WYE_AVG" DataFormatString="{0:G0}" DataType="System.Int32" HeaderText="WYE">

<ItemStyle HorizontalAlign="Left" />

</rad:GridBoundColumn>

<rad:GridBoundColumn DataField="YTD_AVG" UniqueName="YTD_AVG" DataFormatString="{0:G0}" DataType="System.Int32" HeaderText="YTD">

<ItemStyle HorizontalAlign="Left" />

</rad:GridBoundColumn>

</Columns>

<ExpandCollapseColumn Resizable="False" Visible="False">

<HeaderStyle Width="20px" />

</ExpandCollapseColumn>

<RowIndicatorColumn Visible="True">

<HeaderStyle Width="20px" />

</RowIndicatorColumn>

</MasterTableView>

<ClientSettings EnablePostBackOnRowClick="True" EnableClientKeyValues="False">

</ClientSettings>

</rad:RadGrid>

Stephen
Top achievements
Rank 1
 answered on 17 Apr 2008
2 answers
117 views
Hi,

Calling the ReBind method on the grid does not invoke NeedDataSource event

Can you advise

Thanks

Ken
Ken
Top achievements
Rank 1
 answered on 17 Apr 2008
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?