Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
104 views

if i have a item like this
<
telerik:GridDropDownColumn  DataField="UserName" DataSourceID="ObjectDataSource2"

                        DropDownControlType="DropDownList" EmptyListItemText="--Select User--"

                        EmptyListItemValue="--Select User--" EnableEmptyListItem="true" HeaderText="User"

                        ListTextField="FullName" ListValueField="UserName" UniqueName="FullName">

 

How can I get

Username in    Private Sub validator3_ServerValidate()

am getting  up to

 

Dim clickedItem As Telerik.Web.UI.GridDataItem = CType(CType(source, CustomValidator).NamingContainer, Telerik.Web.UI.GridDataItem)


then what should i do to get the seleted value
?

Princy
Top achievements
Rank 2
 answered on 05 Oct 2009
1 answer
222 views
Hi

I need to insert a customer logo above the grid table in both excel and pdf files.
It looks as expected with pdf,  but the Excel version shows the missing image icon instead.
What's the right way to do this (with image embedded, not pulled from the website)?

Thanks a lot for help on this.

Regards

Clive
Princy
Top achievements
Rank 2
 answered on 05 Oct 2009
1 answer
186 views
Hi,
I've got a problem using the GridCheckBoxColumn. I'm using v.2009.2.826.35 with RadGrid and a LinqDataSource control. It picks up the boolean fields and chooses to use a GridCheckBoxColumn which is fine. The problem is that I can't get the checkbox filter to autoPostBack even though AutoPostBackOnFilter is set. I basically want to eliminate the need for the filter icon since the checkbox should be enough (then I just to set the CurrentFilterFunction to "EqualTo"), since it's a boolean field and there's already constraints on the DB to not allow nulls. There's no need for the filter menu icon.

AutoPostBack on all the other filters work fine. From the resulting HTML, it seems that no "onclick" event is being rendered as is done when you use a regular ASP:CheckBox and set AutoPostBack=true. All the the other filters with AutoPostBackOnFilter set (for other GridBoundColumns resulting in different input types such as textbox types) are rendered with an "onchange" client side event.

Anyway, here's the code for 2 such columns:
<telerik:GridCheckBoxColumn AutoPostBackOnFilter="True" CurrentFilterFunction="EqualTo" DataType="System.Boolean" 
                    DataField="Error" HeaderText="Error?" SortExpression="Error" UniqueName="Error" 
                    CurrentFilterValue="True" ReadOnly="True" ShowFilterIcon="false"
</telerik:GridCheckBoxColumn> 
<telerik:GridCheckBoxColumn AutoPostBackOnFilter="True" DataField="Truncated" DataType="System.Boolean" 
                    HeaderText="Trunc?" SortExpression="Truncated" UniqueName="Truncated" ReadOnly="True"
 </telerik:GridCheckBoxColumn> 

I've tried this many different ways with the properties set numerous ways and can never get the filter column for the check box to post back on check change. the user still haa to go to the filter icon and select "EqualTo" from the filter menu or get it to postback some other way (e.g. by using another filter with AutoPostBackOnFilter set).

Is this a bug or am I just missing something simple?
Is the only alternative to use FilterTemplate and/or GridTemplateColumn for every column I want to do this?

Thanks,
Brad

Tsvetoslav
Telerik team
 answered on 05 Oct 2009
1 answer
178 views
Anyone have any thoughts as to why the bullets show up in IE7 but not in IE8? The style below has a image as the bullet, because I couldn't get the normal bullet type to work. The image doesn't seem to work in iE8 as well.

Here is the code:
/*Tool Tips*/  
.tooltip  
{  
    padding: 10px;  
    width: 350px;  
    list-style-image: url('../../Images/bullet.gif');  
    line-height: 15px;} 

 

