Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
180 views
Hi,

I need help to bind array to a gridcolumn in Grid.

Eg

Product ID    Description     Decipher Info(array)

B234567     Serial                B- Area
                                            23- SubArea
                                            5- month
                                             6-Year
                                            7- Day

CDE78        Serial            C-Facility
                                        D- District
                                        E- Shift
                                        7 -Month
                                        8- Year

etc...

Length of Decipher Info will be different depending on length of Product Id. Datasource is object with Decipher Info as Oracle VARRAY.

Any help will be highly appreciated.


Thanks
Martin
Telerik team
 answered on 11 Sep 2009
1 answer
308 views
Hello,
I am having problem with maintaing state on the detailsview nested inside the radgrid's NestedViewTemplate.

Here is the aspx version
<telerik:RadGrid VirtualItemCount="1000" ID="RadGridAll"
             AllowPaging="True" AllowSorting="True"
            AllowMultiRowSelection="True" runat="server"
             DataSourceID="SqlDataSource1" GridLines="None" OnItemCommand="RadGridAll_ItemCommand">
            <MasterTableView   AllowCustomPaging="True" DataSourceID="SqlDataSource1" GridLines="Both">
                <Columns>
                    
                    <telerik:GridTemplateColumn UniqueName="CheckBoxTemplate">
                        <HeaderTemplate>
                            <asp:CheckBox ID="headerChkbox" AutoPostBack="true" runat="server" />                            
                        </HeaderTemplate>
                        <ItemTemplate>
                            <asp:CheckBox ID="checkbox1"   AutoPostBack="true" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle Width="30px" />
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="TemplateColumn7" DataField="nameLabels" HeaderText="Labels">
                        <HeaderStyle Width="60px" CssClass="rgHeader last"></HeaderStyle>
                        <ItemTemplate>
                                <%# DataBinder.Eval(Container.DataItem,"name") %>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <NestedViewTemplate>
                    <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px">
                            <Fields>
                               
                            </Fields>
                    </asp:DetailsView>
              
                </NestedViewTemplate>
             
                <ExpandCollapseColumn Visible="True">
                </ExpandCollapseColumn>
                
            </MasterTableView>
            <FilterMenu EnableEmbeddedSkins="False">
            </FilterMenu>
            <HeaderContextMenu EnableEmbeddedSkins="False">
            </HeaderContextMenu>
            
        </telerik:RadGrid>

and in the code behind  I am adding custom template fields to the detailsview  whenever the user presses the expand button it:

private void AddField(DetailsView dvItemDetails,string column, string header)
    {
        object value = "ddddd";
        TemplateField field = new TemplateField();
        field.ShowHeader = true;
        field.HeaderTemplate = new DetailsViewTemplate(DataControlRowType.Header, header, "", "");
        field.ItemTemplate = new DetailsViewTemplate(DataControlRowType.DataRow, "", column, value);
        dvItemDetails.Fields.Add(field);
    }
    public void CreateColumns(DetailsView dvItemDetails)
    {
            AddField(dvItemDetails,"one","One");
            AddField(dvItemDetails,"two", "Two");
            List<int> source=new List<int>(2);
            source.Add(1);
            source.Add(2);
            dvItemDetails.DataSource = source;
            dvItemDetails.DataBind();
    }
    protected void RadGridAll_ItemCommand(object source, Telerik.Web.UI.GridCommandEventArgs e)
    {
        if (e.CommandName == "ExpandCollapse")
        {
            GridDataItem item = RadGridAll.Items[e.Item.ItemIndex];
            GridNestedViewItem template = item.ChildItem;
            DetailsView dvItemDetails = template.FindControl("DetailsView1") as DetailsView;
            CreateColumns(dvItemDetails);
        }
    }

 I am using a custom template class ,DetailsViewTemplate
public class DetailsViewTemplate : ITemplate
{
    private DataControlRowType templateType;
    private string columnHeader;
    private string columnNameBinding;
    private string text = "";

    public DetailsViewTemplate(DataControlRowType type, string colHeader, string colNameBinding, object value)
    {
        templateType = type;
        columnHeader = colHeader;
        columnNameBinding = colNameBinding;
        text = value.ToString();
    }

