Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
268 views
<telerik:RadGrid ID="RadGrid1" ShowGroupPanel="false" DataSourceID="MediaRelatedDS" Skin="Default" 
            AllowPaging="True" runat="server" AllowSorting="false" OnDataBound="RadGrid1_DataBound" OnPreRender="RadGrid1_PreRender" 
            OnItemDataBound="RadGrid1_ItemDataBound" AllowFilteringByColumn="false" PageSize="10" ShowHeader="False"> 
            <PagerStyle Mode="NumericPages" /> 
            <MasterTableView TableLayout="Fixed"  
                    nomasterrecordstext="&lt;b class=&quot;noRecords&quot;&gt;No records to display.&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;"> 
         
       <ItemTemplate> <%# (((GridItem)Container).ItemIndex > 0) ? "</td></tr></table>" : ""%> 
                            <asp:Repeater ID="repPhoto" runat="server"> 
                     <ItemTemplate> 
                     <div class="mediaThumb"><a rel="lightbox-gallery<%#(Eval("PrimaryKeyID").ToString())%>" href="/uploads/images/MediaCoverage/<%#(Eval("Image").ToString()) %>" class="highslide" onclick="return hs.expand (this, { wrapperClassName: 'wide-border'})">thmb</div> 
                     </ItemTemplate> 
                     </asp:Repeater> 


and i am assigning the datasource in the back end code:

    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e) 
    { 
 
        int itemCount = (sender as RadGrid).MasterTableView.GetItems(GridItemType.Item).Length + (sender as RadGrid).MasterTableView.GetItems(GridItemType.AlternatingItem).Length; 
 
        foreach (GridItem item in (sender as RadGrid).Items) 
        { 
                string itemID = "1"; 
 
                Repeater repPhoto = (Repeater)e.Item.FindControl("repPhoto"); 
 
               DataTable ds = getMediaImages(itemID); 
 
                repPhoto.DataSource = ds; 
                repPhoto.DataBind(); 
 
        } 
    } 


Keeps throwing "Object reference not set to an instance of an object." I assume that it is not finding the nested repeater!

Please help
jason walsh
Top achievements
Rank 1
 answered on 16 Dec 2009
1 answer
111 views
Hello,

I want to create telerik raddock from client side using javascript. can anyone has idea how to do this.

Thanks.
MP
Pero
Telerik team
 answered on 16 Dec 2009
2 answers
473 views
I'm wondering what does this property do.
Can this property stores the entire data source into it?
Is this scenario possible where I'll bind the grid on 1st load and not relying on any viewstate in code behind to persist the data source of a grid?
AereoN
Top achievements
Rank 1
 answered on 16 Dec 2009
2 answers
100 views
hi
when i use telerik rad grid with  Master/Detail table, some time i can`t see Expand icon. 
some time don`t show Add/Refresh icon in bottom of grid ... ! 

