Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
278 views
Hi is it posible to rotate the asp.net radgrid so instead of displaying

Customerid, Name, phone, ...
1, username1, 555...
2, usernam.....

So it would be

Customerid       1                            2
Name                Username1            Username2
Phone                555                        55555
...
..
-------


Søren
Top achievements
Rank 1
 answered on 29 Sep 2008
1 answer
84 views
I have a project I'm working on in which I'm doing dynamic file uploads.  If the user wants to upload 4 files, fine, I provide them 4 lines in a grid.  I've worked out all the parts except one.  When they put in 4 in the box, and they get their 4 lines, there should be an ID column, a dropdown list with the different file types, a file uploader, a check box if they want to fax the file in and a status line.

I can't dynamically populate the dropdownlist.

I tried doing it as an itemtemplate, and that didn't work well.  I then went to a griddropdowncolumn.  And I can get it to display the empty line, but not the dropdownlist.
Here's the code:


<

telerik:RadGrid ID="RadGrid1" runat="server" OnNeedDataSource="RadGrid1_NeedDataSource">

<MasterTableView AutoGenerateColumns="false">

<Columns>

<telerik:GridBoundColumn DataField="ID" visible="true"></telerik:GridBoundColumn>

<telerik:GridDropDownColumn HeaderText="Document type" UniqueName="DocType" DataField="DocVal"

ListTextField="SubmitForm" ListValueField="DocVal" DropDownControlType="DropDownList"

EnableEmptyListItem="true" EmptyListItemText="---Choose an option--">

</telerik:GridDropDownColumn>

<telerik:GridTemplateColumn HeaderText="File to upload" UniqueName="TemplateColumn1">

<ItemTemplate>

<asp:FileUpload ID="FileUpload1" runat="server" />

</ItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn HeaderText="Will Fax Later" UniqueName="TemplateColumn2">

<ItemTemplate>

<asp:CheckBox ID="FaxLater" runat="server" />

</ItemTemplate>

</telerik:GridTemplateColumn>

<telerik:GridTemplateColumn HeaderText="Status" UniqueName="TemplateColumn3">

<ItemTemplate>

<asp:Label ID="Status" runat="server" Text=" "></asp:Label>

</ItemTemplate>

</telerik:GridTemplateColumn>

</Columns>

</MasterTableView>

</telerik:RadGrid>



ds = GetSecondaryData()

Dim i As Integer

For i = 0 To FileCount - 1

arr.Add(FileCount)

Next

'Dim ddl As DropDownList

'ddl = RadGrid1.Items("TemplateColumn").FindControl("DDL1")

'ddl.DataSource = ds

'ddl.DataBind()

Dim table As DataTable = New DataTable()

table.Columns.Add(

"ID")

table.Columns.Add(

"SubmitForm")

table.Columns.Add(

"DocVal")

For i = 0 To arr.Count - 1

Dim row As DataRow = table.NewRow()

row(

"ID") = i

row(

"SubmitForm") = ds.Tables(0).Rows(i).Item(1)

row(

"DocVal") = ds.Tables(0).Rows(i).Item(0)

table.Rows.Add(row)

Next

RadGrid1.DataSource = table

RadGrid1.DataBind()

RadGrid1.Visible =

True

ds is a dataset populated with two columns, DocVal and SubmitForm.
arr is an Array. 

I'm in kind of a bind here.  I've been beating my head on the wall with this all day.  Any help would be greatly appreciated.

Iana Tsolova
Telerik team
 answered on 29 Sep 2008
2 answers
94 views
Hi

I need to determine in the SelectedItemChange event of the first dropdownlist in a rad grid row, the parameters to pass to the 2nd and 3rd dropdownlists for them to  databind.
Note: This in insert mode (AddNew record) , and no Records loaded i.e.  Blank Table,...and trying to create the new record.

So, how do I reference these other dropdownlists per that Grid Row" .....I don't have the   GridEditableItem param in the drop downs param
Typically I woud expect something like
DropDownList  my1stDropDown = Grid1.EditedRow,FindCZontrol(1stDropDown) as DropDownList;
string SelVal = my1stDropDown .SelectedValue;

