|
Hello,
I'm using ASP.NET 2.0. I have to make a Gridview containing a couple of buttons. I inserted the buttons using ItemTemplates. When the GridView is rendered to the client the ItemTemplates containing the buttons are allways placed to the left hand of the gridview and the data is placed right of the buttons. Is it possible to put the ItemTemplates/Buttons to the right hand side of the GridView and the data to the left hand side?
Thanks for any help on this.
Best tregards
Jens
|
|
|
|
|
hi,
Set AutoGenerateColumns = "False" for you gridview and create boundcolumns for all the data to display and at the last create your tempaltecolumns to display the buttons.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Hi Chetan,
thanks for your answer. So when i get this right, you suggest to generate the template columns dynamically? When do i have to do this (After databinding for instance) and do i do it?
Best regards
Jens
|
|
|
|
|
Hi
U dont need to create template columns dynamically.
<asp:gridview runat="server" autogeneratecolumns="false" id="dg">
<columns>
<asp:BoundFiled datafield="field1"/>
<asp:boundfield datafield="field2"/>
<asp:templateField>
<ItemTemplate>
<asp:button id="bttn" runat="server" text="Click"/>
</ItemTemplate>
</asp:templatefield>
</columns>
I hope this will help u.
</asp:gridview>
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
Dear Chetan,
thank you very much for your kind help. That was exactly what i needed. Man, you made my day
Thanks again
Jens
|
|
|
|
|
How to take backup of particular DB :
1} in vbscript
Develop2Program & Program2Develop
|
|
|
|
|
Navneet Hegde wrote: in vbscript
????????
|
|
|
|
|
need a component that will backup db in sql 2000 without any query back to sql2K
Develop2Program & Program2Develop
|
|
|
|
|
|
Hello everybody,
I've searched for this for a long time, but could not find an easy example or something that made sence (for me)
I've asked several collegue's of mine but they are not that good in communication, so i don't understand anything of what they are trying to explain me.
Do you have a clear example of passing variables from a page to a web control?
Thanks in adavce!
Stef
|
|
|
|
|
Add One property (setter, getter) for the control, Then use this as a varible to pass value.
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
Yea! i mean that!
Do you have an example for me?
Stef
|
|
|
|
|
[DefaultProperty("ImageUrl"),<br />
ToolboxData("<{0}:ImageButton runat=server></{0}:ImageButton>")]<br />
public class ImageButton : System.Web.UI.WebControls.LinkButton<br />
{<br />
[Bindable(true),<br />
Category("Appearance"),<br />
DefaultValue(""),<br />
Description("Specifies the image url for the button when in its normal state.")]<br />
public string ImageUrl<br />
{<br />
get<br />
{<br />
object o = ViewState["RollOverImageUrl"];<br />
if (o != null)<br />
return (string) o;<br />
else<br />
return String.Empty;<br />
}<br />
<br />
set<br />
{<br />
ViewState["RollOverImageUrl"] = value;<br />
}<br />
}<br />
<br />
[Bindable(true),<br />
Category("Appearance"),<br />
DefaultValue(""),<br />
Description("Specifies the image url for the button when the mouse is hovered above the button.")]<br />
public string DownImageUrl<br />
{<br />
get<br />
{<br />
object o = ViewState["RollOverRollOverImageUrl"];<br />
if (o != null)<br />
return (string) o;<br />
else<br />
return String.Empty;<br />
}<br />
<br />
set<br />
{<br />
ViewState["RollOverRollOverImageUrl"] = value;<br />
}<br />
}<br />
<br />
<br />
[Bindable(true),<br />
Category("Appearance"),<br />
DefaultValue(""),<br />
Description("Specifies the image url for the button when the mouse is Rollovered above the button.")]<br />
public string RollOverImageUrl<br />
{<br />
get<br />
{<br />
object o = ViewState["RollOverRollOverRollOverImageUrl"];<br />
if (o != null)<br />
return (string) o;<br />
else<br />
return String.Empty;<br />
}<br />
<br />
set<br />
{<br />
ViewState["RollOverRollOverRollOverImageUrl"] = value;<br />
}<br />
}<br />
This is my ImageButton derived from LinkButton And I have added some more properties for image urls
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
THANK YOU!! =D You make my day (acually week but who cares)
Stef
|
|
|
|
|
Can u a little bit clearer on ur Question ?
Wht do u mean by passing value from webpage ,because web page already contains web controls ? R u talking about user controls and passing value between them ?
Type : Clarification of Question
Deo
Bijay Bhaskar Deo
Thanks & Regard
|
|
|
|
|
Well...
Nevermind =D i get it know
thanks in advacne
-- modified at 3:55 Friday 11th May, 2007
Stef
|
|
|
|
|
i want to access the groups and roles and priviledges of the users on machine through asp.net 2.0 application . THe computer machine can be any machine ie whoever browses our application.
its urgent.
thanks in advance.
|
|
|
|
|
Hi
Look up ASP.NET membership on MSDN - http://msdn2.microsoft.com/en-us/library/system.web.security.membershipprovider_members.aspx.
Basically you want to make a page that displays active users MemberShip::GetAllUsers.
You can also use GetNumberOfUsersOnline to see how many people are currently browsing.
Another handy one is GetUser - this returns a membershipuser object that you can query for user information from the datasource - such as IsOnline etc.
http://msdn2.microsoft.com/en-us/library/system.web.security.membershipuser_members.aspx
Also look at System.Security.Principal.IPrincipal.Page.User - this provieds information about users making a page request.
I haven't given you the complete answer but there is more than enough there for you to complete your task now.
I hope this helps
Dan
|
|
|
|
|
i dont want user to the application i want suppose a user is using my application i should be able to browse other users in his network their roles and priviledges etc. ie i want to enter into network of the user who is browsing the application.like by ldap we can access our own directory but i should be able to access other users directory.
its urgent.
thanks in advance .
|
|
|
|
|
Hi all,
i have two time fields(strings) from-time and to-time. I want a validator to insure that the user enters valid time. That means from-time shopuld be less than to-time. I have tried CompareValidator with GreaterThan but not working cause when i enter: From 11:00 AM To 5:00 Pm, it displays the error msg and this not correct. Any help!!!
|
|
|
|
|
U can do one thing. Use a custom validator.
First ensure the format is coreect using Regular Expression, then extract the individual parts of ur date to have a comparision with ur own logic to ensure the functionality u wanted. Fine ?
Type : Suggestion
Deo
Bijay Bhaskar Deo
Thanks & Regard
|
|
|
|
|
Iam using Regular expression that validates the input of time, but on submittion i want to make sure from time is less than to time so that the report afterthat subtracts the two times correctly. is there a validator/function for that.
thanks
|
|
|
|
|
Hi,
I think there no validator for this time of things but you can write your won logic to compare those to times.
Regards,
Sandeep Kumar.V
|
|
|
|
|
Hi all
Dim myStringBuilder As StringBuilder
this "StringBuilder" working when the code in HTML page
But it is giving err as "Type StringBuilder not defined" in .aspx.vb page
What is the reason
---------------------------------
And
How can i copy Placeholder data into a Label
Example
I want to display the placeholder data in the Label
Keerthi
|
|
|
|
|
-giving err as "Type StringBuilder not defined" in .aspx.vb page ?
May be u havenot imported the namespace System.Text or use the full path System.Text.StringBuilder
How can i copy Placeholder data into a Label
If i remind u,PlaceHolder is a container that is rendered at runtime where u can place other elements. when it is rendered,u get no clientside element of placeholder. So u need other controls data to be placed in the placeholder and get the datas of those controls .
I hope it matches
Deo
Bijay Bhaskar Deo
Thanks & Regard
|
|
|
|