    public void InstantiateIn(System.Web.UI.Control container)
    {
        switch (templateType)
        {
            case DataControlRowType.Header:
                Literal lc = new Literal();
                lc.Text = columnHeader;
                container.Controls.Add(lc);
                break;
            case DataControlRowType.DataRow:
                Label cb = new Label();
                cb.ID = "cb1";
                cb.Text = text;// GetStudent("select * from ppaSearchColumn").Tables[0].Rows[rowIndex][columnNameBinding].ToString();
                container.Controls.Add(cb);
                break;
            default:
                break;
        }
    }
}
when i expand a row it is presented ok, but when I expand another one, the first one loses the text from the detailsview.
I am new to telerik so please bear with me if this is an easy one.
Anybody has a suggestion?
Thanks,
 Lucian




Yavor
Telerik team
 answered on 11 Sep 2009
2 answers
104 views
Hello,

In my web-app I have a page with an hierarchy grid.
I would like to give the text in non-expanded rows a different color (light gray) than in expanded rows (which are black)

Is it possible to achieve this in RadGrid?
Jeroen Eikmans
Top achievements
Rank 1
 answered on 11 Sep 2009
1 answer
196 views
Hi,

    In the demo while we are entering the special characters in the filtering textbox it throws error and redirect to the link
http://demos.telerik.com/ErrorPageResources/error.aspx?aspxerrorpath=/aspnet-ajax/grid/examples/generalfeatures/filtering/defaultcs.aspx


How to avoid the special characters in the filtering textbox??


Unni
Shinu
Top achievements
Rank 2
 answered on 11 Sep 2009
2 answers
88 views
Hello,

Is there any control for image editor?
I am using RadUpload and i want that when user upload the image then if he/she want to crop the image then he/she can do.

I have seen that in RadEditor Image Manager.
but i want that separate functionality.
Is there any control or how i can use RadEditor Image Manager without using
RadEditor.

Thanks.
Suneco
Top achievements
Rank 2
 answered on 11 Sep 2009
1 answer
59 views
Hi.
I do not find any information if newest version of radspell supports msword?
The adapter is not in the MsSupport folder of the zip

Best regards, Anders

edit: ops, how did this end up in the calendar forum
Lini
Telerik team
 answered on 11 Sep 2009
4 answers
143 views
I created a control for the check box

<%

-- <cc3:checkboxvalidator id="chkValidator1" runat="server" mustbechecked="true" controltovalidate="CheckBox1"

 

display="Dynamic" enableclientscript="true" errormessage="Please accept the terms and policy" />--

 

%>

 



However, in the rad controls I am sure there is something I can use instead of building my own controls.
Momchil Mitev
Telerik team
 answered on 11 Sep 2009
1 answer
103 views

Hello,

     I went through one problem,  I am using Rad window,under rad window i am using formview. Under formView I have taken RadTabStrip. In RadTabStrip I have taken 2 RadTab which are pointing to 2 diffrent RadPageView.In one RadPageView I have taken asp TextBox and in other RadPageView I have taken RadEditor. In formview I am also using RadTreeView. I have set the height of RadEditor to fix 140px,and I am showing first tab as selected when I open that page,So in starting TextBox display as selected RadTab .But when I select second tab where I am using radEditor,that RadEditor height display lesser than what I have set in designing. When i click on any node of RadTreeView then the height of radEditor set correct.So this is my problem,How this can be solve So that RadEditort height can be set correct ,

   Another thing is that If I set Second tab as selected Index where I have taken radEditor then in page open
RadEditor height set perfect,But i want first tab(Where I have taken TextBox) to be selected in page open ,So please tell me how this
problem can be solved.

 Thanks in advance.

Rumen
Telerik team
 answered on 11 Sep 2009
1 answer
188 views

Situation.

1.  I have a RadCalendar control on a simple web page.
2.  I have a listbox control with dates in it (format dd/mm/yyyy)
3.  On load i want to take the dates in the listbox and select them in the calendar.

Constraints.. have to do this serverside (no java)

I tried this in the ItemDatabound event of my listbox control

 

 

Protected Sub elstDates_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles elstDates.DataBound

 

 

For Each li As ListItem In elstDates.Items

 

ecalDatesWorked.SelectedDate =

CType(li.Value, Date).ToShortDateString

 

 

Next

 

 

 

 

 

End Sub

 


li does have the values that i need (debugged this) and I am not getting any errors on the SelectedDate

Help please

Corey
Shinu
Top achievements
Rank 2
 answered on 11 Sep 2009
2 answers
131 views
In my project , I'm using an updatepanel and bcoz of that I'm encountering some ‘PageRequestManagerParserErrorException’  very often  when we try to debug the project.

Pls give me some solutions on how to avoid this
Shinu
Top achievements
Rank 2
 answered on 11 Sep 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?