DropDownList  my2ndDropDown = Grid1.EditedRow,FindCZontrol(2ndDropDown) as DropDownList;
my2ndDropDown.DataSource = SomeDSource;
etc


TIA
Neal
Neal
Top achievements
Rank 1
 answered on 29 Sep 2008
1 answer
49 views
I'm looking to create a simple "search results" page which functions like the iPhone version of the Google RSS Reader.  Basically - 10 items are displayed with a "more" button on the bottom.  When "more" is clicked 10 more items are added (for a total of 20 - and so on.)

I'm trying to figure out if there is a way to do this w/o having the "reload" the previous items (only the 10 new items are loaded.) 

Does this make sense?  All my attempts w/ RadAjax thus far have resulted in having the reload ALL the results on each "more" click - rather than just adding the new items.

Thanks in advance.
Sebastian
Telerik team
 answered on 29 Sep 2008
4 answers
193 views
Sir
I have a Page, say Page1.aspx.In it a radGrid and link button is placed
When I click on the linkbutton, a radwindow with a usercontrol is loaded.
ie,

in Page1.aspx

function

OpenRadWindowCustomSearch()

{

var oWnd = radopen("Custom_Search_Page.aspx", "RadWindow2" );

oWnd.setSize(700,550)

oWnd.center();

}

Inside Custom_Search_Page.aspx ,I placed a usercontrol ie,
in
 Custom_Search_Page.aspx

<

form id="form1" runat="server">

<div>

<uc1:CustomSearch id="uclCustomSearch" runat="server" />

</div>

</form>

That usercontrol contains a button
While clicking on tht button I want to rabind the grid in Page1
 
 I tried with
top.$get("btnRebindGrid").click(); 
 I m gettg the javascript error
'top.$get(..)is null or not an object when i write it in code behind of usercontrol
ie,
Usercontrol.ascx.vb

Protected

Sub btnSearch_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSearch.Click

Dim ds As New DataSet()

ds = Custom_SearchBAL.GridDataSource

Dim strFilterExp As String

Dim i As Integer

For i = 0 To ds.Tables(0).Rows.Count - 1

Custom_SearchBAL.SelectedFieldDatatype = ds.Tables(0).Rows(i)(

"Datatype")

strFilterExp = strFilterExp + ds.Tables(0).Rows(i)(

"ANDOR") + ds.Tables(0).Rows(i)("FilterExp")

Next

Custom_SearchBAL.ResultantFilterExp = strFilterExp

Dim strScript As String

strScript =

"<script language=javascript>"

strScript +=

"top.$get('btnRebindGrid').click();"

strScript +=

"<"

strScript +=

"/script>"

Page.RegisterStartupScript(

"MSGE", strScript)

Page1.aspx

<asp:Button ID="btnRebindGrid" runat="server" Text="RebindGrid" style="display:none" />

Page1.aspx.vb

Protected Sub btnRebindGrid_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRebindGrid.Click

WorkDetailsGrid.Rebind()

End Sub

Page1.aspxPage1.aspx.vb
Priya
Top achievements
Rank 1
 answered on 29 Sep 2008
2 answers
197 views
Hi

Is it possible to change the font-size in teh RadSlidingZone?  I wish to use it more like a title rather than a button, and on hover, I am displaying like a small configuration menu.

Thanks

Johann
Tsvetie
Telerik team
 answered on 29 Sep 2008
6 answers
51 views
Hi all,

Is it possible to use different set of tool buttons in the RADEditor depending on which user group the user belongs to? The idea is to let site administrators have a full set of features available while editors have a more limited selection.

Thanks,
Christoffer
Christoffer
Top achievements
Rank 1
 answered on 29 Sep 2008
8 answers
222 views
I have a timeview that needs to show times for about 12 hours in 5 minute intervals. When using the Web20 skin, the timeview appears too large and may not display properly depending on the user's screen resolution.

Is there a way to get the timeview popup to scroll and maintain a constant height/width. Using the height/width properties doesn't appear to make a difference.

Thanks.
Sebastian
Telerik team
 answered on 29 Sep 2008
