I would like to change a Theme in an ASP.NET web application, depending on the login credentials. So, if user1 logs in, then the Theme will automatically be set to say User1Theme. And if user2 logs in, then the theme will automatically be set to User2Theme. Otherwise, I would like the theme to be set to DefaultTheme.
I am using Templates in GridView, but now I have to change the "HeaderText" of each column from code behind. I don't have <HeaderTemplate> so therefore I cannot use FndControl() in header row.
Is there a way to change the HeaderText of each colum without using <HeaderTemplate>
Here are the templates of the GridView which I am using
I'm trying to change one section in code from DataGrid format to GridView format. The reasoning is that the sample application that was displayed was using a DataGrid even though it should have been using a Gridview for 2.0 and above. Most of it shows up without an error except one line in 3 lines which are pretty much the same. I bolded them and just want to know how do I re-write them for the Gridview?
Protected Sub NewsGrid_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles NewsGrid.RowCommand Dim connection As SqlConnection = CreateConnection() If e.CommandName = "Delete" Then Dim com As New SqlCommand("DELETE FROM ElectPageEditor WHERE NewsID = @NewsID", connection) com.Parameters.AddWithValue("@NewsID", e.Item.Cells(0).Text) Try connection.Open() com.ExecuteNonQuery() Catch generatedExceptionName As SqlException Finally connection.Close() End Try ElseIf e.CommandName = "Edit" Then Dim command As New SqlCommand("SELECT NewsText FROM ElectPageEditor WHERE NewsID = @NewsID", connection) command.Parameters.AddWithValue("@NewsID", e.Row.Cells(0).Text) Try connection.Open() Dim record As SqlDataReader = command.ExecuteReader(CommandBehavior.CloseConnection) If record.Read() Then NewsEditor.Content = record.GetString(0) EditedNews.Value = e.Item.Cells(0).Text lse NewsEditor.Content = "" EditedNews.Value = "" End If ' Will close the connection as well record.Close() Catch generatedExceptionName As SqlException Finally connection.Close() End Try End If ' Add code to delete row from data source. ReadAllRecords() End Sub
I am wondering if its possibl to change the DataField value of the asp:BoundField in the code behind.aspx page:
[Code]....
I would like to change DataField="From" to DataField="To" before I call the GridView.DataBind.Please let me know if this is possible and if so how can I do it.
I have a gridview that loads with a new datasource on button click event. On the gridview (which is located in a table columm incidentally) are 2 columns, a descriptor and a checkbox. The problem is that after postback, the column widths change, the checkbox column expands and the other column contracts. Is there a way to keep the gridview column sizes the same after postback?
How to change the values in gridview on text change of templated control without databind again?the value of templated text boxes should change If i change the value of one of the templated textbox then accordingly(By mathematical calculations) the vlaues of all tempated textboxes should also change.
When i run the following code i get an error when gridview changes mode to Edit. stating that you can't change string to decimal!
To get around the occurance i want to disable code when in Edit mode or resolve another way?
GridView1_RowDataBound For Each row As GridViewRow In GridView1.Rows Dim cell As TableCell = row.Cells(7) Dim invoicetotal As Decimal = CDec(cell.Text)
I have a gridview in which I have several editable fields. The user wants a non-editable field to be modified if another field is modified in the same row. e.g. if Age>=65, Status should ="Retired"
I am using the following demo: [URL]
to create a bulk edit gridview so some columns are automatically editable and others aren't, with a single update button. I can set Status="Retired" in the xml generated, or as a rule in database table. But I'd like the status field in the gridview to change when Age is modified and to be shown to user before they press the single Update button. I'm using update panels and ajax on the page also.
I've a gridview with one textbox column and 1 label.
Based on language selection im changing master page and gridview will be bind with data based on language from database . When change the language the labels will be binding with data based on language . but textbox value is not binding properly.i.e;for example  i've 2 languages English and Arabic . First i've logged with English Language gridview is binding correctly after chnage language to Arabic the textbox value is not binding is displaying with data previously whatever binded with english language. Other than this textbox remaining  label data bindind with data in arabic language.
I am a beginner in ASP.Net. I want to know what is CSS, Themes and Skin in ASP.Net? and How to create and use these things in ASP.Net? Please explain with simple example.
<member name="P:Telerik.Web.UI.RadDataBoundControl.Skin"> <summary>Gets or sets the skin name for the control user interface.</summary> <value>A string containing the skin name for the control user interface. The default is string.Empty.</value> <remarks> <para> If this property is not set, the control will render using the skin named "Default". If EnableEmbeddedSkins is set to false, the control will not render skin. </para> </remarks> </member>
that says RadControls are using skin named Default..Now what if I want it to be not default ..what if I want it to be some CustomSkin to be rendered and not default skin?? Where do I need to set the value for the skin I wanna use? I don't know much of XML..so asking
Whats this xml file for anyway? Only describing stuff? What IS the purpose of this xml file??
[EDIT]
Tried setting Skin globally in webconfig.xml as mentioned in telerik's website as follows:-
I have a project where i want (almost) all controls of the same type to also have an extender set with the SAME properties - is there some way to skin the existence of that extender instead of placing it on each and every control?
want to change the css class of this div tag from the code
[Code]....
What is the best way to do so?
Currently how i do this is, i create html table with id & runat="server" tag and then from code behind i add rows and columns to this table, is there some better way to do this job?
I am trying to change change the url of current aspx page to the other url on a click of button. Using Request.Url.AbsoluteUri i can get the url but is it possible to modify?. If yes, what actions will it take i mean will it be a new request or a post back.
RADEditor on my page was inheriting Master Page's CSS properties so followed this tutorial to create custom skin..now what I did was...I simply copied the Folder named "Default" under Skins folder and renamed it to "CustomSkin" and added it like in the code above ..thot it would work but it didn't coz now I don't see border on my RADEditor...why is that ? Also it is STILL inheriting properties from Master page's CSS file :(
I didn't change name of any of the CSS files inside "CustomSkin" folder...Also when I added the following inside "telerik:RadEditor"...still problem persisting..
Quite some time ago I used an old version of the AjaxToolkit. Now I decided to load the newest version. Below code shows me the HEADER and CONTENT ok, HOWEVER:it seems that no theme (skin, CSS) areused / found / recognisedwhen running the page I see the header and content I even can click the header and the text fades away correctly!I used drag/drop from the toolbox in VS2008
What is the main difference between .skin and .css in asp.net?.skin is new enhancement of IDE. I have been working with .css. What is available in .skin that is not to .css
If I am assigning a paricular css class to a control ,it hnherits the class but if i simultaneously give the skin id to the same control then this skin ID overrides the CSS class. Why this is happening?Now if I am using !important in the css stylesheets then css class property is inherited by the control.