<telerik:RadToolTip ID="RadToolTip6" runat="server" RelativeTo="Element" TargetControlID="Image6" 
        Font-Size="Small" Skin="Sunset" Width="266px" Position="TopCenter" HideEvent="LeaveToolTip">  
        <div class="tooltip">  
            <h5> 
                Metropolitan Status</h5> 
            <hr /> 
            <p> 
                “Metropolitan Status” is based on the most recent data from the U.S. Census Bureau.  Your hospital will be categorized in one of three groups:  
            </p> 
            <ul> 
            <li>Metropolitan Area - in a county or group of counties that has an ‘urban core’ of at least 50,000 people </li> 
            <li>Micropolitan Area - in a county or group of counties that has an ‘urban core’ of 10,000 – 50,000 people </li> 
            <li>Non-Metropolitan, Non-Micropolitan Area - in a county that has small communities of  less than 10,000 people</li> 
            </ul> 
        </div> 
    </telerik:RadToolTip> 

 

 

Martin
Telerik team
 answered on 05 Oct 2009
1 answer
83 views
Hi 

We are using Rad Grid in our application to perform inline Edit.
The issue we have with inline edit is that When I double click the row to perform edit the first and the second row does not return GridDataItem instead it returns GridTHead and GridTFoot.
To be clear we are not using any CommandItemTemplate and the mastertableview commandItemDisplay property is set to None.

Explanation:
After double clicking the first row the RaisepostBack event is invoked from the code Behind based on the eventtarget and eventargument we are passing the index of the row to fetch the GridDataItem

GridItem

 

item = ((rdGrid.MasterTableView.Controls[0] as Table).Rows[int.Parse(postBackEventArgumentData[1])] as GridItem);

 


The above code always return GridTHead and GridTFoot for the first and second row by default.
Below is the code which for rad grid in the aspx page.

<telerik:RadGrid ID="rdGrid"  runat="server" Width="100%" Height="100%" OnItemUpdated="rdGrid_ItemUpdated"  
OnSortCommand="rdGrid_SortCommand" OnColumnCreated="rdGrid_ColumnCreated"
 OnNeedDataSource="rdGrid_NeedDataSource" OnItemCommand="rdGrid_ItemCommand" 
 OnItemCreated="rdGrid_ItemCreated" OnItemDataBound="rdGrid_ItemDataBound" CommandItemDisplay="None" AllowAutomaticUpdates="true">
   <PagerStyle Mode="NextPrevNumericAndAdvanced" ></PagerStyle>
    <MasterTableView Width="100%" DataMember="col1" DataKeyNames="col2" CommandItemDisplay="None">
    <Columns>
                Controls  
    </columns>
    </MasterTableView>
    <ClientSettings>
         <ClientEvents OnRowClick="RowClick" OnRowDblClick="RowDblClick" OnGridCreated="GridCreated" />
    </ClientSettings>
</telerik:RadGrid> 

It would be helpful if you can give me some suggestion or with sample code to perform the double click inline edit from the RaisePostBack event.
Whatever sample provided in the Telerik URL for the help does not perform edit based on the RaisePostBack event.
I have already gone through the Telerik help for the Grid Inline edit with Rowdblclick and RowClick.

Your earliest help is appreciated

Regards
Bose Thirumalai



     
Iana Tsolova
Telerik team
 answered on 05 Oct 2009
22 answers
456 views
I want to perform grouping on a RadGrid like the example in the demo section for Outlook like grouping.

My database holds a list of blog posts with Date and Time in the same field {pubDate}

I only want to group on the Date part, not the time part

Is this possible?
I tried changing the value of pubDate the field in the itemdatabound and/or itemdatacreate but that did not seem to work.

Thanks
Alan

