Dynamic item template
-
Hi, I cteated dynamic item templated in gridviw. I wat to validate from javascript . like Col1 - col2 - Col3 50 - 60 - 40 Here i want to validate the col2 shold not leads Col1 if it so i shold produce pop up from client side... Can any one help me... regards sekannak
kannak
-
Hi, I cteated dynamic item templated in gridviw. I wat to validate from javascript . like Col1 - col2 - Col3 50 - 60 - 40 Here i want to validate the col2 shold not leads Col1 if it so i shold produce pop up from client side... Can any one help me... regards sekannak
kannak
Place the data in data controls within columns and place compare validators to validate the data between the two controls. Use an error summary control and set the prompt type as message box.
-
Place the data in data controls within columns and place compare validators to validate the data between the two controls. Use an error summary control and set the prompt type as message box.
Hi, Before start doing your logic. Can u give idea of my logic please. Actually the grid contains two/more rows and 3/more coloumns which is dependes upon the selection changes from the Dropdownlist control. Second one is User can enter value on the text box controls of grid view , which all textbox are dynamically created item template not static item template. Problem: I want to validate Second & Third text box should always less then the First Text box. I was trying to take the Textbox id then i compared the current values less the the first textbox values or not? like such a way from Javascript , ctl00_ctl00_ctl01_ContentPlaceHolder1_grdSal_ctl02_txt0 so this is the id of the text box but i cannot find the values of the text box on the Onblur Event. Is the any other event to find out the text box values except Onblur,onkeypress... can u plz ...
kannak
-
Hi, Before start doing your logic. Can u give idea of my logic please. Actually the grid contains two/more rows and 3/more coloumns which is dependes upon the selection changes from the Dropdownlist control. Second one is User can enter value on the text box controls of grid view , which all textbox are dynamically created item template not static item template. Problem: I want to validate Second & Third text box should always less then the First Text box. I was trying to take the Textbox id then i compared the current values less the the first textbox values or not? like such a way from Javascript , ctl00_ctl00_ctl01_ContentPlaceHolder1_grdSal_ctl02_txt0 so this is the id of the text box but i cannot find the values of the text box on the Onblur Event. Is the any other event to find out the text box values except Onblur,onkeypress... can u plz ...
kannak
I'm not sure if I got your requirement right, so I'm rephrasing it here - * You have a datagrid with item template * The controls in the item template are not defined in the design time? - I don't see why you would need to dynamically add items to your item template. Even if it is needed, just place it in at design time and hide it on the server runtime. Confirm how you are placing the controls on the item template. * The values that you wish to check are loaded based on some user selection? - All 3 values are loaded or does the user enter any values? confirm * You wish to validate that textbox1's value is always more than textbox2 and textbox3's value. All that you need to do is put a compare validator along with textbox2 and textbox3 and validate the value against textbox1 using the control to validate and control to compare properties.