1 answer
107 views
$0$0I have some problems with the $find $0$0Here is the contents of my .aspx file:$0$0<form id="form1" runat="server">$0$0        <asp:ScriptManager ID="ScriptManager1" runat="server" />$0$0 <telerik:RadComboBox ID="RadComboBox1" runat="server"></telerik:RadComboBox>$0$0 <script type="text/javascript"> $0$0 alert($find("RadComboBox1"));$0$0 </script>$0$0</form>$0$0my question:$0$0 alert return null,why?$0$0$0$0$0
Rosi
Telerik team
 answered on 29 Sep 2008
4 answers
189 views
having what I consider a strange problem 4 ctrls on page. 2 are radcombo, 2 are dropdown. I am using the exact same SQL and datatables for both controls. the 2 drop downs are there for testing purposes.

essentially when index is changed on combo1, it should repopulate combo 2, which works just fine with regular dropdown. Please don't suggest the demo that populate the countries as this is what  was already used as a guideline. like i said the two drop downs work jsut fine.

the error I keep getting is as soon as i enable line 15..
error is Selection out of range
Parameter name: value
 
JDCDD.DataBind()

thanks for any thoughts. mac

  Sub loaddpts()  
        Dim dt As New Data.DataTable  
        functions.FillDT(dt, ConnStrings.ConnectionStrings, "Select Distinct Department from leaders_employees where user_empid = '" & Session("EMPID") & "'")  
        CCDropDown.DataTextField = "Department" 
        CCDropDown.DataValueField = "Department" 
        CCDropDown.DataSource = dt 
        CCDropDown.DataBind()  
    End Sub  
 
    Sub fillJDCS(ByVal x As String)  
        Dim dptds As New Data.DataTable  
        Dim SQL As String = "Select Distinct sp_job_code,job_title from leaders_employees where department = '" & x & "' and  user_empid = '" & Session("EMPID") & "'"  
        functions.FillDT(dptds, ConnStrings.ConnectionStrings, SQL)  
        JDCDD.DataSource = dptds 
       ' JDCDD.DataValueField = "sp_job_code" 
        JDCDD.DataTextField = "Job_title" 
        JDCDD.DataBind()  
    End Sub  
 
    Protected Sub CCDropDown_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles CCDropDown.Load  
        If Not IsPostBack Then  
            loaddpts()  
        End If  
 
    End Sub  
 
    Protected Sub CCDropDown_SelectedIndexChanged1(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles CCDropDown.SelectedIndexChanged  
        fillJDCS(CCDropDown.SelectedValue)  
    End Sub  
 
    Protected Sub JDCDD_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles JDCDD.Load  
        If Not IsPostBack Then  
            fillJDCS(CCDropDown.SelectedValue)  
        End If  
    End Sub  
 
 
 
 
 
    Protected Sub DD1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles DD1.Load  
        If Not IsPostBack Then  
            Dim dt As New Data.DataTable  
            functions.FillDT(dt, ConnStrings.ConnectionStrings, "Select Distinct Department from leaders_employees where user_empid = '" & Session("EMPID") & "'")  
            DD1.DataSource = dt 
            DD1.DataTextField = "department" 
            DD1.DataValueField = "department" 
            DD1.DataBind()  
        End If  
    End Sub  
 
 
    Protected Sub DD2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles DD2.Load  
        If Not IsPostBack Then  
            filldd2(DD1.SelectedValue)  
        End If  
    End Sub  
 
 
 
    Protected Sub DD1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DD1.SelectedIndexChanged  
        filldd2(DD1.SelectedValue)  
    End Sub  
 
    Sub filldd2(ByVal x As String)  
        Dim dt As New Data.DataTable  
        functions.FillDT(dt, ConnStrings.ConnectionStrings, "Select Distinct sp_job_code,job_title from leaders_employees where department = '" & x & "' and  user_empid = '" & Session("EMPID") & "'")  
        DD2.DataSource = dt 
        DD2.DataTextField = "job_title" 
        DD2.DataValueField = "sp_job_code" 
        DD2.DataBind()  
 
    End Sub 
Rosi
Telerik team
 answered on 29 Sep 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?