please help me :( !
 

Johny
Top achievements
Rank 1
 answered on 16 Dec 2009
1 answer
101 views
Hello all,

i want to add a new button to radwindow's title beside the original buttons. i want call a client method on clicking the button. is it possible with radwindow, any hint?

thanks
benj
Shinu
Top achievements
Rank 2
 answered on 16 Dec 2009
1 answer
127 views
Hi:
  When I use the attachement control in my latest control, it seems there is a bug for the attachment control. The control is showed in a pop-up page which is showed by the Telerik windows manager.  Subsequently, if the cursor is put in the textbox of attachment and the corresponding Chinese Input Language is active, nothing will happen when the Select Button is clicked.
  Can anyone tell me what is the problem for it? Thank you.
Yavor
Telerik team
 answered on 16 Dec 2009
2 answers
130 views
Hello.
I have rad grid with templated columns (readonly and edit modes).
I set programmatically some row to edit mode base on my data on ItemDataBound event handler and then try to access control from row by its Id. I can't find control from EditTemplate but exist only from ItemTemplate

I explain on simple example. Here is a grid with templated column
<telerik:RadGrid runat="server" ID="weldsGrid" AllowPaging="True" AllowSorting="True" 
            PageSize="20" GridLines="None"> 
            <MasterTableView AllowMultiColumnSorting="True" AutoGenerateColumns="False" EditMode="InPlace"> 
                <Columns> 
<telerik:GridTemplateColumn DataField="Welder" HeaderText="Welder"  
                        SortExpression="Welder" UniqueName="Welder"> 
                        <EditItemTemplate> 
                            <asp:TextBox ID="WelderEdit" runat="server" Text='<%# Bind("Welder")%>' 
                                ontextchanged="WelderTextBox_TextChanged" AutoPostBack="True" /> 
                        </EditItemTemplate> 
                        <ItemTemplate> 
                            <asp:Literal ID="WelderRd" runat="server" Text='<%# Eval("Welder") %>' /> 
                        </ItemTemplate> 
                    </telerik:GridTemplateColumn> 
</Columns> 
            </MasterTableView> 
            <ClientSettings> 
                <Selecting AllowRowSelect="True" /> 
            </ClientSettings> 
        </telerik:RadGrid> 
ItemTemplate contains Literal control with Id = WelderRd   and EditItemTemplate contains control WelderEdit

Here I set one of rows to edit mode when I get data from database.
Private Sub weldsGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles weldsGrid.ItemDataBound 
    If (e.Item.ItemType = Telerik.Web.UI.GridItemType.Item OrElse _ 
        e.Item.ItemType = Telerik.Web.UI.GridItemType.AlternatingItem) Then 
 
      If (e.Item.ItemIndex > -1) Then 
        Dim row = CType(CType(e.Item.DataItem, DataRowView).Row, DSBiasStep.BiasWeldRow) 
        SetControlsVisibility(e.Item, row) 
      End If 
 
    End If 
  End Sub 
 
Private Sub SetControlsVisibility(ByVal row As GridItem, ByVal data As DSBiasStep.BiasWeldRow) 
    'set row to edit mode 
    row.Edit = data.IsActive 
 
    If Not data.IsIsAcceptedNull Then 
      'even row in edit mode next row returns null 
      Dim WelderControl= TryCast(row.FindControl("WelderEdit"), TextBox) 
      If WelderControl Is Nothing Then 
        ''''There is no reason to this but this is just example.  
        'We always find a literal control even row is in edit mode         
        WelderControl = TryCast(row.FindControl("WelderRd"), Literal) 
      End If 
      WelderControl.Enabled = CurrentUser.HasEditorRole 
    End If 
  End Sub 

How can I get controls from EditItemTemplate after setting row to edit mode programmatically?
Princy
Top achievements
Rank 2
 answered on 16 Dec 2009
1 answer
197 views
Hi,

i have a RadGrid with GridButtonColumns. The user needs to be able to navigate the buttons generated by the GridButtonColumns with the keyboard. There lies the problem: i can't set a TabIndex to the column and consequently the buttons are not included in keyboard navigation.
I can set a Tabindex to the Grid as a whole, but not to the columns. What can be done?
Princy
Top achievements
Rank 2
 answered on 16 Dec 2009
2 answers
110 views
Hi Team,
  I am using model radWindow.
This is opened as a pop-up.
When ever user clicks on the refresh button, its parent page is also getting refresh each time.

Please Repy how can I restrict this behaviour.

Regards,
Snehal
Fiko
Telerik team
 answered on 16 Dec 2009
2 answers
135 views
Hi,

The LinkManager is now extended with the DocumentManager button, that works great.

I need the same functionality with the Image Manager.
I tried to copy and rework the DocumentManager code, but I am stuck on how to get the parameters back to the LinkManager form.

Is there any chance that this functionality can be added?

Marc
Fit2Page
Top achievements
Rank 3
Bronze
Bronze
Iron
 answered on 16 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?