<telerik:RadGrid ID="ResultsGrid2"  Skin="Vista" Width="430px" PageSize="30" AllowSorting="true"
            AllowPaging="True" ShowGroupPanel="True" AutoGenerateColumns="False" GridLines="none"  runat="server" >
              <PagerStyle Mode="NumericPages" Position="TopAndBottom" ></PagerStyle>             
            <MasterTableView DataKeyNames="PostID" >
            <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldAlias="Date" FieldName="PubDate" FormatString="{0:D}"></telerik:GridGroupByField>
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="PubDate" SortOrder="Descending"></telerik:GridGroupByField>
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>                
                <Columns>                                                
                    <telerik:GridDateTimeColumn ItemStyle-Width="60" DataField="PubDate" HeaderText="Date" DataFormatString="{0:dd/MM/yyyy}" UniqueName="pubDate" ></telerik:GridDateTimeColumn>                    
                    <telerik:GridHyperLinkColumn DataTextField="Title" DataNavigateUrlFields="Link" HeaderText="Post" UniqueName="PostLink" Target="_blank"></telerik:GridHyperLinkColumn>
                    <telerik:GridHyperLinkColumn ItemStyle-Width="80" DataNavigateUrlFields="Blog.title" DataNavigateUrlFormatString="/tag.aspx/{0}" DataTextField ="Blog.title" HeaderText="Blog" UniqueName="BlogTitle"></telerik:GridHyperLinkColumn>
                    <telerik:GridBoundColumn DataField="Description" UniqueName="Description" Visible="false" ></telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
            <ClientSettings EnablePostBackOnRowClick="true" EnableRowHoverStyle="true">
                <ClientEvents OnRowMouseOut="RowMouseOver" />
                <Selecting AllowRowSelect="True"></Selecting>
            </ClientSettings>
        </telerik:RadGrid>
Zoran
Telerik team
 answered on 05 Oct 2009
6 answers
419 views
Hello,

I'm trying to create custom attributes on a Radtreenode that is being build with the property ServerSideCallback.  For some reason, when I create this node with node.Attributes.Add("key", "Value"), it keeps the attribute at first.  But once it posts back and I access the node via the RadTreeNodeEventArgs e.Node.  My attributes Count=0 and I have no keys available to access the value.  If I change the node to ServerSide, everything works fine, however, this isn't what I want.

Any suggestions or thoughts would be great.


--This is where i create the node.
<code>
foreach (var zone in x)
             {
                 RadTreeNode zoneNode = new RadTreeNode();
                 zoneNode.Text = String.Format("Zone {0}", zone.ZoneName);
                 zoneNode.Value = zone.NSD_ZoneID.ToString();
                 zoneNode.Expanded = false;
                 zoneNode.ExpandMode = TreeNodeExpandMode.ServerSide;
                 zoneNode.Attributes.Add("type", "OnDemand");
                 zoneNode.PostBack = true;
                 zoneNode.Checkable = false;
                 node.Nodes.Add(zoneNode);
             }
</code>


<code>
//This is where the e.Node.Attributes.Count = 0;
protected void DPTTreeView_NodeClick(object sender, Telerik.Web.UI.RadTreeNodeEventArgs e)
        {
             switch (e.Node.Attributes["type"])
             {
...snip....
}
}
</code>
Yana
Telerik team
 answered on 05 Oct 2009
1 answer
58 views
I would like to use an custom ToolsFile.xml to handel the css style classes showed in RadHtmlField control. I have changes to ToolsFile.xml. I added the following lines to the end after </tools> tag.

</tools>
  <classes>
    <class name="Clear Class" value="" />
    <class name="Links Class" value="a.link" />
    <class name="Images Class" value=".img" />
    <class name="My Red Text" value=".redText" />
  </classes>

But now when I go to the edit mode of the page there is only the Clear Class in the menu. Nothing more.

What I'm I doing wrong? What is the best way to have you own css classes in the drop down menu? So that nothing else than your own classes are shown.
Stanimir
Telerik team
 answered on 05 Oct 2009
1 answer
143 views
Hi,

is there a way to check if gridtableview is in edit mode?

Thnx
Shinu
Top achievements
Rank 2
 answered on 05 Oct 2009
1 answer
106 views
Hi,
My Scenario is , I want to delete the selected items( selected using checkbox)  in the grid by clicking on the delete link button using code-behind in vb.Please help me
Shinu
Top achievements
Rank 2
 answered on 05 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?